Commands can be sent to this generator in four ways:
- As an
Eigen::VectorXd
of joint positions to be achieved as fast as possible. - As a ROS
trajectory_msgs::JointTrajectoryPoint
message to be achieved as fast as possible. - As a ROS
trajectory_msgs::JointTrajectory
to be achieved according to the segment times. - Via the ROS actionlib interface.
- Acquisition Time: Immediately, subject to the dynamic limits.
- Preemption: Preempts current trajectory.
- Acquisition Time: Immediately, subject to the dynamic limits.
- Preemption: Preempts current trajectory.
When receiving a sensor_msgs/JointTrajectory
message, this controller aims to mimic the "classic" PR2 JointTrajectoryController
behavior. This behavior is summarized as follows. Additionally, we add the notion of "flexible" points which the controller will try to achieve as quickly as possible subject to the controller's dynamic limits.
-
Acquisition Time: The time at which the trajectory is acquired depends both on the timestamp of the header as well as the
time_from_start
members of eachJointTrajectoryPoint
- header.stamp == 0.0: Begin pursuing the new trajectory immediately.
- header.stamp < NOW: If any of the new trajectory points are to be acquired before the current trajectory, preempt the current trajectory and begin pursuing them imediately.
- header.stamp > NOW: If any of the new trajectory points are to be acquired before points in the current trajectory, insert the new points into the trajectory and begin pursuing them at the future time. All points in the current trajectory after that time will be removed.
-
Preemption: Preempts currently-buffered trajectory segments which beginafter
- header.stamp == 0.0: Preempt the current trajectory.
- header.stamp < NOW: Preempt the current trajectory.
- header.stamp > NOW: Continue the current trajectory.
For each point, if the time_from_start
is zero, then the controller will consider it's completion time "flexible." This means that it will execute it subject to the velocity, acceleration, and jerk limits given to the controller. This is useful if your high-level trajectories should be executed as quickly as possible subject to these limits.
This component will advertise an actionlib interface on a topic named COMPONENT_NAME/action
of time control_msgs::FollowJointTrajectoryAction
. This can be used with any ROS actionlib interface, and it has the same semantics as publishing a trajectory_msgs::JointTrajectory
message.