-
Notifications
You must be signed in to change notification settings - Fork 696
Description
Description
MoveItSimpleControllerManager explicitly calls ParallelGripperCommandControllerHandle::setCommandJoint() to set the gripper joint name, allowing the ParallelGripperCommandControllerHandle to extract the correct joint from the trajectory and forward the command to the gripper action server.
moveit2/moveit_plugins/moveit_simple_controller_manager/src/moveit_simple_controller_manager.cpp
Line 174 in 1c4587a
| static_cast<GripperCommandControllerHandle*>(new_handle.get())->setCommandJoint(command_joint); |
Lines 149 to 152 in 1c4587a
| void setCommandJoint(const std::string& name) | |
| { | |
| command_joint_ = name; | |
| } |
In contrast, Ros2ControlManager never calls ParallelGripperCommandControllerHandle::setCommandJoint().
As a result, ParallelGripperCommandControllerHandle is constructed with an empty command_joint_. When a trajectory is received, the controller attempts to find this empty joint name in trajectory.joint_trajectory.joint_names, fails, and logs the following error:
Line 126 in 1c4587a
| RCLCPP_ERROR(logger_, "Received trajectory does not include a command for joint name %s.", command_joint_.c_str()); |
ROS Distro
Jazzy
OS and version
Ubuntu 24.04
Source or binary build?
Binary
If binary, which release version?
2.12.4
If source, which branch?
No response
Which RMW are you using?
None
Steps to Reproduce
Modify the moveit_controllers.yaml to use Ros2ControlManager
moveit_controller_manager: moveit_ros_control_interface/Ros2ControlManager
and prepare a gripper to use ros2 control parallel gripper controller
Expected behavior
Plan and send trajectory to gripper action server via moveit
Actual behavior
Able to plan but unable to send trajectory to gripper action server via moveit but instead prints the following log
Received trajectory does not include a command for joint name .
Backtrace or Console output
No response