17 #ifndef _GAZEBO_FORCETORQUESENSOR_HH_
18 #define _GAZEBO_FORCETORQUESENSOR_HH_
46 protected:
void Load(
const std::string &_worldName, sdf::ElementPtr _sdf);
49 public:
virtual void Load(
const std::string &_worldName);
52 public:
virtual void Init();
55 public:
virtual std::string GetTopic()
const;
65 public: ignition::math::Vector3d Torque()
const;
75 public: ignition::math::Vector3d Force()
const;
82 public:
virtual bool IsActive();
87 public:
template<
typename T>
89 {
return update.Connect(_subscriber);}
94 {update.Disconnect(_conn);}
97 protected:
virtual bool UpdateImpl(
bool _force);
100 protected:
virtual void Fini();
112 private: msgs::WrenchStamped wrenchMsg;
115 private: boost::mutex mutex;
118 private:
enum MeasureFrame
126 private: MeasureFrame measureFrame;
131 private:
bool parentToChild;
136 private: ignition::math::Matrix3d rotationSensorChild;
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:147
void DisconnectUpdate(event::ConnectionPtr &_conn)
Disconnect from the update signal.
Definition: ForceTorqueSensor.hh:93
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
Forward declarations for transport.
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:47
Sensor for measure force and torque on a joint.
Definition: ForceTorqueSensor.hh:37
event::EventT< void(msgs::WrenchStamped)> update
Update event.
Definition: ForceTorqueSensor.hh:103
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:100
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Base class for sensors.
Definition: Sensor.hh:69
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66
event::ConnectionPtr ConnectUpdate(T _subscriber)
Connect a to the update signal.
Definition: ForceTorqueSensor.hh:88