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 <string>
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 bracke to help doxygen filtering.
29  inline namespace SDF_VERSION_NAMESPACE {
30  //
31 
32  // Forward declare private data class.
33  class JointAxisPrivate;
34 
38  {
40  public: JointAxis();
41 
44  public: JointAxis(const JointAxis &_jointAxis);
45 
48  public: JointAxis(JointAxis &&_jointAxis) noexcept;
49 
53  public: JointAxis &operator=(JointAxis &&_jointAxis);
54 
58  public: JointAxis &operator=(const JointAxis &_jointAxis);
59 
61  public: ~JointAxis();
62 
69  public: Errors Load(ElementPtr _sdf);
70 
75  public: double InitialPosition() const;
76 
80  public: void SetInitialPosition(const double _pos);
81 
89  public: ignition::math::Vector3d Xyz() const;
90 
94  public: void SetXyz(const ignition::math::Vector3d &_xyz);
95 
101  public: bool UseParentModelFrame() const;
102 
108  public: void SetUseParentModelFrame(const bool _parentModelFrame);
109 
115  public: double Damping() const;
116 
122  public: void SetDamping(const double _damping);
123 
128  public: double Friction() const;
129 
133  public: void SetFriction(const double _friction);
134 
139  public: double SpringReference() const;
140 
144  public: void SetSpringReference(const double _spring);
145 
150  public: double SpringStiffness() const;
151 
155  public: void SetSpringStiffness(const double _spring);
156 
162  public: double Lower() const;
163 
169  public: void SetLower(const double _lower);
170 
176  public: double Upper() const;
177 
183  public: void SetUpper(const double _upper) const;
184 
189  public: double Effort() const;
190 
195  public: void SetEffort(double _effort);
196 
201  public: double MaxVelocity() const;
202 
206  public: void SetMaxVelocity(const double _velocity) const;
207 
211  public: double Stiffness() const;
212 
217  public: void SetStiffness(const double _stiffness) const;
218 
222  public: double Dissipation() const;
223 
227  public: void SetDissipation(const double _dissipation) const;
228 
233  public: sdf::ElementPtr Element() const;
234 
236  private: JointAxisPrivate *dataPtr;
237  };
238  }
239 }
240 #endif
class SDFORMAT_VISIBLE Element
Definition: Element.hh:47
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:51
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:74
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:48
namespace for Simulation Description Format parser
Definition: AirPressure.hh:25
Parameters related to the axis of rotation for rotational joints, and the axis of translation for pri...
Definition: JointAxis.hh:37