18#ifndef GAZEBO_PLUGINS_JOINTEVENTSOURCE_HH_
19#define GAZEBO_PLUGINS_JOINTEVENTSOURCE_HH_
80 public:
virtual void Init();
91 public:
virtual void Load(
const sdf::ElementPtr _sdf);
95 private:
bool LookupJoint();
99 private: std::string RangeAsString()
const;
104 private:
void SetRangeFromString(
const std::string &_rangeStr);
110 private: std::string modelName;
113 private: std::string jointName;
128 private:
Range range;
131 private:
bool isTriggered;
The base class for emitting SimEvents.
Definition EventSource.hh:35
The event generator class.
Definition JointEventSource.hh:56
Range
The type of data range measured.
Definition JointEventSource.hh:59
@ ANGLE
Normalized angle (between -PI and PI)
Definition JointEventSource.hh:63
@ VELOCITY
Velocity or angular velocity.
Definition JointEventSource.hh:65
@ FORCE
Applied force (or torque, for revolute joints)
Definition JointEventSource.hh:67
@ POSITION
Absolute position (or angle, for revolute joints)
Definition JointEventSource.hh:61
@ INVALID
invalid
Definition JointEventSource.hh:69
virtual void Load(const sdf::ElementPtr _sdf)
Loads the full name of the model and the triggers from the world file.
JointEventSource(transport::PublisherPtr _pub, physics::WorldPtr _world)
Constructor.
virtual void Init()
Initialize the event.
void Info() const
Prints data about the event source to the log (useful for debug)
void Update()
Called every simulation step.
boost::shared_ptr< Connection > ConnectionPtr
Definition CommonTypes.hh:134
boost::shared_ptr< World > WorldPtr
Definition PhysicsTypes.hh:89
boost::shared_ptr< Model > ModelPtr
Definition PhysicsTypes.hh:93
boost::shared_ptr< Joint > JointPtr
Definition PhysicsTypes.hh:117
boost::shared_ptr< Publisher > PublisherPtr
Definition TransportTypes.hh:49
Forward declarations for the common classes.
Definition Animation.hh:27