ForceTorque.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_FORCE_TORQUE_HH_
18 #define SDF_FORCE_TORQUE_HH_
19 
20 #include <string>
21 #include <sdf/Error.hh>
22 #include <sdf/Element.hh>
23 #include <sdf/Noise.hh>
24 #include <sdf/sdf_config.h>
25 
26 namespace sdf
27 {
28  // Inline bracket to help doxygen filtering.
29  inline namespace SDF_VERSION_NAMESPACE {
30  // Forward declare private data class.
31  class ForceTorquePrivate;
32 
35  enum class ForceTorqueFrame : uint8_t
36  {
38  INVALID = 0,
39 
41  PARENT = 1,
42 
44  CHILD = 2,
45 
47  SENSOR = 3
48  };
49 
52  enum class ForceTorqueMeasureDirection : uint8_t
53  {
55  INVALID = 0,
56 
58  PARENT_TO_CHILD = 1,
59 
61  CHILD_TO_PARENT = 2
62  };
63 
67  {
69  public: ForceTorque();
70 
73  public: ForceTorque(const ForceTorque &_ft);
74 
77  public: ForceTorque(ForceTorque &&_ft) noexcept;
78 
80  public: ~ForceTorque();
81 
85  public: ForceTorque &operator=(const ForceTorque &_ft);
86 
90  public: ForceTorque &operator=(ForceTorque &&_ft) noexcept;
91 
98  public: Errors Load(ElementPtr _sdf);
99 
103  public: sdf::ElementPtr Element() const;
104 
107  public: const Noise &ForceXNoise() const;
108 
111  public: void SetForceXNoise(const Noise &_noise);
112 
115  public: const Noise &ForceYNoise() const;
116 
119  public: void SetForceYNoise(const Noise &_noise);
120 
123  public: const Noise &ForceZNoise() const;
124 
127  public: void SetForceZNoise(const Noise &_noise);
128 
131  public: const Noise &TorqueXNoise() const;
132 
135  public: void SetTorqueXNoise(const Noise &_noise);
136 
139  public: const Noise &TorqueYNoise() const;
140 
143  public: void SetTorqueYNoise(const Noise &_noise);
144 
147  public: const Noise &TorqueZNoise() const;
148 
151  public: void SetTorqueZNoise(const Noise &_noise);
152 
155  public: ForceTorqueFrame Frame() const;
156 
159  public: void SetFrame(ForceTorqueFrame _frame) const;
160 
163  public: ForceTorqueMeasureDirection MeasureDirection() const;
164 
167  public: void SetMeasureDirection(
168  ForceTorqueMeasureDirection _direction) const;
169 
173  public: bool operator==(const ForceTorque &_ft) const;
174 
179  public: bool operator!=(const ForceTorque &_ft) const;
180 
182  private: ForceTorquePrivate *dataPtr;
183  };
184  }
185 }
186 
187 #endif
sdf::v9::ForceTorqueFrame::SENSOR
@ SENSOR
Wrench expressed in the orientation of the joint sensor frame.
sdf::v9::ForceTorqueFrame::CHILD
@ CHILD
Wrench expressed in the orientation of the child link frame.
Error.hh
Noise.hh
sdf
namespace for Simulation Description Format parser
Definition: Actor.hh:32
sdf::v9::ForceTorque
ForceTorque contains information about a force torque sensor.
Definition: ForceTorque.hh:66
sdf::v9::Errors
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:89
sdf::v9::ForceTorqueFrame::PARENT
@ PARENT
Wrench expressed in the orientation of the parent link frame.
SDFORMAT_VISIBLE
#define SDFORMAT_VISIBLE
Definition: system_util.hh:48
sdf::v9::Noise
The Noise class contains information about a noise model, such as a Gaussian distribution.
Definition: Noise.hh:49
sdf::v9::Frame
A Frame element descibes the properties associated with an explicit frame defined in a Model or World...
Definition: Frame.hh:41
sdf::v9::ForceTorqueFrame
ForceTorqueFrame
Definition: ForceTorque.hh:35
sdf::v9::ElementPtr
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:53
sdf::v9::ForceTorqueMeasureDirection
ForceTorqueMeasureDirection
Definition: ForceTorque.hh:52
sdf::v9::ForceTorqueMeasureDirection::CHILD_TO_PARENT
@ CHILD_TO_PARENT
Wrench measured as applied by the child link on the parent link.
sdf::v9::Element
class SDFORMAT_VISIBLE Element
Definition: Element.hh:49
sdf::v9::ForceTorqueMeasureDirection::PARENT_TO_CHILD
@ PARENT_TO_CHILD
Wrench measured as applied by the parent link on the child link.
sdf::v9::ForceTorqueFrame::INVALID
@ INVALID
Invalid frame.
Element.hh