Skip to content

Ros2ControlManager does not set command_joint #3653

@jsupratman13

Description

@jsupratman13

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.

static_cast<GripperCommandControllerHandle*>(new_handle.get())->setCommandJoint(command_joint);

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions