Skip to content

Example launch error with robot arg when using docker composer file #34

@Joao-G-Martins

Description

@Joao-G-Martins

Hello!
I found an error when running the default demo.

When running
docker compose up simple-room-demo
or even when installing all dependencies on my system and running it with
ros2 launch grab2_behavior_tree bt_demo.launch.py robot:=panda world:=table behavior:=collect_cubes
The same that is in the composer file, I get this error:

[ERROR] [launch]: Caught exception in launch (see debug for traceback): local variable 'robot_arg' referenced before assignment

After digging into the launch files, I found out that inside the launch file, there is an if/else with the robot:

 if robot == 'franka':
        robot_arg = 'franka'
        jc_action_arg = '/panda_arm_controller/follow_joint_trajectory'
        gc_action_arg = '/panda_hand_controller/gripper_cmd'

However, in the composer it is like this:

  simple-room-demo:
    extends: grab2
    command: >
      ros2 launch grab2_behavior_tree bt_demo.launch.py
      robot:=panda
      world:=table
      behavior:=collect_cubes

Calling the robot Panda, which is not listed inside the if/else, instead of Franka.

I hope you can fix it so everyone can test it.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions