moveit2
The MoveIt Motion Planning Framework for ROS 2.
|
#include <follow_joint_trajectory_controller_handle.h>
Public Member Functions | |
FollowJointTrajectoryControllerHandle (const rclcpp::Node::SharedPtr &node, const std::string &name, const std::string &action_ns) | |
bool | sendTrajectory (const moveit_msgs::msg::RobotTrajectory &trajectory) override |
Send a trajectory to the controller. | |
![]() | |
ActionBasedControllerHandle (const rclcpp::Node::SharedPtr &node, const std::string &name, const std::string &ns, const std::string &logger_name) | |
bool | cancelExecution () override |
Cancels trajectory execution by triggering the controller action server's cancellation callback. | |
virtual void | controllerDoneCallback (const typename rclcpp_action::ClientGoalHandle< control_msgs::action::FollowJointTrajectory >::WrappedResult &wrapped_result)=0 |
Callback function to call when the result is received from the controller action server. | |
bool | waitForExecution (const rclcpp::Duration &timeout=rclcpp::Duration::from_seconds(-1.0)) override |
Blocks waiting for the action result to be received. | |
moveit_controller_manager::ExecutionStatus | getLastExecutionStatus () override |
Return the execution status of the last trajectory sent to the controller. | |
void | addJoint (const std::string &name) override |
void | getJoints (std::vector< std::string > &joints) override |
![]() | |
ActionBasedControllerHandleBase (const std::string &name, const std::string &logger_name) | |
![]() | |
MoveItControllerHandle (const std::string &name) | |
Each controller has a name. The handle is initialized with that name. | |
virtual | ~MoveItControllerHandle () |
const std::string & | getName () const |
Get the name of the controller this handle can send commands to. | |
Protected Member Functions | |
void | controllerDoneCallback (const rclcpp_action::ClientGoalHandle< control_msgs::action::FollowJointTrajectory >::WrappedResult &wrapped_result) override |
![]() | |
bool | isConnected () const |
Check if the controller's action server is ready to receive action goals. | |
std::string | getActionName () const |
Get the full name of the action using the action namespace and base name. | |
void | finishControllerExecution (const rclcpp_action::ResultCode &state) |
Indicate that the controller handle is done executing the trajectory and set the controller manager handle's ExecutionStatus based on the received action ResultCode. | |
Static Protected Member Functions | |
static control_msgs::msg::JointTolerance & | getTolerance (std::vector< control_msgs::msg::JointTolerance > &tolerances, const std::string &name) |
Protected Attributes | |
control_msgs::action::FollowJointTrajectory::Goal | goal_template_ |
![]() | |
const rclcpp::Node::SharedPtr | node_ |
A pointer to the node, required to read parameters and get the time. | |
moveit_controller_manager::ExecutionStatus | last_exec_ |
Status after last trajectory execution. | |
bool | done_ |
Indicates whether the controller handle is done executing its current trajectory. | |
std::string | namespace_ |
The controller namespace. The controller action server's topics will map to name/ns/goal, name/ns/result, etc. | |
std::vector< std::string > | joints_ |
The joints controlled by this controller. | |
rclcpp_action::Client< control_msgs::action::FollowJointTrajectory >::SharedPtr | controller_action_client_ |
Action client to send trajectories to the controller's action server. | |
rclcpp_action::ClientGoalHandle< control_msgs::action::FollowJointTrajectory >::SharedPtr | current_goal_ |
Current goal that has been sent to the action server. | |
![]() | |
const rclcpp::Logger | logger_ |
![]() | |
std::string | name_ |
Definition at line 51 of file follow_joint_trajectory_controller_handle.h.
|
inline |
Definition at line 55 of file follow_joint_trajectory_controller_handle.h.
|
overrideprotected |
Definition at line 226 of file follow_joint_trajectory_controller_handle.cpp.
|
staticprotected |
Definition at line 211 of file follow_joint_trajectory_controller_handle.cpp.
|
overridevirtual |
Send a trajectory to the controller.
The controller is expected to execute the trajectory, but this function call should not block. Blocking is achievable by calling waitForExecution(). Return false when the controller cannot accept the trajectory.
Implements moveit_controller_manager::MoveItControllerHandle.
Definition at line 44 of file follow_joint_trajectory_controller_handle.cpp.
|
protected |
Definition at line 75 of file follow_joint_trajectory_controller_handle.h.