Ignition Sensors

API Reference

6.0.1
ForceTorqueSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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 
18 #ifndef IGNITION_SENSORS_FORCETORQUESENSOR_HH_
19 #define IGNITION_SENSORS_FORCETORQUESENSOR_HH_
20 
21 #include <memory>
22 
23 #include <sdf/sdf.hh>
24 
25 #include <ignition/common/SuppressWarning.hh>
26 #include <ignition/common/Time.hh>
27 
28 #include <ignition/math/Pose3.hh>
29 
30 #include <ignition/sensors/config.hh>
31 #include <ignition/sensors/force_torque/Export.hh>
32 
34 
35 namespace ignition
36 {
37  namespace sensors
38  {
39  // Inline bracket to help doxygen filtering.
40  inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
41  //
43  class ForceTorqueSensorPrivate;
44 
48  class IGNITION_SENSORS_FORCE_TORQUE_VISIBLE ForceTorqueSensor
49  : public Sensor
50  {
52  public: ForceTorqueSensor();
53 
55  public: virtual ~ForceTorqueSensor();
56 
60  public: virtual bool Load(const sdf::Sensor &_sdf) override;
61 
65  public: virtual bool Load(sdf::ElementPtr _sdf) override;
66 
69  public: virtual bool Init() override;
70 
74  public: virtual bool Update(
75  const std::chrono::steady_clock::duration &_now) override;
76 
79  public: math::Vector3d Force() const;
80 
84  public: void SetForce(const math::Vector3d &_force);
85 
88  public: math::Vector3d Torque() const;
89 
93  public: void SetTorque(const math::Vector3d &_torque);
94 
98  public: math::Quaterniond RotationParentInSensor() const;
99 
103  public: void SetRotationParentInSensor(
104  const math::Quaterniond &_rotParentInSensor);
105 
109  public: math::Quaterniond RotationChildInSensor() const;
110 
114  public: void SetRotationChildInSensor(
115  const math::Quaterniond &_rotChildInSensor);
116 
117  IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
121  IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
122  };
123  }
124  }
125 }
126 
127 #endif
a base sensor class
Definition: Sensor.hh:59
Force Torque Sensor Class.
Definition: ForceTorqueSensor.hh:48
Definition: AirPressureSensor.hh:31