Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 1.0.15
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version jazzy
Last Updated 2025-06-18
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Aditya Pande
  • Alejandro Hernandez

Authors

  • Addisu Taddese
  • Carlos Agüero
  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.gazebosim.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

1.0.15 (2025-06-12)

  • OS agnostic 'which' command (#762)
  • ros_gz_sim: Added support for passing initial_sim_time to Gazebo. (backport #756) (#759)
  • Contributors: Griffin Tabor, mergify[bot]

1.0.14 (2025-05-26)

  • Fix debug_env (#747) (#749)
  • Contributors: mergify[bot]

1.0.13 (2025-05-23)

  • Log environment variables with which gazebo was launched (#680) (#744)
  • Contributors: mergify[bot]

1.0.12 (2025-05-06)

  • Spawn, set pose and delete entities using ROS 2 (backport #705) (#733)
  • Added codespell pre-commit hook. (#721) (#722)
  • Add pre commit (#718) (#719)
  • Contributors: mergify[bot]

1.0.11 (2025-03-21)

1.0.10 (2025-02-24)

1.0.9 (2025-02-12)

  • Fix spelling in entity creation (#688) (#689) (cherry picked from commit 5e3b0730359a4f3f23cb26f6083ae5620b9a5ea1) Co-authored-by: Leander Stephen D'Souza <<leanderdsouza1234@gmail.com>>
  • Contributors: mergify[bot]

1.0.8 (2025-01-14)

  • Shutdown explicitly while existing (#623) (#679) (cherry picked from commit 550ef7bd800c0dcc32ec7813168ef653ed169c89) Co-authored-by: ChenYing Kuo (CY) <<evshary@gmail.com>>

  • Merge pull request #670 from gazebosim/ahcorde/jazzy/bp/663 [backport Jazzy] Improve argument parsing in Actions (#663)

  • Fix linter errors

  • Improve argument parsing in Actions The [RosGzBridge]{.title-ref} and [GzServer]{.title-ref} now support different spellings for boolean arguments ([True]{.title-ref}, [true]{.title-ref}). This also simplifies how conditionals are used to create composable nodes by evaluating the conditionals and using them as regular Python booleans instead of relying on [PythonExpression]{.title-ref}. It was actually the [PythonExpression]{.title-ref} that was preventing support of boolean arguments spelled [true]{.title-ref}/[false]{.title-ref}.

  • Set env path (#659) (#661) (cherry picked from commit 0eae6ffbaabb514c9a80e6add1f49f16ade72a2c) Co-authored-by: Tatsuro Sakaguchi <<tacchan.mello.ioiq@gmail.com>>

  • Use member variables instead. (#653) (#655) (cherry picked from commit 5c1251a658ad8dd276664c2c88300d27572e25da) Co-authored-by: Carlos Agüero <<caguero@openrobotics.org>>

  • Move gzserver logic to its action (#646) (#649) (cherry picked from commit 6bbb9e405856e23f445f9f8fa87f27ccbff4d114) Co-authored-by: Carlos Agüero <<caguero@openrobotics.org>>

  • Add a way to pass extra parameters to ros_gz_bridge (#628) (#648)

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/gz_server.launch
      • world_sdf_file [default: empty.sdf]
      • world_sdf_string [default: ]
      • container_name [default: ros_gz_container]
      • create_own_container [default: False]
      • use_composition [default: False]
  • launch/gz_spawn_model.launch
      • world [default: ]
      • file [default: ]
      • model_string [default: ]
      • topic [default: ]
      • entity_name [default: ]
      • allow_renaming [default: False]
      • x [default: ]
      • y [default: ]
      • z [default: ]
      • roll [default: ]
      • pitch [default: ]
      • yaw [default: ]
  • launch/ros_gz_sim.launch
      • bridge_name
      • config_file
      • container_name [default: ros_gz_container]
      • create_own_container [default: False]
      • namespace [default: ]
      • use_composition [default: False]
      • use_respawn [default: False]
      • log_level [default: info]
      • bridge_params [default: ]
      • world_sdf_file [default: empty.sdf]
      • world_sdf_string [default: ]
  • launch/ros_gz_spawn_model.launch
      • bridge_name
      • config_file
      • container_name [default: ros_gz_container]
      • create_own_container [default: False]
      • namespace [default: ]
      • use_composition [default: False]
      • use_respawn [default: False]
      • log_level [default: info]
      • bridge_params [default: ]
      • world [default: ]
      • file [default: ]
      • model_string [default: ]
      • topic [default: ]
      • entity_name [default: ]
      • allow_renaming [default: False]
      • x [default: 0.0]
      • y [default: 0.0]
      • z [default: 0.0]
      • roll [default: 0.0]
      • pitch [default: 0.0]
      • yaw [default: 0.0]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.1.9
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version kilted
Last Updated 2025-06-18
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Aditya Pande
  • Alejandro Hernandez

Authors

  • Addisu Taddese
  • Carlos Agüero
  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.gazebosim.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

2.1.9 (2025-06-12)

  • OS agnostic 'which' command (#762) (#763)
  • ros_gz_sim: Added support for passing initial_sim_time to Gazebo. (#756) (#758)
  • Contributors: mergify[bot]

2.1.8 (2025-05-26)

  • Fix debug_env (#747) (#748)
  • Log environment variables with which gazebo was launched (#680) (#743)
  • Contributors: mergify[bot]

2.1.7 (2025-05-06)

  • Spawn, set pose and delete entities using ROS 2 (#705)
  • use target_link_libraries instead of ament_target_dependencies (#730)
  • Added codespell pre-commit hook. (#721)
  • Add pre commit (#718)
  • Contributors: Alejandro Hernández Cordero, Khaled Gabr, Leander Stephen D'Souza

2.1.6 (2025-03-21)

2.1.5 (2025-02-24)

2.1.4 (2025-02-12)

  • Fix spelling in entity creation (#688)
  • Use PIMPL pattern in gzserver (#683)
  • Expose header for [GzServer]{.title-ref} (#681)
  • Contributors: Addisu Z. Taddese, Leander Stephen D'Souza, Patrick Roncagliolo

2.1.3 (2025-01-14)

  • Shutdown explicitly while existing (#623)

  • Merge pull request #663 from azeey/improve_arg_parsing The [RosGzBridge]{.title-ref} and [GzServer]{.title-ref} now support different spellings for boolean arguments ([True]{.title-ref}, [true]{.title-ref}). This also simplifies how conditionals are used to create composable nodes by evaluating the conditionals and using them as regular Python booleans instead of relying on [PythonExpression]{.title-ref}. It was actually the [PythonExpression]{.title-ref} that was preventing support of boolean arguments spelled [true]{.title-ref}/[false]{.title-ref}.

  • Fix linter errors

  • Improve argument parsing in Actions The [RosGzBridge]{.title-ref} and [GzServer]{.title-ref} now support different spellings for boolean arguments ([True]{.title-ref}, [true]{.title-ref}). This also simplifies how conditionals are used to create composable nodes by evaluating the conditionals and using them as regular Python booleans instead of relying on [PythonExpression]{.title-ref}. It was actually the [PythonExpression]{.title-ref} that was preventing support of boolean arguments spelled [true]{.title-ref}/[false]{.title-ref}.

  • Set env path (#659)

  • Use member variables instead. (#653)

  • Move gzserver logic to its action (#646)

  • Add a way to pass extra parameters to ros_gz_bridge (#628)

    * Add bridge_params argument to ros_gz_bridge Co-authored-by: Alejandro Hernández Cordero <<ahcorde@gmail.com>> Co-authored-by: Wiktor Bajor <<69388767+Wiktor-99@users.noreply.github.com>>

  • Add remove entity node (#629)

  • Contributors: Aarav Gupta, Addisu Z. Taddese, Alejandro Hernández Cordero, Carlos Agüero, ChenYing Kuo (CY), Tatsuro Sakaguchi, Wiktor

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/gz_server.launch
      • world_sdf_file [default: empty.sdf]
      • world_sdf_string [default: ]
      • container_name [default: ros_gz_container]
      • create_own_container [default: False]
      • use_composition [default: False]
  • launch/gz_spawn_model.launch
      • world [default: ]
      • file [default: ]
      • model_string [default: ]
      • topic [default: ]
      • entity_name [default: ]
      • allow_renaming [default: False]
      • x [default: ]
      • y [default: ]
      • z [default: ]
      • roll [default: ]
      • pitch [default: ]
      • yaw [default: ]
  • launch/ros_gz_sim.launch
      • bridge_name
      • config_file
      • container_name [default: ros_gz_container]
      • create_own_container [default: False]
      • namespace [default: ]
      • use_composition [default: False]
      • use_respawn [default: False]
      • log_level [default: info]
      • bridge_params [default: ]
      • world_sdf_file [default: empty.sdf]
      • world_sdf_string [default: ]
  • launch/ros_gz_spawn_model.launch
      • bridge_name
      • config_file
      • container_name [default: ros_gz_container]
      • create_own_container [default: False]
      • namespace [default: ]
      • use_composition [default: False]
      • use_respawn [default: False]
      • log_level [default: info]
      • bridge_params [default: ]
      • world [default: ]
      • file [default: ]
      • model_string [default: ]
      • topic [default: ]
      • entity_name [default: ]
      • allow_renaming [default: False]
      • x [default: 0.0]
      • y [default: 0.0]
      • z [default: 0.0]
      • roll [default: 0.0]
      • pitch [default: 0.0]
      • yaw [default: 0.0]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 3.0.2
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version ros2
Last Updated 2025-06-18
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Aditya Pande
  • Alejandro Hernandez

Authors

  • Addisu Taddese
  • Carlos Agüero
  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.gazebosim.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

3.0.2 (2025-06-12)

  • OS agnostic 'which' command (#762) (#765)
  • ros_gz_sim: Added support for passing initial_sim_time to Gazebo. (#756)
  • Contributors: Alejandro Hernandez Cordero, Martin Pecka, mergify[bot]

3.0.1 (2025-05-26)

  • Fix debug_env (#747)
  • Log environment variables with which gazebo was launched (#680)
  • Contributors: Alejandro Hernández Cordero, Arjo Chakravarty

3.0.0 (2025-05-06)

  • Spawn, set pose and delete entities using ROS 2 (#705)
  • use target_link_libraries instead of ament_target_dependencies (#730)
  • Added codespell pre-commit hook. (#721)
  • Add pre commit (#718)
  • Contributors: Alejandro Hernández Cordero, Khaled Gabr, Leander Stephen D'Souza

2.1.6 (2025-03-21)

2.1.5 (2025-02-24)

2.1.4 (2025-02-12)

  • Fix spelling in entity creation (#688)
  • Use PIMPL pattern in gzserver (#683)
  • Expose header for [GzServer]{.title-ref} (#681)
  • Contributors: Addisu Z. Taddese, Leander Stephen D'Souza, Patrick Roncagliolo

2.1.3 (2025-01-14)

  • Shutdown explicitly while existing (#623)

  • Merge pull request #663 from azeey/improve_arg_parsing The [RosGzBridge]{.title-ref} and [GzServer]{.title-ref} now support different spellings for boolean arguments ([True]{.title-ref}, [true]{.title-ref}). This also simplifies how conditionals are used to create composable nodes by evaluating the conditionals and using them as regular Python booleans instead of relying on [PythonExpression]{.title-ref}. It was actually the [PythonExpression]{.title-ref} that was preventing support of boolean arguments spelled [true]{.title-ref}/[false]{.title-ref}.

  • Fix linter errors

  • Improve argument parsing in Actions The [RosGzBridge]{.title-ref} and [GzServer]{.title-ref} now support different spellings for boolean arguments ([True]{.title-ref}, [true]{.title-ref}). This also simplifies how conditionals are used to create composable nodes by evaluating the conditionals and using them as regular Python booleans instead of relying on [PythonExpression]{.title-ref}. It was actually the [PythonExpression]{.title-ref} that was preventing support of boolean arguments spelled [true]{.title-ref}/[false]{.title-ref}.

  • Set env path (#659)

  • Use member variables instead. (#653)

  • Move gzserver logic to its action (#646)

  • Add a way to pass extra parameters to ros_gz_bridge (#628)

    * Add bridge_params argument to ros_gz_bridge Co-authored-by: Alejandro Hernández Cordero <<ahcorde@gmail.com>> Co-authored-by: Wiktor Bajor <<69388767+Wiktor-99@users.noreply.github.com>>

  • Add remove entity node (#629)

  • Contributors: Aarav Gupta, Addisu Z. Taddese, Alejandro Hernández Cordero, Carlos Agüero, ChenYing Kuo (CY), Tatsuro Sakaguchi, Wiktor Bajor

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/gz_server.launch
      • world_sdf_file [default: empty.sdf]
      • world_sdf_string [default: ]
      • container_name [default: ros_gz_container]
      • create_own_container [default: False]
      • use_composition [default: False]
  • launch/gz_spawn_model.launch
      • world [default: ]
      • file [default: ]
      • model_string [default: ]
      • topic [default: ]
      • entity_name [default: ]
      • allow_renaming [default: False]
      • x [default: ]
      • y [default: ]
      • z [default: ]
      • roll [default: ]
      • pitch [default: ]
      • yaw [default: ]
  • launch/ros_gz_sim.launch
      • bridge_name
      • config_file
      • container_name [default: ros_gz_container]
      • create_own_container [default: False]
      • namespace [default: ]
      • use_composition [default: False]
      • use_respawn [default: False]
      • log_level [default: info]
      • bridge_params [default: ]
      • world_sdf_file [default: empty.sdf]
      • world_sdf_string [default: ]
  • launch/ros_gz_spawn_model.launch
      • bridge_name
      • config_file
      • container_name [default: ros_gz_container]
      • create_own_container [default: False]
      • namespace [default: ]
      • use_composition [default: False]
      • use_respawn [default: False]
      • log_level [default: info]
      • bridge_params [default: ]
      • world [default: ]
      • file [default: ]
      • model_string [default: ]
      • topic [default: ]
      • entity_name [default: ]
      • allow_renaming [default: False]
      • x [default: 0.0]
      • y [default: 0.0]
      • z [default: 0.0]
      • roll [default: 0.0]
      • pitch [default: 0.0]
      • yaw [default: 0.0]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 0.254.2
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version iron
Last Updated 2024-07-03
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.254.2 (2024-07-03)

  • Merge pull request #564 from azeey/humble_to_iron Humble ➡️ Iron
  • Merge humble -> iron
  • 0.244.14
  • Changelog
  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • 0.244.13
  • Changelog
  • 0.244.12
  • Changelog
  • Contributors: Addisu Z. Taddese, Alejandro Hernández Cordero

0.254.1 (2024-04-08)

0.254.0 (2024-01-08)

  • Forward port: Add support for Harmonic/Humble pairing (#462)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.247.0 (2023-11-02)

  • set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#452) Co-authored-by: andermi <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.245.0 (2023-05-23)

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>, ros_ign_ci
  • Move packages and files to gz (#282)
  • Contributors: methylDragon

0.244.3 (2022-05-19)

  • [ros2] README updates (service bridge, Gazebo rename) (#252)
  • Fix linter tests

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 0.244.20
License Apache 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/gazebosim/ros_gz.git
VCS Type git
VCS Version humble
Last Updated 2025-06-12
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Tools for using Gazebo Sim simulation with ROS.

Additional Links

No additional links.

Maintainers

  • Alejandro Hernandez

Authors

  • Alejandro Hernandez

ROS + Gazebo Sim

This package contains things that make it convenient to integrate ROS with Gazebo, such as:

  • Launch files
  • ROS-enabled executables

Run Gazebo Sim

There’s a convenient launch file, try for example:

ros2 launch ros_gz_sim gz_sim.launch.py gz_args:="shapes.sdf"

Spawn entities

The create executable can be used to spawn SDF or URDF entities from:

  • A file on disk or from Gazebo Fuel
  • A ROS parameter

For example, start Gazebo Sim:

ros2 launch ros_gz_sim gz_sim.launch.py

then spawn a model:

ros2 run ros_gz_sim create -world default -file 'https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'

See more options with:

ros2 run ros_gz_sim create --helpshort

Using <gazebo_ros> to export model paths in package.xml

The <gazebo_ros> tag inside the <export> tag of a package.xml file can be used to add paths to GZ_SIM_RESOURCE_PATH and GZ_SIM_SYSTEM_PLUGIN_PATH, which are environment variables used to configure Gazebo search paths for resources (e.g. SDFormat files, meshes, etc) and plugins respectively.

The values in the attributes gazebo_model_path and gazebo_media_path are appended to GZ_SIM_RESOURCE_PATH. The value of plugin_path is appended to GZ_SIM_SYSTEM_PLUGIN_PATH. See the Finding resources tutorial to learn more about these environment variables.

The keyword ${prefix} can be used when setting these values and it will be expanded to the package’s share path (i.e., the value of ros2 pkg prefix --share <package name>)

<export>
   <gazebo_ros gazebo_model_path="${prefix}/models"/>
   <gazebo_ros gazebo_media_path="${prefix}/media"/>
   <gazebo_ros plugin_path="${prefix}/plugins"/>
</export>


Thus the required directory needs to be installed from CMakeLists.txt

install(DIRECTORY models
    DESTINATION share/${PROJECT_NAME})

In order to reference the models in a ROS package unambiguously, it is recommended to set the value of gazebo_model_path to be the parent of the prefix.

<export>
   <gazebo_ros gazebo_model_path="${prefix}/../"/>
</export>


Consider an example where we have a ROS package called my_awesome_pkg and it contains an SDFormat model cool cool_robot:

my_awesome_pkg
├── models
│   └── cool_robot
│       ├── model.config
│       └── model.sdf
└── package.xml

With gazebo_model_path="${prefix}/../ set up, we can reference the cool_robot model in a world file using the package name in the uri:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package ros_gz_sim

0.244.20 (2025-06-12)

  • OS agnostic 'which' command (#762) (#764)
  • Contributors: mergify[bot]

0.244.19 (2025-05-26)

  • Fix debug_env (#747) (#750)
  • Contributors: mergify[bot]

0.244.18 (2025-05-23)

  • Log environment variables with which gazebo was launched (backport #680) (#745)
  • Contributors: mergify[bot]

0.244.17 (2025-05-06)

0.244.16 (2024-07-22)

0.244.15 (2024-07-03)

0.244.14 (2024-04-08)

  • Support [<gazebo_ros>]{.title-ref} in [package.xml]{.title-ref} exports (#492) This copies the implementation from [gazebo_ros_paths.py]{.title-ref} to provide a way for packages to set resource paths from [package.xml]{.title-ref}. ` e.g. <export> <gazebo_ros gazebo_model_path="${prefix}/models"/> <gazebo_ros gazebo_media_path="${prefix}/models"/> </export>[ The value of `gazebo_model_path]{.title-ref} and [gazebo_media_path]{.title-ref} is appended to [GZ_SIM_RESOURCE_PATH]{.title-ref} The value of [plugin_path]{.title-ref} appended to [GZ_SIM_SYSTEM_PLUGIN_PATH]{.title-ref} ---------
  • Contributors: Addisu Z. Taddese

0.244.13 (2024-01-23)

0.244.12 (2023-12-13)

  • Add support for Harmonic/Humble pairing (#462)
  • Set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
  • Contributors: Addisu Z. Taddese, Michael Carroll

0.244.11 (2023-05-23)

0.244.10 (2023-05-03)

0.244.9 (2022-11-03)

  • Export ROS Stopwatch library (#299) (#322) New Stopwatch library needs to be exported and built as shared Co-authored-by: Michael Anderson <<anderson@mbari.org>>
  • Contributors: Michael Carroll

0.244.8 (2022-10-28)

0.244.7 (2022-10-12)

  • Fix launch substitutions for ign_args (#309)
    • Fix launch substitutions for ign_args
  • Merge pull request #275 (Galactic to Humble) Galactic to Humble
  • Merge branch 'ros2' into ports/galactic_to_ros2
  • Contributors: Michael Carroll

0.244.6 (2022-09-14)

0.244.5 (2022-09-12)

  • Fix missing msgs include and packages.xml deps (#292)
    • Fix missing msgs include and packages.xml deps
    • Add additional conditions to support gz sim invocation
    • Fix cpplint
  • Support ros_ign migration (#282) Clean up shared libraries, and tick-tock RosGzPointCloud Tick-tock launch args Hard-tock ign_ in sources Migrate ign, ign_, IGN_ for sources, launch, and test files Migrate IGN_XXX_VER, IGN_T, header guards Migrate launchfile, launchfile args, and test source references Migrate ros_ign_XXX and gz_gazebo -> gz_sim Migrate ros_ign_XXX project names Migrate Ign, ign-, IGN_DEPS, ign-gazebo Migrate ignitionrobotics, ignitionrobotics/ros_ign, osrf/ros_ign Migrate ignition-version, IGNITION_VERSION, Ignition <LIB>,

File truncated at 100 lines see the full file

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros_gz_sim at Robotics Stack Exchange