Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated launch files from setup assistant not working #3165

Open
PietroValerio opened this issue Dec 16, 2024 · 6 comments
Open

Generated launch files from setup assistant not working #3165

PietroValerio opened this issue Dec 16, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@PietroValerio
Copy link

Description

I tried to run the move group launch file generated from the setup assistant, and i get only an error instead of working.

ros2 launch ur_cell_moveit_config move_group.launch.py --debug
[DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.IncludeLaunchDescription'
[INFO] [launch]: All log files can be found below /home/valerio/.ros/log/2024-12-16-12-28-55-613277-Hades-6998
[INFO] [launch]: Default logging verbosity is set to DEBUG
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7d169b32c4a0>'
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7d169b32c4a0>''<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x7d169a1c2180>'
Executing <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_service.py:228> exception=TypeError("Expected 'value' to be one of [<class 'float'>, <class 'int'>, <class 'str'>, <class 'bool'>, <class 'bytes'>], but got '()' of type '<class 'tuple'>'") created at /opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_service.py:319> took 0.102 seconds
[DEBUG] [launch]: An exception was raised in an async action/event
[DEBUG] [launch]: Traceback (most recent call last):
  File "/opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_service.py", line 343, in run_async
    raise exception_to_raise
  File "/opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_service.py", line 230, in _process_one_event
    await self.__process_event(next_event)
  File "/opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_service.py", line 250, in __process_event
    visit_all_entities_and_collect_futures(entity, self.__context))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ros/jazzy/lib/python3.12/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/jazzy/lib/python3.12/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/jazzy/lib/python3.12/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/jazzy/lib/python3.12/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/jazzy/lib/python3.12/site-packages/launch/action.py", line 109, in visit
    return self.execute(context)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ros/jazzy/lib/python3.12/site-packages/launch_ros/actions/node.py", line 490, in execute
    self._perform_substitutions(context)
  File "/opt/ros/jazzy/lib/python3.12/site-packages/launch_ros/actions/node.py", line 445, in _perform_substitutions
    evaluated_parameters = evaluate_parameters(context, self.__parameters)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ros/jazzy/lib/python3.12/site-packages/launch_ros/utilities/evaluate_parameters.py", line 169, in evaluate_parameters
    output_params.append(evaluate_parameter_dict(context, param))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ros/jazzy/lib/python3.12/site-packages/launch_ros/utilities/evaluate_parameters.py", line 141, in evaluate_parameter_dict
    ensure_argument_type(value, (float, int, str, bool, bytes), 'value')
  File "/opt/ros/jazzy/lib/python3.12/site-packages/launch/utilities/ensure_argument_type_impl.py", line 73, in ensure_argument_type
    raise TypeError(error_msg_template.format(
TypeError: Expected 'value' to be one of [<class 'float'>, <class 'int'>, <class 'str'>, <class 'bool'>, <class 'bytes'>], but got '()' of type '<class 'tuple'>'

[ERROR] [launch]: Caught exception in launch (see debug for traceback): Expected 'value' to be one of [<class 'float'>, <class 'int'>, <class 'str'>, <class 'bool'>, <class 'bytes'>], but got '()' of type '<class 'tuple'>'
[DEBUG] [launch.launch_context]: emitting event: 'launch.events.Shutdown'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7d169a8c9430>'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7d169a8c9430>''<launch.event_handlers.on_shutdown.OnShutdown object at 0x7d169a02a690>'

ROS Distro

Jazzy

OS and version

Ubuntu 24.04

Source or binary build?

Source

If binary, which release version?

No response

If source, which branch?

main

Which RMW are you using?

None

Steps to Reproduce

run the generated launch file

Expected behavior

should work

Actual behavior

Error as shown in description

Backtrace or Console output

No response

@PietroValerio PietroValerio added the bug Something isn't working label Dec 16, 2024
@sea-bass
Copy link
Contributor

What if you remove the --debug? I think that argument doesn't quite work like that for launch files.

@PietroValerio
Copy link
Author

PietroValerio commented Dec 16, 2024

What if you remove the --debug? I think that argument doesn't quite work like that for launch files.

if i remove that argument I get only this error

TypeError: Expected 'value' to be one of [<class 'float'>, <class 'int'>, <class 'str'>, <class 'bool'>, <class 'bytes'>], but got '()' of type'<class 'tuple'>

[ERROR] [launch]: Caught exception in launch (see debug for traceback): Expected 'value' to be one of [<class 'float'>, <class 'int'>, <class 'str'>, <class 'bool'>, <class 'bytes'>], but got '()' of type '<class 'tuple'>' 

@sea-bass
Copy link
Contributor

Hmm... I might start commenting out different components in the launch file to see where the bad parameter definition is, then.

Quite likely there's a bug, but we'll need to find exactly where. Thanks!

@mikeferguson
Copy link
Contributor

From what I've seen, the two areas that are kinda brittle with regards the to the move_group launch file are the moveit_controllers and sensors_3d configurations - if you can post the related generated YAML files, we might notice something that is off

@PietroValerio
Copy link
Author

I don't use 3d sensors, so no config file,the moveit_controllers yaml is

moveit_controller_manager: moveit_simple_controller_manager/MoveItSimpleControllerManager

moveit_simple_controller_manager:
  controller_names:
    - scaled_joint_trajectory_controller
    - ur_hand_controller

  scaled_joint_trajectory_controller:
    type: FollowJointTrajectory
    joints:
      - ur10e_shoulder_pan_joint
      - ur10e_shoulder_lift_joint
      - ur10e_elbow_joint
      - ur10e_wrist_1_joint
      - ur10e_wrist_2_joint
      - ur10e_wrist_3_joint
    action_ns: follow_joint_trajectory
    default: true
  ur_hand_controller:
    type: GripperCommand
    joints:
      - gripper_finger_joint
    action_ns: gripper_cmd
    default: true

If you need more info let me know!

@sea-bass
Copy link
Contributor

sea-bass commented Dec 17, 2024

I would think the motion planning ones, like ompl_planning.yaml are also susceptible to having outdated generated structure. What do those look like?

If you can put your whole generated package on github or something, we can take a look.

EDIT: I Just went through the entire MoveIt Setup Assistant tutorial with the Franka (https://moveit.picknik.ai/main/doc/examples/setup_assistant/setup_assistant_tutorial.html), and it worked fine for me. So there must be something specific to this setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants