Smooth arm trajectory with JointTrajectoryPoint
I'm using FollowJointTrajectoryGoal() from control_msgs to send a trajectory to my robot. Its trajectory is a JointTrajectory from trajectory_msgs. I have a list joint positions that make up the trajectory I'd like to send. My current approach is to create a JointTrajectoryPoint for each joint position in my list. The velocities
list of each JointTrajectoryPoint is set to a list of zeros, and time_from_start
is one second later than the time_from_start
of the last point in the trajectory.
My trajectory is executed correctly, but it's not smooth. This is probably because the segments of the trajectory are executed faster than the differences between the time_from_start
s. Is there a way to create a smooth JointTrajectory? I could try to implement spline interpolation to calculate velocities for each point. Would these velocities be the angular velocity of each joint when it reaches the corresponding JointTrajectoryPoint? Or is it the maximum angular velocity along that trajectory? If I do this, could I remove time_from_start
, or set it to zero? Or would I also need to interpolate accelerations? All the examples that I've found set velocities
to zero. Thanks!
Hi ! Any updates on it? Thanks