66 const std::string& jointCommandTopic,
67 const std::string& jointStateTopic,
68 bool syncWithSystemTime =
false
135 std::map<std::string, Joint> m_joints;
149 bool m_syncWithSystemTime;
#define AGX_DECLARE_POINTER_TYPES(type)
Possible to add joints (Constraint1DOF) and the listener will publish the position and velocity for t...
ROS2ControlInterface(const std::string &jointCommandTopic, const std::string &jointStateTopic, bool syncWithSystemTime=false)
Constructor creates the ROS2ControlInterface and initializes the ROS2 subscriber and publisher that w...
bool removeJoint(const std::string &name)
Remove a joint that is controlled by this listener.
bool removeJoint(agx::Constraint1DOF *joint)
Remove a joint that is controlled by this listener.
virtual void pre(const agx::TimeStamp &time) override
Checks if there is an available command message, receives it and sets the commands on the joints.
virtual void post(const agx::TimeStamp &time) override
Publishes the joint states.
bool addJoint(agx::Constraint1DOF *joint, ROS2ControlCommandInterface commandInterface)
Add a joint to be controlled by this listener and publish its state on the jointStateTopic.
ROS2ControlCommandInterface
The ROS2ControlCommandInterface sets how the joints should be controlled.
Derive from this class to implement a listener for simulation step events.
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.