-
Notifications
You must be signed in to change notification settings - Fork 688
Description
Description
moveit2/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp
Lines 73 to 85 in e489b04
| /** | |
| * \brief Get joint name from resource name reported by ros2_control, since claimed_interfaces return by ros2_control | |
| * will have the interface name as suffix joint_name/INTERFACE_TYPE | |
| * @param[in] claimed_interface claimed interface as joint_name/INTERFACE_TYPE | |
| * @return joint_name part of the /p claimed_interface | |
| */ | |
| std::string parseJointNameFromResource(const std::string& claimed_interface) | |
| { | |
| const auto index = claimed_interface.find('/'); | |
| if (index == std::string::npos) | |
| return claimed_interface; | |
| return claimed_interface.substr(0, index); | |
| } |
In moveit_ros_control_interface::Ros2ControlManager, the function above is used to parse joint names from claimed interfaces so that the plugin will know which controller can be used for a given planned trajectory.
However, when working with planar joints, the joint names are extended with components. For example, base_joint would be extended to
base_joint/xbase_joint/ybase_joint/theta
as written here I think
moveit2/moveit_core/robot_model/src/planar_joint_model.cpp
Lines 56 to 61 in 4fc5c82
| local_variable_names_.push_back("x"); | |
| local_variable_names_.push_back("y"); | |
| local_variable_names_.push_back("theta"); | |
| for (int i = 0; i < 3; ++i) | |
| { | |
| variable_names_.push_back(getName() + "/" + local_variable_names_[i]); |
The parseJointNameFromResource function strips everything so that if base_joint/x/position is given, base_joint will return, losing the component x, y, theta.
Is this stripping behavior intentional? Should the parsing be updated to strip only the final interfaces part (e.g. /position), while preserving the planar joint suffix (e.g. /x)?
ROS Distro
Jazzy
OS and version
Ubuntu 24.04
Source or binary build?
Binary
If binary, which release version?
2.12.3
If source, which branch?
No response
Which RMW are you using?
CycloneDDS
Steps to Reproduce
Try out this tutorial
https://moveit.picknik.ai/main/doc/examples/mobile_base_arm/mobile_base_arm_tutorial.html
but replace moveit_simple_controller_manager/MoveItSimpleControllerManager with moveit_ros_control_interface/Ros2ControlManager
Expected behavior
moveit_ros_control_interface/Ros2ControlManager should find the controller with OOO/x, OOO/y, OOO/theta interface and pass the trajectory to it.
Actual behavior
moveit_ros_control_interface/Ros2ControlManager couldn't find the controller even though it's there
Backtrace or Console output
No response