JointAxis.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2018 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_JOINTAXIS_HH_
18 #define SDF_JOINTAXIS_HH_
19 
20 #include <memory>
21 #include <string>
22 #include <gz/math/Vector3.hh>
23 #include "sdf/Element.hh"
24 #include "sdf/Types.hh"
25 #include "sdf/sdf_config.h"
26 #include "sdf/system_util.hh"
27 
28 namespace sdf
29 {
30  // Inline bracket to help doxygen filtering.
31  inline namespace SDF_VERSION_NAMESPACE {
32  //
33 
34  // Forward declare private data class.
35  class JointAxisPrivate;
36  struct PoseRelativeToGraph;
37 
41  {
43  public: JointAxis();
44 
47  public: JointAxis(const JointAxis &_jointAxis);
48 
51  public: JointAxis(JointAxis &&_jointAxis) noexcept;
52 
56  public: JointAxis &operator=(JointAxis &&_jointAxis);
57 
61  public: JointAxis &operator=(const JointAxis &_jointAxis);
62 
64  public: ~JointAxis();
65 
72  public: Errors Load(ElementPtr _sdf);
73 
78  public: double InitialPosition() const;
79 
83  public: void SetInitialPosition(const double _pos);
84 
92  public: gz::math::Vector3d Xyz() const;
93 
97  public: void SetXyz(const gz::math::Vector3d &_xyz);
98 
104  public: bool UseParentModelFrame() const
105  SDF_DEPRECATED(9.0);
106 
112  public: void SetUseParentModelFrame(const bool _parentModelFrame)
113  SDF_DEPRECATED(9.0);
114 
120  public: double Damping() const;
121 
127  public: void SetDamping(const double _damping);
128 
133  public: double Friction() const;
134 
138  public: void SetFriction(const double _friction);
139 
144  public: double SpringReference() const;
145 
149  public: void SetSpringReference(const double _spring);
150 
155  public: double SpringStiffness() const;
156 
160  public: void SetSpringStiffness(const double _spring);
161 
167  public: double Lower() const;
168 
174  public: void SetLower(const double _lower);
175 
181  public: double Upper() const;
182 
188  public: void SetUpper(const double _upper) const;
189 
194  public: double Effort() const;
195 
200  public: void SetEffort(double _effort);
201 
206  public: double MaxVelocity() const;
207 
211  public: void SetMaxVelocity(const double _velocity) const;
212 
216  public: double Stiffness() const;
217 
222  public: void SetStiffness(const double _stiffness) const;
223 
227  public: double Dissipation() const;
228 
232  public: void SetDissipation(const double _dissipation) const;
233 
238  public: const std::string& XyzExpressedIn() const;
239 
244  public: void SetXyzExpressedIn(const std::string &_frame);
245 
253  public: Errors ResolveXyz(
254  gz::math::Vector3d &_xyz,
255  const std::string &_resolveTo = "") const;
256 
261  public: sdf::ElementPtr Element() const;
262 
267  private: void SetXmlParentName(const std::string &_xmlParentName);
268 
273  private: void SetPoseRelativeToGraph(
274  std::weak_ptr<const PoseRelativeToGraph> _graph);
275 
277  friend class Joint;
278 
280  private: JointAxisPrivate *dataPtr;
281  };
282  }
283 }
284 #endif
sdf::v9::JointAxis
Parameters related to the axis of rotation for rotational joints, and the axis of translation for pri...
Definition: JointAxis.hh:40
sdf
namespace for Simulation Description Format parser
Definition: Actor.hh:32
Types.hh
sdf::v9::Errors
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:89
SDFORMAT_VISIBLE
#define SDFORMAT_VISIBLE
Definition: system_util.hh:48
sdf::v9::Joint
Definition: Joint.hh:83
sdf::v9::SDF_DEPRECATED
class SDFORMAT_VISIBLE SDF_DEPRECATED(9.2) URDF2SDF
URDF to SDF converter.
Definition: parser_urdf.hh:40
sdf::v9::ElementPtr
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:53
system_util.hh
sdf::v9::Element
class SDFORMAT_VISIBLE Element
Definition: Element.hh:49
Element.hh