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 <ignition/math/Vector3.hh>
23 #include <ignition/utils/ImplPtr.hh>
24 #include "sdf/Element.hh"
25 #include "sdf/Exception.hh"
26 #include "sdf/Types.hh"
27 #include "sdf/sdf_config.h"
28 #include "sdf/system_util.hh"
29 
30 namespace sdf
31 {
32  // Inline bracket to help doxygen filtering.
33  inline namespace SDF_VERSION_NAMESPACE {
34  //
35 
36  // Forward declare private data class.
37  struct PoseRelativeToGraph;
38  template <typename T> class ScopedGraph;
39 
43  {
45  public: JointAxis();
46 
53  public: Errors Load(ElementPtr _sdf);
54 
59  public: double InitialPosition() const SDF_DEPRECATED(10.0);
60 
64  public: void SetInitialPosition(const double _pos) SDF_DEPRECATED(10.0);
65 
74  public: ignition::math::Vector3d Xyz() const;
75 
80  public: [[nodiscard]] sdf::Errors SetXyz(
81  const ignition::math::Vector3d &_xyz);
82 
88  public: double Damping() const;
89 
95  public: void SetDamping(const double _damping);
96 
101  public: double Friction() const;
102 
106  public: void SetFriction(const double _friction);
107 
112  public: double SpringReference() const;
113 
117  public: void SetSpringReference(const double _spring);
118 
123  public: double SpringStiffness() const;
124 
128  public: void SetSpringStiffness(const double _spring);
129 
135  public: double Lower() const;
136 
142  public: void SetLower(const double _lower);
143 
149  public: double Upper() const;
150 
156  public: void SetUpper(const double _upper);
157 
164  public: double Effort() const;
165 
171  public: void SetEffort(double _effort);
172 
177  public: double MaxVelocity() const;
178 
183  public: void SetMaxVelocity(const double _velocity);
184 
188  public: double Stiffness() const;
189 
194  public: void SetStiffness(const double _stiffness);
195 
199  public: double Dissipation() const;
200 
204  public: void SetDissipation(const double _dissipation);
205 
210  public: const std::string& XyzExpressedIn() const;
211 
216  public: void SetXyzExpressedIn(const std::string &_frame);
217 
225  public: Errors ResolveXyz(
226  ignition::math::Vector3d &_xyz,
227  const std::string &_resolveTo = "") const;
228 
233  public: sdf::ElementPtr Element() const;
234 
239  private: void SetXmlParentName(const std::string &_xmlParentName);
240 
245  private: void SetPoseRelativeToGraph(
246  sdf::ScopedGraph<PoseRelativeToGraph> _graph);
247 
249  friend class Joint;
250 
252  IGN_UTILS_IMPL_PTR(dataPtr)
253  };
254  }
255 }
256 #endif
Definition: Joint.hh:85
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:98
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:41
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:53
class SDFORMAT_VISIBLE Element
Definition: Element.hh:49
Parameters related to the axis of rotation for rotational joints, and the axis of translation for pri...
Definition: JointAxis.hh:42
namespace for Simulation Description Format parser
Definition: Actor.hh:33
#define SDF_DEPRECATED(version)
Definition: Types.hh:39