Open ekampourakis opened 2 weeks ago
We managed to load and get joint states from both robots at the same time by changing the startup.launch.py
file and removing the namespace from the controller_spawner
function but still cannot move both arms from MoveIt.
Both arms activate using the lifecycle command ros2 lifecycle set /right/robot_manager activate
and ros2 lifecycle set /left/robot_manager activate
and publish the appropriate joint states. But only the last activated control node is accepting and executing commands.
The lastly activated control node stops the other external control channel:
[control_node-3] [INFO] [1731323348.965581671] [KukaEACHardwareInterface]: External control session started successfully
[control_node-3] [INFO] [1731323348.965614517] [resource_manager]: Successful 'activate' of hardware 'right_lbr_iisy11_r1300'
[control_node-3] [INFO] [1731323348.965749008] [KukaEACHardwareInterface]: External control is active
[control_node-12] [ERROR] [1731323348.970883392] [KukaEACHardwareInterface]: External control stopped by an error
[control_node-12] [ERROR] [1731323348.970893623] [KukaEACHardwareInterface]: Execution failed
[control_node-12] [ERROR] [1731323348.970909147] [KukaEACHardwareInterface]: External control stopped by an error
[control_node-12] [ERROR] [1731323348.970910779] [KukaEACHardwareInterface]: Joint limits violated
[robot_manager_node-4] [INFO] [1731323348.993286244] [right.robot_manager]: Successfully activated controllers
Additionally this is also the case for the provided dual arm example launch file which doesn't include MoveIt.
An update on this issue could be very useful on moving on with the dual arm setup.
Thanks for reporting this issue, we previously did not have problems with the dual arm setup without moveit, we could launch the example, activate both drivers and move both robot with the rqt_joint_trajectory_controller
.
The moveit configuration files are indeed not set up to support a dual arm scenario, we will start working on that soon and will also try to investigate what could have gone wrong without moveit
Thanks for looking into it. I will provide a more detailed log for running the given multi_robot_startup.launch.py
script.
We have a setup with 2 iisy11 robots and have modified the launch file with the robot models and proper IPs for our network like so:
from launch.launch_description_sources.python_launch_description_source import (
PythonLaunchDescriptionSource,
)
from launch.actions.include_launch_description import IncludeLaunchDescription
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
def generate_launch_description():
test_config_dir = get_package_share_directory("kuka_iiqka_eac_driver") + "/test/config/"
return LaunchDescription(
[
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
[
get_package_share_directory("kuka_iiqka_eac_driver"),
"/launch/",
"startup_with_rviz.launch.py",
]
),
launch_arguments={
"rviz_config": f"{get_package_share_directory('iiqka_moveit_example') + '/config/multi_robot.rviz'}", # noqa: E501
"namespace": "test1",
"controller_config": f"{test_config_dir + 'test1_ros2_controller_config.yaml'}", # noqa: E501
"jtc_config": f"{test_config_dir + 'test1_joint_trajectory_controller_config.yaml'}", # noqa: E501
"jic_config": f"{test_config_dir + 'test1_joint_impedance_controller_config.yaml'}", # noqa: E501
"ec_config": f"{test_config_dir + 'test1_effort_controller_config.yaml'}",
"robot_model": "lbr_iisy11_r1300",
"controller_ip": "192.168.1.200",
"client_ip": "192.168.1.103",
}.items(),
),
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
[
get_package_share_directory("kuka_iiqka_eac_driver"),
"/launch/",
"startup.launch.py",
]
),
launch_arguments={
"namespace": "test2",
"controller_config": f"{test_config_dir + 'test2_ros2_controller_config.yaml'}", # noqa: E501
"jtc_config": f"{test_config_dir + 'test2_joint_trajectory_controller_config.yaml'}", # noqa: E501
"jic_config": f"{test_config_dir + 'test2_joint_impedance_controller_config.yaml'}", # noqa: E501
"ec_config": f"{test_config_dir + 'test2_effort_controller_config.yaml'}",
"robot_model": "lbr_iisy11_r1300",
"controller_ip": "192.168.1.201",
"client_ip": "192.168.1.103",
"x": "2",
}.items(),
),
]
)
Some times we are able to connect to both arms by configuring and activating all the controllers like this:
ros2 lifecycle set /test1/robot_manager configure
ros2 lifecycle set /test1/robot_manager activate
ros2 lifecycle set /test2/robot_manager configure
ros2 lifecycle set /test2/robot_manager activate
After activation, both arms appear as TF in RViz but the rqt trajectory tool fails to receive the robot description for either of the controllers and crashes so we cannot control them without MoveIt.
Here is a full log of the terminal window. Please note at the end that after the activation of the test2 arm, the other external control crashes, thus causing us to lose control. This happens both on the example launch file and on our launch file with and without MoveIt.
ekampourakis@ekampourakis-pc:~$ ros2 launch iiqka_moveit_example multi_robot_startup.launch.py
[INFO] [launch]: All log files can be found below /home/ekampourakis/.ros/log/2024-11-12-10-40-23-125620-ekampourakis-pc-27281
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [control_node-1]: process started with pid [27296]
[INFO] [robot_manager_node-2]: process started with pid [27298]
[INFO] [robot_state_publisher-3]: process started with pid [27300]
[INFO] [spawner-4]: process started with pid [27302]
[INFO] [spawner-5]: process started with pid [27304]
[INFO] [spawner-6]: process started with pid [27306]
[INFO] [spawner-7]: process started with pid [27308]
[INFO] [spawner-8]: process started with pid [27310]
[INFO] [spawner-9]: process started with pid [27312]
[INFO] [rviz2-10]: process started with pid [27314]
[INFO] [control_node-11]: process started with pid [27316]
[INFO] [robot_manager_node-12]: process started with pid [27318]
[INFO] [robot_state_publisher-13]: process started with pid [27321]
[INFO] [spawner-14]: process started with pid [27323]
[INFO] [spawner-15]: process started with pid [27325]
[INFO] [spawner-16]: process started with pid [27327]
[INFO] [spawner-17]: process started with pid [27330]
[INFO] [spawner-18]: process started with pid [27339]
[INFO] [spawner-19]: process started with pid [27346]
[robot_state_publisher-3] [INFO] [1731400823.553558590] [test1.robot_state_publisher]: got segment test1_base
[robot_state_publisher-3] [INFO] [1731400823.553624247] [test1.robot_state_publisher]: got segment test1_base_link
[robot_state_publisher-3] [INFO] [1731400823.553634676] [test1.robot_state_publisher]: got segment test1_flange
[robot_state_publisher-3] [INFO] [1731400823.553641893] [test1.robot_state_publisher]: got segment test1_link_1
[robot_state_publisher-3] [INFO] [1731400823.553648413] [test1.robot_state_publisher]: got segment test1_link_2
[robot_state_publisher-3] [INFO] [1731400823.553654834] [test1.robot_state_publisher]: got segment test1_link_3
[robot_state_publisher-3] [INFO] [1731400823.553661018] [test1.robot_state_publisher]: got segment test1_link_4
[robot_state_publisher-3] [INFO] [1731400823.553667060] [test1.robot_state_publisher]: got segment test1_link_5
[robot_state_publisher-3] [INFO] [1731400823.553673383] [test1.robot_state_publisher]: got segment test1_link_6
[robot_state_publisher-3] [INFO] [1731400823.553679455] [test1.robot_state_publisher]: got segment test1_tool0
[robot_state_publisher-3] [INFO] [1731400823.553685452] [test1.robot_state_publisher]: got segment world
[robot_manager_node-12] [INFO] [1731400823.554216127] [test2.robot_manager]: Control mode change requested
[robot_manager_node-12] [INFO] [1731400823.554253033] [test2.robot_manager]: Successfully changed control mode to 1
[robot_manager_node-2] [INFO] [1731400823.554719286] [test1.robot_manager]: Control mode change requested
[robot_manager_node-2] [INFO] [1731400823.554757688] [test1.robot_manager]: Successfully changed control mode to 1
[robot_state_publisher-13] [INFO] [1731400823.555778981] [test2.robot_state_publisher]: got segment test2_base
[robot_state_publisher-13] [INFO] [1731400823.555815739] [test2.robot_state_publisher]: got segment test2_base_link
[robot_state_publisher-13] [INFO] [1731400823.555820541] [test2.robot_state_publisher]: got segment test2_flange
[robot_state_publisher-13] [INFO] [1731400823.555823437] [test2.robot_state_publisher]: got segment test2_link_1
[robot_state_publisher-13] [INFO] [1731400823.555825792] [test2.robot_state_publisher]: got segment test2_link_2
[robot_state_publisher-13] [INFO] [1731400823.555828122] [test2.robot_state_publisher]: got segment test2_link_3
[robot_state_publisher-13] [INFO] [1731400823.555830520] [test2.robot_state_publisher]: got segment test2_link_4
[robot_state_publisher-13] [INFO] [1731400823.555832779] [test2.robot_state_publisher]: got segment test2_link_5
[robot_state_publisher-13] [INFO] [1731400823.555835254] [test2.robot_state_publisher]: got segment test2_link_6
[robot_state_publisher-13] [INFO] [1731400823.555837554] [test2.robot_state_publisher]: got segment test2_tool0
[robot_state_publisher-13] [INFO] [1731400823.555839956] [test2.robot_state_publisher]: got segment world
[control_node-1] [WARN] [1731400823.559605165] [test1.controller_manager]: [Deprecated] Passing the robot description parameter directly to the control_manager node is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead.
[control_node-1] [INFO] [1731400823.559735534] [resource_manager]: Loading hardware 'test1_lbr_iisy11_r1300'
[control_node-1] [INFO] [1731400823.562328605] [resource_manager]: Initialize hardware 'test1_lbr_iisy11_r1300'
[control_node-1] [INFO] [1731400823.562462561] [KukaEACHardwareInterface]: Init successful with controller ip: 192.168.1.200 and client ip: 192.168.1.103
[control_node-1] [INFO] [1731400823.562467835] [resource_manager]: Successful initialization of hardware 'test1_lbr_iisy11_r1300'
[control_node-1] [INFO] [1731400823.562561358] [test1.controller_manager]: Setting component 'test1_lbr_iisy11_r1300' to 'unconfigured' state.
[control_node-11] [WARN] [1731400823.563798239] [test2.controller_manager]: [Deprecated] Passing the robot description parameter directly to the control_manager node is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead.
[control_node-11] [INFO] [1731400823.563995706] [resource_manager]: Loading hardware 'test2_lbr_iisy11_r1300'
[control_node-11] [INFO] [1731400823.568507603] [resource_manager]: Initialize hardware 'test2_lbr_iisy11_r1300'
[control_node-11] [INFO] [1731400823.568747493] [KukaEACHardwareInterface]: Init successful with controller ip: 192.168.1.201 and client ip: 192.168.1.103
[control_node-11] [INFO] [1731400823.568758739] [resource_manager]: Successful initialization of hardware 'test2_lbr_iisy11_r1300'
[control_node-11] [INFO] [1731400823.568917463] [test2.controller_manager]: Setting component 'test2_lbr_iisy11_r1300' to 'unconfigured' state.
[control_node-11] [INFO] [1731400823.880169110] [test2.controller_manager]: Loading controller 'effort_controller'
[control_node-11] [INFO] [1731400823.922678957] [test2.controller_manager]: Loading controller 'joint_state_broadcaster'
[spawner-17] [INFO] [1731400823.926152177] [spawner_effort_controller]: Loaded effort_controller
[spawner-14] [INFO] [1731400823.972923796] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[control_node-1] [INFO] [1731400824.024634558] [test1.controller_manager]: Loading controller 'event_broadcaster'
[control_node-11] [INFO] [1731400824.035046988] [test2.controller_manager]: Configuring controller 'effort_controller'
[control_node-11] [INFO] [1731400824.035271691] [test2.effort_controller]: configure successful
[spawner-9] [INFO] [1731400824.037494816] [spawner_event_broadcaster]: Loaded event_broadcaster
[control_node-1] [INFO] [1731400824.037905391] [test1.controller_manager]: Configuring controller 'event_broadcaster'
[control_node-11] [INFO] [1731400824.038089105] [test2.controller_manager]: Loading controller 'control_mode_handler'
[control_node-1] [INFO] [1731400824.041980579] [test1.controller_manager]: Loading controller 'effort_controller'
[control_node-11] [INFO] [1731400824.044324828] [test2.controller_manager]: Loading controller 'joint_trajectory_controller'
[control_node-1] [INFO] [1731400824.049871645] [test1.controller_manager]: Loading controller 'joint_state_broadcaster'
[control_node-11] [WARN] [1731400824.051100278] [test2.joint_trajectory_controller]: [Deprecated]: "allow_nonzero_velocity_at_trajectory_end" is set to true. The default behavior will change to false.
[control_node-11] [INFO] [1731400824.052229382] [test2.controller_manager]: Loading controller 'joint_group_impedance_controller'
[control_node-1] [INFO] [1731400824.053844090] [test1.controller_manager]: Loading controller 'joint_trajectory_controller'
[spawner-7] [INFO] [1731400824.058635657] [spawner_effort_controller]: Loaded effort_controller
[spawner-18] [INFO] [1731400824.058813733] [spawner_control_mode_handler]: Loaded control_mode_handler
[control_node-1] [WARN] [1731400824.059320661] [test1.joint_trajectory_controller]: [Deprecated]: "allow_nonzero_velocity_at_trajectory_end" is set to true. The default behavior will change to false.
[control_node-11] [INFO] [1731400824.059387696] [test2.controller_manager]: Configuring controller 'control_mode_handler'
[control_node-11] [INFO] [1731400824.060712390] [test2.control_mode_handler]: Control mode handler configured
[spawner-4] [INFO] [1731400824.061382869] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[control_node-1] [INFO] [1731400824.061766717] [test1.controller_manager]: Loading controller 'joint_group_impedance_controller'
[control_node-1] [INFO] [1731400824.065978877] [test1.controller_manager]: Loading controller 'control_mode_handler'
[spawner-15] [INFO] [1731400824.066516323] [spawner_joint_trajectory_controller]: Loaded joint_trajectory_controller
[control_node-11] [INFO] [1731400824.067083572] [test2.controller_manager]: Configuring controller 'joint_trajectory_controller'
[control_node-11] [INFO] [1731400824.067191664] [test2.joint_trajectory_controller]: No specific joint names are used for command interfaces. Using 'joints' parameter.
[control_node-11] [INFO] [1731400824.067203947] [test2.joint_trajectory_controller]: Command interfaces are [position] and state interfaces are [position].
[control_node-11] [INFO] [1731400824.067214442] [test2.joint_trajectory_controller]: Using 'splines' interpolation method.
[control_node-11] [INFO] [1731400824.067616959] [test2.joint_trajectory_controller]: Controller state will be published at 50.00 Hz.
[control_node-11] [INFO] [1731400824.068780916] [test2.joint_trajectory_controller]: Action status changes will be monitored at 20.00 Hz.
[control_node-1] [INFO] [1731400824.069831136] [test1.controller_manager]: Configuring controller 'effort_controller'
[control_node-1] [INFO] [1731400824.070109791] [test1.effort_controller]: configure successful
[spawner-16] [INFO] [1731400824.070363300] [spawner_joint_group_impedance_controller]: Loaded joint_group_impedance_controller
[control_node-11] [INFO] [1731400824.072314695] [test2.controller_manager]: Configuring controller 'joint_group_impedance_controller'
[control_node-11] [INFO] [1731400824.072566287] [test2.joint_group_impedance_controller]: configure successful
[control_node-1] [INFO] [1731400824.073808014] [test1.controller_manager]: Configuring controller 'joint_state_broadcaster'
[control_node-1] [INFO] [1731400824.073838863] [test1.joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[spawner-5] [INFO] [1731400824.075890048] [spawner_joint_trajectory_controller]: Loaded joint_trajectory_controller
[control_node-11] [INFO] [1731400824.076959238] [test2.controller_manager]: Configuring controller 'joint_state_broadcaster'
[control_node-11] [INFO] [1731400824.077000437] [test2.joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[control_node-1] [INFO] [1731400824.077811580] [test1.controller_manager]: Configuring controller 'joint_trajectory_controller'
[control_node-1] [INFO] [1731400824.077908581] [test1.joint_trajectory_controller]: No specific joint names are used for command interfaces. Using 'joints' parameter.
[control_node-1] [INFO] [1731400824.077922247] [test1.joint_trajectory_controller]: Command interfaces are [position] and state interfaces are [position].
[control_node-1] [INFO] [1731400824.077934027] [test1.joint_trajectory_controller]: Using 'splines' interpolation method.
[control_node-1] [INFO] [1731400824.078168277] [test1.joint_trajectory_controller]: Controller state will be published at 50.00 Hz.
[control_node-1] [INFO] [1731400824.079023075] [test1.joint_trajectory_controller]: Action status changes will be monitored at 20.00 Hz.
[spawner-6] [INFO] [1731400824.080225481] [spawner_joint_group_impedance_controller]: Loaded joint_group_impedance_controller
[control_node-1] [INFO] [1731400824.082054786] [test1.controller_manager]: Configuring controller 'joint_group_impedance_controller'
[control_node-1] [INFO] [1731400824.082274502] [test1.joint_group_impedance_controller]: configure successful
[spawner-8] [INFO] [1731400824.084382495] [spawner_control_mode_handler]: Loaded control_mode_handler
[control_node-1] [INFO] [1731400824.086153326] [test1.controller_manager]: Configuring controller 'control_mode_handler'
[control_node-1] [INFO] [1731400824.087244226] [test1.control_mode_handler]: Control mode handler configured
[control_node-11] [INFO] [1731400824.152772628] [test2.controller_manager]: Loading controller 'event_broadcaster'
[spawner-19] [INFO] [1731400824.162959582] [spawner_event_broadcaster]: Loaded event_broadcaster
[control_node-11] [INFO] [1731400824.163299562] [test2.controller_manager]: Configuring controller 'event_broadcaster'
[INFO] [spawner-17]: process has finished cleanly [pid 27330]
[INFO] [spawner-16]: process has finished cleanly [pid 27327]
[INFO] [spawner-15]: process has finished cleanly [pid 27325]
[INFO] [spawner-6]: process has finished cleanly [pid 27306]
[INFO] [spawner-18]: process has finished cleanly [pid 27339]
[INFO] [spawner-9]: process has finished cleanly [pid 27312]
[INFO] [spawner-5]: process has finished cleanly [pid 27304]
[INFO] [spawner-14]: process has finished cleanly [pid 27323]
[INFO] [spawner-7]: process has finished cleanly [pid 27308]
[INFO] [spawner-8]: process has finished cleanly [pid 27310]
[INFO] [spawner-4]: process has finished cleanly [pid 27302]
[INFO] [spawner-19]: process has finished cleanly [pid 27346]
[control_node-1] [INFO] [1731400836.332271002] [test1.control_mode_handler]: Control mode changed to 1
[control_node-1] [INFO] [1731400836.332273540] [resource_manager]: 'configure' hardware 'test1_lbr_iisy11_r1300'
[control_node-1] [INFO] [1731400836.334254661] [KukaEACHardwareInterface]: Set QoS profile with 2 consequent and 1 packet losses allowed in 5000 milliseconds
[control_node-1] [INFO] [1731400836.334263503] [resource_manager]: Successful 'configure' of hardware 'test1_lbr_iisy11_r1300'
[control_node-1] [INFO] [1731400836.334504312] [test1.controller_manager]: Switch controller timeout is set to 0, using default 1s!
[robot_manager_node-2] [INFO] [1731400836.358497382] [test1.robot_manager]: Activated control mode handler and event broadcaster
[control_node-1] [INFO] [1731400840.628984024] [resource_manager]: 'activate' hardware 'test1_lbr_iisy11_r1300'
[control_node-1] [INFO] [1731400843.845685509] [KukaEACHardwareInterface]: External control session started successfully
[control_node-1] [INFO] [1731400843.845703348] [resource_manager]: Successful 'activate' of hardware 'test1_lbr_iisy11_r1300'
[control_node-1] [INFO] [1731400843.845840272] [KukaEACHardwareInterface]: External control is active
[robot_manager_node-2] [INFO] [1731400843.873284582] [test1.robot_manager]: Successfully activated controllers
[control_node-11] [INFO] [1731400849.788771678] [test2.control_mode_handler]: Control mode changed to 1
[control_node-11] [INFO] [1731400849.788785703] [resource_manager]: 'configure' hardware 'test2_lbr_iisy11_r1300'
[control_node-11] [INFO] [1731400849.790468279] [KukaEACHardwareInterface]: Set QoS profile with 2 consequent and 1 packet losses allowed in 5000 milliseconds
[control_node-11] [INFO] [1731400849.790476440] [resource_manager]: Successful 'configure' of hardware 'test2_lbr_iisy11_r1300'
[control_node-11] [INFO] [1731400849.790664035] [test2.controller_manager]: Switch controller timeout is set to 0, using default 1s!
[control_node-1] [INFO] [1731400849.794209534] [KukaEACHardwareInterface]: External control finished
[robot_manager_node-12] [INFO] [1731400849.803584410] [test2.robot_manager]: Activated control mode handler and event broadcaster
[control_node-11] [INFO] [1731400855.662690655] [resource_manager]: 'activate' hardware 'test2_lbr_iisy11_r1300'
[control_node-11] [INFO] [1731400858.899646691] [KukaEACHardwareInterface]: External control is active
[control_node-11] [INFO] [1731400858.900010566] [KukaEACHardwareInterface]: External control session started successfully
[control_node-11] [INFO] [1731400858.900057061] [resource_manager]: Successful 'activate' of hardware 'test2_lbr_iisy11_r1300'
[robot_manager_node-12] [INFO] [1731400858.927582787] [test2.robot_manager]: Successfully activated controllers
[control_node-11] [ERROR] [1731400860.895881274] [KukaEACHardwareInterface]: External control stopped by an error
[control_node-11] [ERROR] [1731400860.895900683] [KukaEACHardwareInterface]: Session suspended
We are experiencing significant difficulties in setting up a dual arm configuration using the provided KUKA launch files and drivers. We have both robotic arms integrated within a single URDF with the appropriate hardware systems configured, as we have additional links in the kinematic chain that are fixed and currently hardcoded.
What We Have Tried:
Despite these attempts, we have encountered persistent issues such as controllers failing to load, errors relating to missing type definitions, and namespace conflicts or the control node claiming all hardware resources from the whole URDF instead of only the namespaced one.
I will add our launch file for reference, as well as the trace logs from the command line, detailing the exact commands we used and the resulting error messages. Any insights into the proper setup or configuration adjustments that could help resolve these issues would be greatly appreciated.
Launch File:
controllers.yaml
Driver Config YAMLs:
Additionally we also have the same files loaded for the right arm joints and passed to the right control nodes.
For each arm in our URDF we load the appropriate ros2_control like so:
What we have noticed is that each control node launched claims both left_system and right_system so all the resources are claimed multiple times regardless of namespace setup and the same happens with the provided multi_robot_startup.
Below is the commands we execute and the relevant terminal trace:
Always the arm that is launched second from the launch file fails, and if the IPs are switched, the arm that previously couldn't connect, now connect normally (even though both connect individually).
The tracelog: