ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Joint Group Position Controller should be seen as the raw-est form possible of setting goal positions for your robot's joints based on whatever their controller parameters (e.g. pd) are set. As the name suggests, you will not be sending a trajectory here and mimicking an accurate & timely trajectory controller with this interface will be really difficult due to timing and status check delays between your computer and the robot's output. This controller is not meant for trajectories, it's meant for setting positions (or joint angles) for a group of motors.

The trajectory controller on the other hand, provides feedback on the state of the trajectory while the trajectory is being executed. For instance, after you define a trajectory for your robot to move between 2 pre-defined configurations, the traj control interface computes the errors for you and packs it nicely with the current velocities and accelerations of your robot through its /state topic and /query_state service interfaces. This comes in handy for when you want your robot to start doing motions one after another so you can implement, for example, a state machine for your robot's pick-and-place task.

Sure, for the most simple case of moving 1 joint from 0.0 to 1.57 both controllers may end up delivering the same final results for your simulation, but the biggest difference between the two methods is what the control is applied to (positions vs. trajectories-made-of-positions specifically for position_controllers/JointGroupPositionController vs. position_controllers/JointTrajectoryController).

Hope this helps someone who is looking for answers.