ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to start 'gz sim' from a yaml launch file ?

asked 2023-04-28 08:41:46 -0600

SébastienL gravatar image


I'd like to start 'gz sim' from my yaml launch-file, I read here that it's easy in python with the ExecuteProcess class. But when I tried to use

  # gazebo world
  - ExecuteProcess:

I got the error [ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [yml]: Unrecognized entity of the type: ExecuteProcess when I launched the file with ros2 launch my_file.yml

I did not found either a doc that help translate from Python class to Yaml.

Linux version 5.19.0-40-generic, Ubuntu 11.3.0-1ubuntu1~22.04

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2023-05-02 07:28:20 -0600

SébastienL gravatar image

If anyone is interested I succeed with this launch :

  # gazebo world
  - executable:
      cmd: gz sim -v 1 -r my_world.sdf

If anyone knows where to find the full doc of the yml launch file, I'm still interested

edit flag offensive delete link more

Question Tools



Asked: 2023-04-28 08:41:46 -0600

Seen: 138 times

Last updated: May 02 '23