Surface.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2020 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef SDF_SURFACE_HH_
18 #define SDF_SURFACE_HH_
19 
20 #include <ignition/utils/ImplPtr.hh>
21 #include "sdf/Element.hh"
22 #include "sdf/Types.hh"
23 #include "sdf/sdf_config.h"
24 #include "sdf/system_util.hh"
25 
26 namespace sdf
27 {
28  // Inline bracket to help doxygen filtering.
29  inline namespace SDF_VERSION_NAMESPACE {
32  {
34  public: Contact();
35 
42  public: Errors Load(ElementPtr _sdf);
43 
48  public: sdf::ElementPtr Element() const;
49 
52  public: uint16_t CollideBitmask() const;
53 
55  public: void SetCollideBitmask(const uint16_t _bitmask);
56 
58  IGN_UTILS_IMPL_PTR(dataPtr)
59  };
60 
63  {
65  public: ODE();
66 
73  public: Errors Load(ElementPtr _sdf);
74 
77  public: double Mu() const;
78 
81  public: void SetMu(double _mu);
82 
85  public: double Mu2() const;
86 
89  public: void SetMu2(double _mu2);
90 
93  public: const ignition::math::Vector3d &Fdir1() const;
94 
97  public: void SetFdir1(const ignition::math::Vector3d &_fdir);
98 
101  public: double Slip1() const;
102 
105  public: void SetSlip1(double _slip1);
106 
109  public: double Slip2() const;
110 
113  public: void SetSlip2(double _slip2);
114 
119  public: sdf::ElementPtr Element() const;
120 
122  IGN_UTILS_IMPL_PTR(dataPtr)
123  };
124 
127  {
129  public: Friction();
130 
137  public: Errors Load(ElementPtr _sdf);
138 
142  public: const sdf::ODE *ODE() const;
143 
146  public: void SetODE(const sdf::ODE &_ode);
147 
152  public: sdf::ElementPtr Element() const;
153 
155  IGN_UTILS_IMPL_PTR(dataPtr)
156  };
157 
160  {
162  public: Surface();
163 
170  public: Errors Load(ElementPtr _sdf);
171 
176  public: sdf::ElementPtr Element() const;
177 
181  public: const sdf::Contact *Contact() const;
182 
185  public: void SetContact(const sdf::Contact &_contact);
186 
190  public: const sdf::Friction *Friction() const;
191 
194  public: void SetFriction(const sdf::Friction &_friction);
195 
201  public: sdf::ElementPtr ToElement() const;
202 
204  IGN_UTILS_IMPL_PTR(dataPtr)
205  };
206  }
207 }
208 
209 #endif
sdf::v12::Contact
Contact information for a surface.
Definition: Surface.hh:31
sdf
namespace for Simulation Description Format parser
Definition: Actor.hh:34
sdf::v12::ODE
ODE information for a friction.
Definition: Surface.hh:62
sdf::v12::Errors
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:106
sdf::v12::Friction
Friction information for a surface.
Definition: Surface.hh:126
Types.hh
sdf_config.h
SDFORMAT_VISIBLE
#define SDFORMAT_VISIBLE
Definition: system_util.hh:25
sdf::v12::Element
class IGNITION_SDFORMAT_VISIBLE Element
Definition: Element.hh:50
sdf::v12::Surface
Surface information for a collision.
Definition: Surface.hh:159
system_util.hh
sdf::v12::ElementPtr
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:54
Element.hh