How to get constant velocity output from joint_trajectory_controller?

asked 2021-10-22 12:26:06 -0500

xman236 gravatar image


is there a way to put the constraints into the joint_trajectory_controller so that the computed velocity is constant for all the waypoints? Basically, I want that the end-effector of the robot moves with a constant velocity along the trajectory.

edit retag flag offensive close merge delete


Yes: feed it a trajectory that will make your EEF move with a constant velocity.

Coming up with such a trajectory is not the job of JointTrajectoryController. It's on the execution side of things, not on the motion planning side.

You'll have to generate such a trajectory using a proper motion planner, or write some code yourself.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-22 13:59:05 -0500 )edit

Thank you, but could you elaborate a bit more on „Yes: feed it a trajectory that will make your EEF move with a constant velocity.“ I am not quite following you...

xman236 gravatar image xman236  ( 2021-10-22 15:00:32 -0500 )edit

The JointTrajectoryController (JTC) only executes trajectories. It does not do any motion planning, so it cannot come up with trajectories or constraints itself.

To make it "do" something, you'll have to send it a trajectory which already adheres to whatever constraints you have in mind.

If your constraints include "move with a constant velocity", then you have to make sure the trajectory you sent the JTC causes the EEF to move with a constant velocity. You cannot make the JTC execute a trajectory with a constant EEF velocity unless that is already encoded in the trajectory's timing information.

What I'm trying to explain is that you seem to focus on the JTC, while the behaviour you're looking for is not the responsibility of the JTC. It would be the responsibility of the entity which generates your trajectory.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-23 03:16:56 -0500 )edit