Skip to content

Launch Error #2734

Closed
Closed

Description

@aagiser

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'

Activity

  1. added
    bug
    on Mar 10, 2024
  2. aagiser commented on Mar 10, 2024

    @aagiser
    Author

    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>'
    
  3. BillyMazotti commented on Mar 12, 2024

    @BillyMazotti

    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!

  4. Jakub-Ivan-STUBA commented on Mar 12, 2024

    @Jakub-Ivan-STUBA

    The output of ros2 launch moveit2_package demo.launch.py --debug is:
    ...

    I got the same error on the same setup.

    Probably because of
    #2696 ?

  5. mink007 commented on Mar 13, 2024

    @mink007

    any luck with this issue?

    I am having the same issue when launching "ros2 launch demo.launch.py rviz_tutorial:=true "

  6. mink007 commented on Mar 14, 2024

    @mink007

    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]


  7. roshea6 commented on Apr 15, 2024

    @roshea6

    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.

  8. cananella commented on Apr 15, 2024

    @cananella

    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
    스크린샷 2024-04-15 14-28-16

    default_value=moveit_config.move_group_capabilities["capabilities"],
    -> default_value=moveit_config.move_group_capabilities,

    스크린샷 2024-04-15 14-39-02

  9. Vincenzo-Saffioti commented on May 14, 2024

    @Vincenzo-Saffioti

    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'
    
  10. yuan0623 commented on May 17, 2024

    @yuan0623

    eit2/moveit_c

    Too bad, this does not fix the same issue on my end.

  11. Schteve-Earl commented on May 30, 2024

    @Schteve-Earl

    Also getting this issue. Here's my console output, with and without the debug flags:

    [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'
    
    [INFO] [launch]: Default logging verbosity is set to DEBUG
    [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x717c5e501810>'
    [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x717c5e501810>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x717c5e8ea2c0>'
    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/ros/ros2_ws/install/ur10e_moveit_config/share/ur10e_moveit_config/launch/move_group.launch.py", line 7, in generate_launch_description
        return generate_move_group_launch(moveit_config)
      File "/home/ros/ros2_ws/build/moveit_configs_utils/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'
    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.615 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/ros/ros2_ws/install/ur10e_moveit_config/share/ur10e_moveit_config/launch/move_group.launch.py", line 7, in generate_launch_description
        return generate_move_group_launch(moveit_config)
      File "/home/ros/ros2_ws/build/moveit_configs_utils/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 0x717c5e500820>'
    [DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x717c5e500820>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x717c5e12a380>'
    [DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x717c5e500820>' ✓ '
    

    I'm on ros2 humble and using I'm using a ur10e moveit config that I just created, with no additions to the urdf. I did not set virtual joints or an end effector.

  12. yuan0623 commented on May 30, 2024

    @yuan0623

    Also getting this issue. Here's my console output, with and without the debug flags:

    [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'
    
    [INFO] [launch]: Default logging verbosity is set to DEBUG
    [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x717c5e501810>'
    [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x717c5e501810>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x717c5e8ea2c0>'
    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/ros/ros2_ws/install/ur10e_moveit_config/share/ur10e_moveit_config/launch/move_group.launch.py", line 7, in generate_launch_description
        return generate_move_group_launch(moveit_config)
      File "/home/ros/ros2_ws/build/moveit_configs_utils/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'
    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.615 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/ros/ros2_ws/install/ur10e_moveit_config/share/ur10e_moveit_config/launch/move_group.launch.py", line 7, in generate_launch_description
        return generate_move_group_launch(moveit_config)
      File "/home/ros/ros2_ws/build/moveit_configs_utils/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 0x717c5e500820>'
    [DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x717c5e500820>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x717c5e12a380>'
    [DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x717c5e500820>' ✓ '
    

    I'm on ros2 humble and using I'm using a ur10e moveit config that I just created, with no additions to the urdf. I did not set virtual joints or an end effector.

    I have fixed this issue by changing the line 199-206 into ld.add_action(DeclareLaunchArgument("capabilities", default_value="")) in the file ws_moveit/src/moveit2/moveit_configs_utils/moveit_configs_utils/launches.py

  13. Schteve-Earl commented on May 30, 2024

    @Schteve-Earl

    Also getting this issue. Here's my console output, with and without the debug flags:

    [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'
    
    [INFO] [launch]: Default logging verbosity is set to DEBUG
    [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x717c5e501810>'
    [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x717c5e501810>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x717c5e8ea2c0>'
    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/ros/ros2_ws/install/ur10e_moveit_config/share/ur10e_moveit_config/launch/move_group.launch.py", line 7, in generate_launch_description
        return generate_move_group_launch(moveit_config)
      File "/home/ros/ros2_ws/build/moveit_configs_utils/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'
    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.615 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/ros/ros2_ws/install/ur10e_moveit_config/share/ur10e_moveit_config/launch/move_group.launch.py", line 7, in generate_launch_description
        return generate_move_group_launch(moveit_config)
      File "/home/ros/ros2_ws/build/moveit_configs_utils/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 0x717c5e500820>'
    [DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x717c5e500820>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x717c5e12a380>'
    [DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x717c5e500820>' ✓ '
    

    I'm on ros2 humble and using I'm using a ur10e moveit config that I just created, with no additions to the urdf. I did not set virtual joints or an end effector.

    I have fixed this issue by changing the line 199-206 into ld.add_action(DeclareLaunchArgument("capabilities", default_value="")) in the file ws_moveit/src/moveit2/moveit_configs_utils/moveit_configs_utils/launches.py

    Same here.

    def generate_move_group_launch(moveit_config):
        ld = LaunchDescription()
    
        ld.add_action(DeclareBooleanLaunchArg("debug", default_value=False))
        ld.add_action(
            DeclareBooleanLaunchArg("allow_trajectory_execution", default_value=True)
        )
        ld.add_action(
            DeclareBooleanLaunchArg("publish_monitored_planning_scene", default_value=True)
        )
        # load non-default MoveGroup capabilities (space separated)
        # commented here
        # ld.add_action(
        #     DeclareLaunchArgument(
        #         "capabilities",
        #         default_value=moveit_config.move_group_capabilities["capabilities"],
        #     )
        # )
        # inhibit these default MoveGroup capabilities (space separated)
        ld.add_action(DeclareLaunchArgument("disable_capabilities", default_value=""))
    
        # do not copy dynamics information from /joint_states to internal robot monitoring
        # default to false, because almost nothing in move_group relies on this information
        ld.add_action(DeclareBooleanLaunchArg("monitor_dynamics", default_value=False))
    
        should_publish = LaunchConfiguration("publish_monitored_planning_scene")
    
        move_group_configuration = {
            "publish_robot_description_semantic": True,
            "allow_trajectory_execution": LaunchConfiguration("allow_trajectory_execution"),
            # Note: Wrapping the following values is necessary so that the parameter value can be the empty string
            # Commented here
            # "capabilities": ParameterValue(
            #     LaunchConfiguration("capabilities"), value_type=str
            # ),
            "disable_capabilities": ParameterValue(
                LaunchConfiguration("disable_capabilities"), value_type=str
            ),
            # Publish the planning scene of the physical robot so that rviz plugin can know actual robot
            "publish_planning_scene": should_publish,
            "publish_geometry_updates": should_publish,
            "publish_state_updates": should_publish,
            "publish_transforms_updates": should_publish,
            "monitor_dynamics": False,
        }
    
        move_group_params = [
            moveit_config.to_dict(),
            move_group_configuration,
        ]
    
        add_debuggable_node(
            ld,
            package="moveit_ros_move_group",
            executable="move_group",
            commands_file=str(moveit_config.package_path / "launch" / "gdb_settings.gdb"),
            output="screen",
            parameters=move_group_params,
            extra_debug_args=["--debug"],
            # Set the display variable, in case OpenGL code is used internally
            additional_env={"DISPLAY": os.environ["DISPLAY"]},
        )
        return ld
    

    I removed the launch argument as well as the capabilities parameter, and it works fine now. Do you know what the parameter is supposed to control?

  14. yuan0623 commented on May 30, 2024

    @yuan0623

    Also getting this issue. Here's my console output, with and without the debug flags:

    [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'
    
    [INFO] [launch]: Default logging verbosity is set to DEBUG
    [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x717c5e501810>'
    [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x717c5e501810>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x717c5e8ea2c0>'
    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/ros/ros2_ws/install/ur10e_moveit_config/share/ur10e_moveit_config/launch/move_group.launch.py", line 7, in generate_launch_description
        return generate_move_group_launch(moveit_config)
      File "/home/ros/ros2_ws/build/moveit_configs_utils/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'
    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.615 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/ros/ros2_ws/install/ur10e_moveit_config/share/ur10e_moveit_config/launch/move_group.launch.py", line 7, in generate_launch_description
        return generate_move_group_launch(moveit_config)
      File "/home/ros/ros2_ws/build/moveit_configs_utils/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 0x717c5e500820>'
    [DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x717c5e500820>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x717c5e12a380>'
    [DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x717c5e500820>' ✓ '
    

    I'm on ros2 humble and using I'm using a ur10e moveit config that I just created, with no additions to the urdf. I did not set virtual joints or an end effector.

    I have fixed this issue by changing the line 199-206 into ld.add_action(DeclareLaunchArgument("capabilities", default_value="")) in the file ws_moveit/src/moveit2/moveit_configs_utils/moveit_configs_utils/launches.py

    Same here.

    def generate_move_group_launch(moveit_config):
        ld = LaunchDescription()
    
        ld.add_action(DeclareBooleanLaunchArg("debug", default_value=False))
        ld.add_action(
            DeclareBooleanLaunchArg("allow_trajectory_execution", default_value=True)
        )
        ld.add_action(
            DeclareBooleanLaunchArg("publish_monitored_planning_scene", default_value=True)
        )
        # load non-default MoveGroup capabilities (space separated)
        # commented here
        # ld.add_action(
        #     DeclareLaunchArgument(
        #         "capabilities",
        #         default_value=moveit_config.move_group_capabilities["capabilities"],
        #     )
        # )
        # inhibit these default MoveGroup capabilities (space separated)
        ld.add_action(DeclareLaunchArgument("disable_capabilities", default_value=""))
    
        # do not copy dynamics information from /joint_states to internal robot monitoring
        # default to false, because almost nothing in move_group relies on this information
        ld.add_action(DeclareBooleanLaunchArg("monitor_dynamics", default_value=False))
    
        should_publish = LaunchConfiguration("publish_monitored_planning_scene")
    
        move_group_configuration = {
            "publish_robot_description_semantic": True,
            "allow_trajectory_execution": LaunchConfiguration("allow_trajectory_execution"),
            # Note: Wrapping the following values is necessary so that the parameter value can be the empty string
            # Commented here
            # "capabilities": ParameterValue(
            #     LaunchConfiguration("capabilities"), value_type=str
            # ),
            "disable_capabilities": ParameterValue(
                LaunchConfiguration("disable_capabilities"), value_type=str
            ),
            # Publish the planning scene of the physical robot so that rviz plugin can know actual robot
            "publish_planning_scene": should_publish,
            "publish_geometry_updates": should_publish,
            "publish_state_updates": should_publish,
            "publish_transforms_updates": should_publish,
            "monitor_dynamics": False,
        }
    
        move_group_params = [
            moveit_config.to_dict(),
            move_group_configuration,
        ]
    
        add_debuggable_node(
            ld,
            package="moveit_ros_move_group",
            executable="move_group",
            commands_file=str(moveit_config.package_path / "launch" / "gdb_settings.gdb"),
            output="screen",
            parameters=move_group_params,
            extra_debug_args=["--debug"],
            # Set the display variable, in case OpenGL code is used internally
            additional_env={"DISPLAY": os.environ["DISPLAY"]},
        )
        return ld
    

    I removed the launch argument as well as the capabilities parameter, and it works fine now. Do you know what the parameter is supposed to control?

    no idea.... sorry. :)

  15. 1 remaining item

  16. ukicomputers commented on Jul 21, 2024

    @ukicomputers

    +1 same issue here, just on Docker Rolling tutorial source image.

  17. WilliamAStreamline commented on Jul 27, 2024

    @WilliamAStreamline

    Same issue and the above changes to launches.py only seem to add more issues. Using Ubuntu 24.04 and Jazzy

  18. b-adkins commented on Aug 8, 2024

    @b-adkins

    I made a PR to revert the change: #2912

    In the meantime, 7ce2fa9 is the last working commit on the Humble branch.

  19. claralunasa commented on Aug 14, 2024

    @claralunasa

    I have the exact same issues and the changes to the launch file haven't solved it for me

  20. OneOneLiu commented on Aug 19, 2024

    @OneOneLiu

    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 스크린샷 2024-04-15 14-28-16

    default_value=moveit_config.move_group_capabilities["capabilities"], -> default_value=moveit_config.move_group_capabilities,

    스크린샷 2024-04-15 14-39-02

    Thanks, this solution works for me.

    To provide more context, I am working on Ubuntu 22.04, ROS humble in a docker container. I installed moveit2 from binary and used setup assistant to create config files for a customized robot arm and gripper, the ros2 launch my_robot_moveit_config demo.launch worked well, but when I built moveit2 from source (to use Python binding), the same launch file produced the error

    [ERROR] [launch]: Caught exception in launch (see debug for traceback): 'capabilities'
    
  21. mikeferguson commented on Oct 2, 2024

    @mikeferguson
    Contributor

    I've opened #3018 to fix this - looks like we need to backport to both humble and iron as well

  22. self-assigned this
    on Oct 2, 2024
  23. mikeferguson commented on Oct 16, 2024

    @mikeferguson
    Contributor

    Fix is merged into 'humble' (which this referenced) and 'main' branch. Still working on the 'iron' branch fix

  24. ktgilliam commented on Oct 21, 2024

    @ktgilliam

    Same issue and the above changes to launches.py only seem to add more issues. Using Ubuntu 24.04 and Jazzy

    +1 same setup, same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions