moveit2
moveit2 copied to clipboard
Launch Error
Description
I have a problem with launcher. This problem is in source build installation, not binary. When I use binary, it works correctly. But when I install MoveIt 2 from source, it doesn't work. Note, tutorials launch files works without problems.
My environment
- ROS Distro: Humble
- OS Version: Ubuntu 22.04
- Source build branch humble
- Cyclone DDS
Steps to reproduce
I created a moveit package using setup_assistant. Its name is moveit2_package. After building and sourcing the workspace, I launched the launch file.
$ ros2 launch moveit2_package demo.launch.py
Expected behaviour
Opening RViz2 with the robot It is correct when I install MoveIt 2 from binary!
Actual behaviour
An error occured.
Backtrace or Console output
[ERROR] [launch]: Caught exception in launch (see debug for traceback): 'capabilities'
The output of
ros2 launch moveit2_package demo.launch.py --debug
is:
[DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.IncludeLaunchDescription'
[INFO] [launch]: All log files can be found below /home/aagiser/.ros/log/2024-03-10-09-36-20-886303-DP5540-5655
[INFO] [launch]: Default logging verbosity is set to DEBUG
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7bc621cb04c0>'
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7bc621cb04c0>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x7bc6231653c0>'
[DEBUG] [launch.launch_description_source]: Traceback (most recent call last):
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_source.py", line 69, in try_get_launch_description_without_context
return self._get_launch_description(expanded_location)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_sources/python_launch_description_source.py", line 51, in _get_launch_description
return get_launch_description_from_python_launch_file(location)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 68, in get_launch_description_from_python_launch_file
return getattr(launch_file_module, 'generate_launch_description')()
File "/home/aagiser/FUM6R-WS/install/moveit2_package/share/moveit2_package/launch/move_group.launch.py", line 7, in generate_launch_description
return generate_move_group_launch(moveit_config)
File "/home/aagiser/ws_moveit2/install/moveit_configs_utils/lib/python3.10/site-packages/moveit_configs_utils/launches.py", line 203, in generate_move_group_launch
default_value=moveit_config.move_group_capabilities["capabilities"],
KeyError: 'capabilities'
[DEBUG] [launch.launch_description_source]: Failed to load the launch file without a context: 'capabilities'
Executing <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py:228> exception=KeyError('capabilities') created at /opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py:318> took 0.566 seconds
[DEBUG] [launch]: An exception was raised in an async action/event
[DEBUG] [launch]: Traceback (most recent call last):
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py", line 336, in run_async
raise completed_tasks_exceptions[0]
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py", line 230, in _process_one_event
await self.__process_event(next_event)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py", line 250, in __process_event
visit_all_entities_and_collect_futures(entity, self.__context))
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
[Previous line repeated 1 more time]
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
sub_entities = entity.visit(context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/action.py", line 108, in visit
return self.execute(context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/actions/include_launch_description.py", line 148, in execute
launch_description = self.__launch_description_source.get_launch_description(context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_source.py", line 84, in get_launch_description
self._get_launch_description(self.__expanded_location)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_sources/python_launch_description_source.py", line 51, in _get_launch_description
return get_launch_description_from_python_launch_file(location)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 68, in get_launch_description_from_python_launch_file
return getattr(launch_file_module, 'generate_launch_description')()
File "/home/aagiser/FUM6R-WS/install/moveit2_package/share/moveit2_package/launch/move_group.launch.py", line 7, in generate_launch_description
return generate_move_group_launch(moveit_config)
File "/home/aagiser/ws_moveit2/install/moveit_configs_utils/lib/python3.10/site-packages/moveit_configs_utils/launches.py", line 203, in generate_move_group_launch
default_value=moveit_config.move_group_capabilities["capabilities"],
KeyError: 'capabilities'
[ERROR] [launch]: Caught exception in launch (see debug for traceback): 'capabilities'
[DEBUG] [launch.launch_context]: emitting event: 'launch.events.Shutdown'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7bc6231653f0>'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7bc6231653f0>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x7bc62165acb0>'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7bc6231653f0>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x7bc623165d80>'
Getting the same error on iron too, my environment:
- ROS Distro: Iron
- OS Version: Ubuntu 22.04
- Source build branch iron
Project is a custom urdf. Haven't tried moveit2 with binary, will now!
The output of
ros2 launch moveit2_package demo.launch.py --debug
is: ...
I got the same error on the same setup.
Probably because of https://github.com/ros-planning/moveit2/pull/2696 ?
any luck with this issue?
I am having the same issue when launching "ros2 launch
when i install moveit2 from build from source, then i don't get this error "[ERROR] [launch]: Caught exception in launch (see debug for traceback): 'capabilities'". But it is causing the robot model to not load in rviz.
i was looking for previous version number than "ros-iron-moveit/jammy,now 2.8.0-1jammy.20240213.190919 amd64 [installed]" but was unable to figure out which the previous version number is. Was thinking of installing an older version to get around the issue.
apt list -a ros-iron-moveit Listing... Done ros-iron-moveit/jammy,now 2.8.0-1jammy.20240213.190919 amd64 [installed]
I recently experienced the same error when building a custom panda setup with the moveit_setup_assistant. I eventually traced my error to having built the colcon moveit_ws as instructed in their tutorial here: https://moveit.picknik.ai/humble/doc/tutorials/getting_started/getting_started.html. After removing the old log, install, and build folders from that old workspace in addition to my new workspace, I was able to launch my custom configuration based on the panda arm. My new workspace just included the panda_description package and my newly generated package that was generated by the setup_assistant and based on panda description package.
I also had a similar problem
~$ ros2 launch mycobot_moveit demo.launch.py --debug
[DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.IncludeLaunchDescription'
[INFO] [launch]: All log files can be found below /home/kairos/.ros/log/2024-04-15-14-29-22-598832-kairos-ubuntu22-109096
[INFO] [launch]: Default logging verbosity is set to DEBUG
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7f45a82b0400>'
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7f45a82b0400>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x7f45a973af80>'
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
[DEBUG] [launch.launch_description_source]: Traceback (most recent call last):
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_source.py", line 69, in try_get_launch_description_without_context
return self._get_launch_description(expanded_location)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_sources/python_launch_description_source.py", line 51, in _get_launch_description
return get_launch_description_from_python_launch_file(location)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 68, in get_launch_description_from_python_launch_file
return getattr(launch_file_module, 'generate_launch_description')()
File "/home/kairos/ros2WS/install/mycobot_moveit/share/mycobot_moveit/launch/move_group.launch.py", line 7, in generate_launch_description
return generate_move_group_launch(moveit_config)
File "/home/kairos/ros2WS/install/moveit_configs_utils/lib/python3.10/site-packages/moveit_configs_utils/launches.py", line 204, in generate_move_group_launch
default_value=moveit_config.move_group_capabilities["capabilities"],
KeyError: 'capabilities'
[DEBUG] [launch.launch_description_source]: Failed to load the launch file without a context: 'capabilities'
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Executing <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py:228> exception=KeyError('capabilities') created at /opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py:318> took 0.363 seconds
[DEBUG] [launch]: An exception was raised in an async action/event
[DEBUG] [launch]: Traceback (most recent call last):
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py", line 336, in run_async
raise completed_tasks_exceptions[0]
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py", line 230, in _process_one_event
await self.__process_event(next_event)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_service.py", line 250, in __process_event
visit_all_entities_and_collect_futures(entity, self.__context))
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
[Previous line repeated 1 more time]
File "/opt/ros/humble/lib/python3.10/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
sub_entities = entity.visit(context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/action.py", line 108, in visit
return self.execute(context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/actions/include_launch_description.py", line 148, in execute
launch_description = self.__launch_description_source.get_launch_description(context)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_source.py", line 84, in get_launch_description
self._get_launch_description(self.__expanded_location)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_sources/python_launch_description_source.py", line 51, in _get_launch_description
return get_launch_description_from_python_launch_file(location)
File "/opt/ros/humble/lib/python3.10/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 68, in get_launch_description_from_python_launch_file
return getattr(launch_file_module, 'generate_launch_description')()
File "/home/kairos/ros2WS/install/mycobot_moveit/share/mycobot_moveit/launch/move_group.launch.py", line 7, in generate_launch_description
return generate_move_group_launch(moveit_config)
File "/home/kairos/ros2WS/install/moveit_configs_utils/lib/python3.10/site-packages/moveit_configs_utils/launches.py", line 204, in generate_move_group_launch
default_value=moveit_config.move_group_capabilities["capabilities"],
KeyError: 'capabilities'
[ERROR] [launch]: Caught exception in launch (see debug for traceback): 'capabilities'
[DEBUG] [launch.launch_context]: emitting event: 'launch.events.Shutdown'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7f45a9738a90>'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7f45a9738a90>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x7f45a7b1e9b0>'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7f45a9738a90>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x7f45a55314b0>'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7f45a9738a90>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x7f45a97385b0>'
I don't know if it's the right solution, but I solved it by editing the moveit_configs_utils code.
at ~/ros_ws/src/moveit2/moveit_configs_utils/moveit_configs_utils/launches.py line203
default_value=moveit_config.move_group_capabilities["capabilities"], -> default_value=moveit_config.move_group_capabilities,
I also have the same problem and could not solve it with the solutions provided so far, any other ideas?
[INFO] [launch]: Default logging verbosity is set to INFO
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
[ERROR] [launch]: Caught exception in launch (see debug for traceback): 'capabilities'