Construct a trajectory message which will be sent to the controller to do PID control.
The trajectory message should include velocities, positions and timestamps of each points.
The points in the trajectory should be close enough so that the Sawyer can move along a fixed plan smoothly.
For each two adjacent input feature points(key points), insert several points between them.
Set a constant velocity in Cartesian coordinate.
For each two adjacent points, calculate the distance between them and the timestamps in Cartesian coordinate.Â
Using the positions in joint space and the timestamps to calculate the angular velocities of each joint.
Using RobotTrajectory.msg to save all the information and pass it to the PID controller.
Lab materials of EECS C106A at UC Berkeley