PickNikRobotics / ros_control_boilerplate

Provides a simple simulation interface and template for setting up a hardware interface for ros_control
BSD 3-Clause "New" or "Revised" License
244 stars 89 forks source link

test_trajectory: Read joints list from trajectory controller params #28

Closed zultron closed 4 years ago

zultron commented 5 years ago

If the hardware_interface/joints list contains some joints configured in a trajectory controller, the test_trajectory program exits with an error:

[ERROR]: Joints on incoming goal don't match the controller joints.
[ INFO]: Action finished: REJECTED
[ INFO]: TestTrajectory Finished
[ INFO]: Shutting down.

The correct list of joints for the trajectory controller can be found in the <trajectory_controller_name>/joints parameter.

Since the <trajectory_controller_name>/follow_joint_trajectory parameter name is already being passed in, this patch simply shortens that to <trajectory_controller_name>, and uses it to construct both topic names. Now the trajectory is generated for the correct number of joints.

zultron commented 4 years ago

Rebased onto latest melodic-devel branch to fix CI failures.

AndyZe commented 4 years ago

Feel free to merge! Hopefully you will accept my whitespace PR first