ros2 control read state from the velocity controller

asked 2022-10-08 19:08:35 -0500

petrik gravatar image

Question:

I would like my code to read the velocity and position state for joints controlled by the JointGroupVelocityController in ROS2 control running on Humble, but I cannot find a ROS topic or service that provides this information.

Context:

I have a model of a 4 wheel steering robot (see: https://github.com/pvandervelde/tblaz...) that I'm trying to control using ROS2 control (in Humble). I've managed to use a simple test script to steer all the wheels in the same direction and another script to drive the wheels forward and backward (see: https://github.com/pvandervelde/tblaz...). Now I'm trying to create a ROS2 python node that listens to Twist messages and then sets the steering angle and wheel velocities so that the robot can achieve the desired movement.

One part of that code needs to know what the current steering angle and wheel velocities are. I'm using: * wheel steering: joint_trajectory_controller/JointTrajectoryController * wheel velocity: velocity_controllers/JointGroupVelocityController

I have seen that the JointTrajectoryController has a state topic that provides the position and velocity state for all the joints, however it doesn't seem that the JointGroupVelocityController has such a topic.

edit retag flag offensive close merge delete