You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: harmonic/ros2_interop.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Start a fresh ROS 2 Python launch file or add the following nodes in your projec
20
20
1. A robot model development and test setup
21
21
2. Configure RViz (and other ROS 2 tools) to control a robot model simulated by a Gazebo world
22
22
23
-
Note: The full source code for this tutorial can be found in the [ros_gz_example_brigup package](https://github.com/gazebosim/ros_gz_project_template/tree/main/ros_gz_example_bringup/launch) launch files.
23
+
Note: The full source code for this tutorial can be found in the [ros_gz_example_bringup package](https://github.com/gazebosim/ros_gz_project_template/tree/main/ros_gz_example_bringup/launch) launch files.
Copy file name to clipboardExpand all lines: harmonic/ros_gz_project_template_guide.md
+43-5Lines changed: 43 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -32,15 +32,53 @@ In this guide, you will learn how to use the `ros_gz_project_template` to create
32
32
33
33
At this point you'll have the following packages in your project:
34
34
35
-
*`ros_gz_example_description` - holds the SDF description of the simulated system and any other simulation assets.
36
-
Simulation assets means your models or robot descriptions in URDF or SDF, meshes and materials files to help visualize different parts of the robot and finally compiling all these elements in a simulated world SDF. Existing assets can be used by installing the models directory and exporting the paths to your environment.
37
-
Setting up paths can be also automated using colcon environment hooks with a [DSV file](https://colcon.readthedocs.io/en/released/developer/environment.html?highlight=dsv#dsv-files) prepending the model share path to Gazebo resource path.
35
+
*`ros_gz_example_application` - holds ROS 2 specific code and configurations. Namely where control, planning or any high level algoritms reside.
36
+
37
+
<pre> ├── CMakeLists.txt
38
+
├── package.xml
39
+
├── <spanstyle="color:#12488B"><b>src</b></span>
40
+
└── ...
41
+
</pre>
42
+
43
+
*`ros_gz_example_bringup` - holds launch files and high level utilities, communication bridge between ROS and Gazebo. Any robot or hardware specific configurations go here.
*`ros_gz_example_bringup` - holds launch files and high level utilities, communication bridge between ROS and Gazebo. Any robot or hardware specific configurations go here.
75
+
## Accessing Simulation Assets
76
+
77
+
Simulation assets include your models or robot descriptions in URDF or SDF, meshes and materials files to help visualize different parts of the robot and finally compiling all these elements in a simulated world SDF. Gazebo offers a few different mechanisms for locating those, initializing it's search on `GZ_SIM_RESOURCE_PATH` environment variable, see gz-sim API on [finding resources](https://gazebosim.org/api/sim/8/resources.html) for more details.
78
+
79
+
There is a difference in how ROS and Gazebo resolves URIs, that the ROS side can handle `package://` URIs, but by default SDFormat only supports `model://`. Now `libsdformat` can convert `package://` to `model://` URIs. So existing simulation assets can be loaded by "installing" the models directory and exporting the model paths to your environment.
80
+
81
+
This can be automated using colcon environment hooks (shell scripts provided by a ROS package) in a [DSV file](https://colcon.readthedocs.io/en/released/developer/environment.html?highlight=dsv#dsv-files). Whenever you source the setup file in a workspace these environment hooks are also being sourced. See an [example](https://github.com/gazebosim/ros_gz_project_template/blob/main/ros_gz_example_gazebo/hooks/ros_gz_example_gazebo.dsv.in) of prepending the model share path to `GZ_SIM_RESOURCE_PATH` which enables Gazebo to load models from a ROS package using the `model://` URI.
0 commit comments