Closed ecmjohnson closed 9 months ago
Thanks for reporting this. I think it also takes the velocity field
but the hardware plugin does not check if velocity and/or position is commanded, it just overrides with the position if both are given. Introspection of the joint_states/velocity should make a difference though? https://github.com/ros-controls/ros2_control_demos/blob/efe3aa2446ebc1aa43cccd586d568cb25c3b0f49/example_7/hardware/r6bot_hardware.cpp#L105-L114
Do you want to create a PR fixing this?
Example 7's trajectory generator copies position data to the trajectory point message's velocity vector (see snippet below). The example seems to work as expected regardless so if this is intended it would be nice to have a comment explaining why this is necessary.
https://github.com/ros-controls/ros2_control_demos/blob/efe3aa2446ebc1aa43cccd586d568cb25c3b0f49/example_7/reference_generator/send_trajectory.cpp#L79-L85
Changing to copy velocity data to the trajectory point message's velocity vector doesn't change the example's behaviour so I'm assuming only the position field of the trajectory point is used by the controller.