Controller for executing joint-space trajectories on a group of joints. More...
#include <joint_trajectory_controller.h>
Classes | |
struct | TimeData |
Public Member Functions | |
JointTrajectoryController () | |
Non Real-Time Safe Functions | |
bool | init (HardwareInterface *hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh) |
Real-Time Safe Functions | |
void | starting (const ros::Time &time) |
Holds the current position. More... | |
void | stopping (const ros::Time &) |
Cancels the active action goal, if any. More... | |
void | update (const ros::Time &time, const ros::Duration &period) |
Public Member Functions inherited from controller_interface::Controller< HardwareInterface > | |
Controller () | |
virtual bool | init (HardwareInterface *, ros::NodeHandle &) |
virtual | ~Controller () |
Public Member Functions inherited from controller_interface::ControllerBase | |
ControllerBase () | |
bool | isRunning () |
bool | isRunning () |
bool | startRequest (const ros::Time &time) |
bool | startRequest (const ros::Time &time) |
bool | stopRequest (const ros::Time &time) |
bool | stopRequest (const ros::Time &time) |
void | updateRequest (const ros::Time &time, const ros::Duration &period) |
void | updateRequest (const ros::Time &time, const ros::Duration &period) |
virtual | ~ControllerBase () |
Protected Member Functions | |
virtual void | cancelCB (GoalHandle gh) |
virtual void | goalCB (GoalHandle gh) |
virtual void | preemptActiveGoal () |
void | publishState (const ros::Time &time) |
Publish current controller state at a throttled frequency. More... | |
virtual bool | queryStateService (control_msgs::QueryTrajectoryState::Request &req, control_msgs::QueryTrajectoryState::Response &resp) |
void | setHoldPosition (const ros::Time &time, RealtimeGoalHandlePtr gh=RealtimeGoalHandlePtr()) |
Hold the current position. More... | |
virtual void | trajectoryCommandCB (const JointTrajectoryConstPtr &msg) |
virtual bool | updateTrajectoryCommand (const JointTrajectoryConstPtr &msg, RealtimeGoalHandlePtr gh, std::string *error_string=0) |
Protected Member Functions inherited from controller_interface::Controller< HardwareInterface > | |
std::string | getHardwareInterfaceType () const |
virtual bool | initRequest (hardware_interface::RobotHW *robot_hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh, ClaimedResources &claimed_resources) |
Additional Inherited Members | |
Public Types inherited from controller_interface::ControllerBase | |
typedef std::vector< hardware_interface::InterfaceResources > | ClaimedResources |
Public Attributes inherited from controller_interface::ControllerBase | |
CONSTRUCTED | |
INITIALIZED | |
RUNNING | |
enum controller_interface::ControllerBase:: { ... } | state_ |
Controller for executing joint-space trajectories on a group of joints.
SegmentImpl | Trajectory segment representation to use. The type must comply with the following structure: class FooSegment { public: // Required types typedef Scalar Time; typedef PosVelAccState<Scalar> State; // Default constructor FooSegment(); // Constructor from start and end states (boundary conditions) FooSegment(const Time& start_time, const State& start_state, const Time& end_time, const State& end_state); // Start and end states initializer (the guts of the above constructor) // May throw std::invalid_argument if parameters are invalid const State& start_state, const Time& end_time, const State& end_state); // Sampler (realtime-safe) // Accesors (realtime-safe) Time startTime() const; Time endTime() const; unsigned int size() const; }; |
HardwareInterface | Controller hardware interface. Currently hardware_interface::PositionJointInterface , hardware_interface::VelocityJointInterface , and hardware_interface::EffortJointInterface are supported out-of-the-box. |
Definition at line 127 of file joint_trajectory_controller.h.
|
protected |
Definition at line 160 of file joint_trajectory_controller.h.
|
protected |
Definition at line 161 of file joint_trajectory_controller.h.
|
protected |
Definition at line 162 of file joint_trajectory_controller.h.
|
protected |
Definition at line 177 of file joint_trajectory_controller.h.
|
protected |
Definition at line 178 of file joint_trajectory_controller.h.
|
protected |
Definition at line 165 of file joint_trajectory_controller.h.
|
protected |
Definition at line 163 of file joint_trajectory_controller.h.
|
protected |
Definition at line 164 of file joint_trajectory_controller.h.
|
protected |
Definition at line 175 of file joint_trajectory_controller.h.
|
protected |
Definition at line 169 of file joint_trajectory_controller.h.
|
protected |
Definition at line 166 of file joint_trajectory_controller.h.
|
protected |
Definition at line 167 of file joint_trajectory_controller.h.
|
protected |
Definition at line 171 of file joint_trajectory_controller.h.
|
protected |
Definition at line 174 of file joint_trajectory_controller.h.
|
protected |
Definition at line 170 of file joint_trajectory_controller.h.
|
protected |
Definition at line 173 of file joint_trajectory_controller.h.
|
protected |
Definition at line 172 of file joint_trajectory_controller.h.
joint_trajectory_controller::JointTrajectoryController< SegmentImpl, HardwareInterface >::JointTrajectoryController | ( | ) |
Definition at line 190 of file joint_trajectory_controller_impl.h.
|
protectedvirtual |
Definition at line 659 of file joint_trajectory_controller_impl.h.
|
protectedvirtual |
Definition at line 586 of file joint_trajectory_controller_impl.h.
|
virtual |
Reimplemented from controller_interface::Controller< HardwareInterface >.
Definition at line 206 of file joint_trajectory_controller_impl.h.
|
inlineprotectedvirtual |
Definition at line 175 of file joint_trajectory_controller_impl.h.
|
protected |
Publish current controller state at a throttled frequency.
Definition at line 731 of file joint_trajectory_controller_impl.h.
|
protectedvirtual |
Definition at line 683 of file joint_trajectory_controller_impl.h.
|
protected |
Hold the current position.
Substitutes the current trajectory with a single-segment one going from the current position and velocity to zero velocity.
Definition at line 756 of file joint_trajectory_controller_impl.h.
|
inlinevirtual |
Holds the current position.
Reimplemented from controller_interface::ControllerBase.
Definition at line 133 of file joint_trajectory_controller_impl.h.
|
inlinevirtual |
Cancels the active action goal, if any.
Reimplemented from controller_interface::ControllerBase.
Definition at line 160 of file joint_trajectory_controller_impl.h.
|
inlineprotectedvirtual |
Definition at line 167 of file joint_trajectory_controller_impl.h.
|
virtual |
Implements controller_interface::ControllerBase.
Definition at line 355 of file joint_trajectory_controller_impl.h.
|
protectedvirtual |
Definition at line 500 of file joint_trajectory_controller_impl.h.
|
protected |
Definition at line 209 of file joint_trajectory_controller.h.
|
protected |
Definition at line 218 of file joint_trajectory_controller.h.
|
protected |
Definition at line 213 of file joint_trajectory_controller.h.
|
protected |
Whether controlled joints wrap around or not.
Definition at line 183 of file joint_trajectory_controller.h.
|
protected |
Definition at line 216 of file joint_trajectory_controller.h.
|
protected |
Thread-safe container with a smart pointer to trajectory currently being followed. Can be either a hold trajectory or a trajectory received from a ROS message.
We store the hold trajectory in a separate class member because the starting(time)
method must be realtime-safe. The (single segment) hold trajectory is preallocated at initialization time and its size is kept unchanged.
Definition at line 197 of file joint_trajectory_controller.h.
|
protected |
Preallocated workspace variable.
Definition at line 200 of file joint_trajectory_controller.h.
|
protected |
Default trajectory segment tolerances.
Definition at line 185 of file joint_trajectory_controller.h.
|
protected |
Preallocated workspace variable.
Definition at line 203 of file joint_trajectory_controller.h.
|
protected |
Preallocated workspace variable.
Definition at line 201 of file joint_trajectory_controller.h.
|
protected |
Definition at line 222 of file joint_trajectory_controller.h.
|
protected |
Last hold trajectory values.
Definition at line 198 of file joint_trajectory_controller.h.
|
protected |
Adapts desired trajectory state to HW interface.
Definition at line 186 of file joint_trajectory_controller.h.
|
protected |
Controlled joint names.
Definition at line 184 of file joint_trajectory_controller.h.
|
protected |
Handles to controlled joints.
Definition at line 182 of file joint_trajectory_controller.h.
|
protected |
Definition at line 223 of file joint_trajectory_controller.h.
|
protected |
Controller name.
Definition at line 181 of file joint_trajectory_controller.h.
|
protected |
Definition at line 219 of file joint_trajectory_controller.h.
|
protected |
Currently active action goal, if any.
Definition at line 188 of file joint_trajectory_controller.h.
|
protected |
Preallocated workspace variable.
Definition at line 202 of file joint_trajectory_controller.h.
|
protected |
Preallocated workspace variable.
Definition at line 204 of file joint_trajectory_controller.h.
|
protected |
Definition at line 220 of file joint_trajectory_controller.h.
|
protected |
Definition at line 208 of file joint_trajectory_controller.h.
|
protected |
Duration for stop ramp. If zero, the controller stops at the actual position.
Definition at line 211 of file joint_trajectory_controller.h.
|
protected |
Definition at line 212 of file joint_trajectory_controller.h.
|
protected |
Definition at line 206 of file joint_trajectory_controller.h.
|
protected |
Definition at line 217 of file joint_trajectory_controller.h.
|
protected |
Hard coded verbose flag to help in debugging.
Definition at line 180 of file joint_trajectory_controller.h.