Different measurements for process_value and joint_states
Hello everyone,
I simulate a UR3 robot in gazebo with the aim of controlling each joint in position or in velocity, depending on the case.
For the hardware interface, I use an effort interface hardware_interface/EffortJointInterface
.
For each joint, I've set up both a position controller (effort_controllers/JointPositionController
) and a velocity controller (effort_controllers/JointVelocityController
) and I switch between these two controllers in my code.
The position control works quite well but the results for the velocity control are not that good.
Regarding the velocity control :
Because the measurements for the process_value did not match the joint behavior, I've compared them to the /joint_states messages (published by the joint_state_controller, type = joint_state_controller/JointStateController
).
And for some case (not always), the measurements from /joint_controller/state/process_value and /joint_states do not match. In these cases the values from /joint_states match to the robot behavior but not those from /controller/state/process_value.
Why is there this difference ? These two values are not both read from the hardware_interface directly ?
From the schema of Gazebo ROS Control Tutorial, I understand that all the controllers ( joint_state_controller/JointStateController
, effort_controllers/JointPositionController
and effort_controllers/JointVelocityController
) read the state of the joint from the Hardware Resource Interface Layer (i.e. the Joint State Interface).
But I must be missing a detail because, this is not what I can observe.
Thank you in advance for your help.