You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I want to use two robot arms (Franka Emika Panda) at the same time with Moveit 2 and ros2_control. For this I have set up two different hardware components called:
panda_3_FrankaHardwareInterface
with command/state interface like this: panda_3_joint1/....
with the panda_3_arm_controller of type joint_trajectory_controller/JointTrajectoryController
panda_1_FrankaHardwareInterface
with command/state interface like this: panda_1_joint1/....
with the panda_1_arm_controller of type joint_trajectory_controller/JointTrajectoryController
Using only the fake_components/GenericSystem everything works just fine. I can control both robots and no errors occur.
Using the franka_hardware/FrankaHardwareInterface the problems start:
Everything works with only one robot (e.g. only using panda_1_arm_controller)
using a second robot the initialization of the second controller (panda_3_arm_controller) fails:
[ros2_control_node-4] [INFO] [1700586290.750446657] [FrankaHardwareInterface]: Preparing command mode switch
[ros2_control_node-4] [INFO] [1700586290.750465133] [FrankaHardwareInterface]: ++ panda_3_joint1/effort
[ros2_control_node-4] [INFO] [1700586290.750468434] [FrankaHardwareInterface]: ++ panda_3_joint2/effort
[ros2_control_node-4] [INFO] [1700586290.750470715] [FrankaHardwareInterface]: ++ panda_3_joint3/effort
[ros2_control_node-4] [INFO] [1700586290.750472862] [FrankaHardwareInterface]: ++ panda_3_joint4/effort
[ros2_control_node-4] [INFO] [1700586290.750475009] [FrankaHardwareInterface]: ++ panda_3_joint5/effort
[ros2_control_node-4] [INFO] [1700586290.750477177] [FrankaHardwareInterface]: ++ panda_3_joint6/effort
[ros2_control_node-4] [INFO] [1700586290.750479193] [FrankaHardwareInterface]: ++ panda_3_joint7/effort
[ros2_control_node-4] [ERROR] [1700586290.750490794] [FrankaHardwareInterface]: Switching between control modes without stopping it first is not supported.
[ros2_control_node-4] Please stop the running controller first.
[ros2_control_node-4] [ERROR] [1700586290.750508309] [resource_manager]: Component 'panda_1_FrankaHardwareInterface' did not accept new command resource combination:
[ros2_control_node-4] Start interfaces:
[ros2_control_node-4] [
[ros2_control_node-4] panda_3_joint1/effort
[ros2_control_node-4] panda_3_joint2/effort
[ros2_control_node-4] panda_3_joint3/effort
[ros2_control_node-4] panda_3_joint4/effort
[ros2_control_node-4] panda_3_joint5/effort
[ros2_control_node-4] panda_3_joint6/effort
[ros2_control_node-4] panda_3_joint7/effort
[ros2_control_node-4] ]
[ros2_control_node-4] Stop interfaces:
[ros2_control_node-4] [
[ros2_control_node-4] ]
[ros2_control_node-4]
[ros2_control_node-4] [ERROR] [1700586290.750512947] [controller_manager]: Could not switch controllers since prepare command mode switch was rejected.
The join_state_broadcaster still works fine for both robots and I can control the first robot without any problems.
It seems like it is trying to start the panda_3_... interfaces on the wrong hardware component (panda_1_FrankaHardwareInterface instead of panda_3_FrankaHardwareInterface) when activating the panda_3_arm_controller.
Expected behavior
The second controller should start succesfully. The controller manager should try to start the panda_3_... interfaces on the panda_3_FrankaHardwareInterface' and not on the panda_1_FrankaHardwareInterface'.
Questions
Am I doing something wrong here? Do I need to make changes to the hardware interface (e.g. some namespacing stuff) to have it working with multiple instances of itself or is this just a bug?
Environment:
ROS2 Humble in Docker with Ubuntu 22.04
tested with ros2_control installed from binaries and from source
This seems to be a problem with moveit2 and using the default resource manager logic of ros2_control. When I switch the controller manager to the moveit_simple_controller_manager/MoveItSimpleControllerManager this problem disappears.
To change, add this to your yaml describing the controller structure for moveit:
Describe the bug
I want to use two robot arms (Franka Emika Panda) at the same time with Moveit 2 and ros2_control. For this I have set up two different hardware components called:
Using only the fake_components/GenericSystem everything works just fine. I can control both robots and no errors occur.
Using the franka_hardware/FrankaHardwareInterface the problems start:
The join_state_broadcaster still works fine for both robots and I can control the first robot without any problems.
It seems like it is trying to start the panda_3_... interfaces on the wrong hardware component (panda_1_FrankaHardwareInterface instead of panda_3_FrankaHardwareInterface) when activating the panda_3_arm_controller.
Expected behavior
The second controller should start succesfully. The controller manager should try to start the panda_3_... interfaces on the panda_3_FrankaHardwareInterface' and not on the panda_1_FrankaHardwareInterface'.
Questions
Am I doing something wrong here? Do I need to make changes to the hardware interface (e.g. some namespacing stuff) to have it working with multiple instances of itself or is this just a bug?
Environment:
detailed Setup
panda_ros_controllers.yaml:
ros2_control xacro/urdf setup. This is a macro and called seperately for each robot with the corresponding robot_ip and namespace.
launch file (simplified and only relevant section):
Output of
ros2 control list_hardware_components
(shortened):Any help or tips will be appreciated!
The text was updated successfully, but these errors were encountered: