Skip to content

Commit 20ea55e

Browse files
authored
Update Ignition to Gz (#4)
1 parent 110d923 commit 20ea55e

10 files changed

+32
-32
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Format Status](https://github.com/MarqRazz/realsense2_gz_description/actions/workflows/format.yaml/badge.svg)](https://github.com/MarqRazz/realsense2_gz_description/actions/workflows/format.yaml)
44

5-
Description: This ROS 2 package is designed to be used in unison with [realsense2_description](https://github.com/IntelRealSense/realsense-ros/tree/ros2-master/realsense2_description) and allows for easy definition of Realsense cameras that can be simulated in Gazebo Fortress and newer. It may support other versions of Ignition Gazebo but this has not been tested.
5+
Description: This ROS 2 package is designed to be used in unison with [realsense2_description](https://github.com/IntelRealSense/realsense-ros/tree/ros2-master/realsense2_description) and allows for easy definition of Realsense cameras that can be simulated in Gazebo Fortress and newer. It may support other versions of Gazebo but this has not been tested.
66

77
## Running Example Launch
88

@@ -42,7 +42,7 @@ Then call the xacros and specify the same `name` and other optional arguments.
4242
This plugin can be started from your URDF or world.sdf file.
4343
```xml
4444
<gazebo>
45-
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
45+
<plugin filename="gz-sim-sensors-system" name="gz::sim::systems::Sensors">
4646
<render_engine>ogre2</render_engine>
4747
</plugin>
4848
</gazebo>

launch/example_realsense_gazebo.launch.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def generate_launch_description():
9595
condition=IfCondition(launch_rviz),
9696
)
9797

98-
ignition_spawn_entity = Node(
98+
gz_spawn_entity = Node(
9999
package="ros_gz_sim",
100100
executable="create",
101101
output="screen",
@@ -122,17 +122,17 @@ def generate_launch_description():
122122
)
123123

124124
# Bridge the camera data to ROS and match the default topics that the real camera would publish
125-
# Note the gz_topic_name comes from _realsense_model.gazebo.xacro defaults which defaults to `camera` here.
125+
# Note the gz_topic_name comes from <realsense_model>.gazebo.xacro which is defaulting to `camera` in this example.
126126
gazebo_bridge = Node(
127127
package="ros_gz_bridge",
128128
executable="parameter_bridge",
129129
parameters=[{"use_sim_time": True}],
130130
arguments=[
131-
"/camera/image@sensor_msgs/msg/Image[ignition.msgs.Image",
132-
"/camera/depth_image@sensor_msgs/msg/Image[ignition.msgs.Image",
133-
"/camera/points@sensor_msgs/msg/PointCloud2[ignition.msgs.PointCloudPacked",
134-
"/camera/camera_info@sensor_msgs/msg/CameraInfo[ignition.msgs.CameraInfo",
135-
"/clock@rosgraph_msgs/msg/Clock[ignition.msgs.Clock",
131+
"/camera/image@sensor_msgs/msg/Image[gz.msgs.Image",
132+
"/camera/depth_image@sensor_msgs/msg/Image[gz.msgs.Image",
133+
"/camera/points@sensor_msgs/msg/PointCloud2[gz.msgs.PointCloudPacked",
134+
"/camera/camera_info@sensor_msgs/msg/CameraInfo[gz.msgs.CameraInfo",
135+
"/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock",
136136
],
137137
remappings=[
138138
(
@@ -163,7 +163,7 @@ def generate_launch_description():
163163
robot_state_publisher_node,
164164
rviz_node,
165165
OpaqueFunction(function=launch_gz),
166-
ignition_spawn_entity,
166+
gz_spawn_entity,
167167
gazebo_bridge,
168168
]
169169

urdf/_d405.gazebo.xacro

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<robot name="gazebo_d405" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:ignition="http://gazebosim.org/schema">
2+
<robot name="gazebo_d405" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:gz="http://gazebosim.org/schema">
33

44
<xacro:include filename="$(find realsense2_gz_description)/urdf/rgb_camera.gazebo.xacro" />
55
<xacro:include filename="$(find realsense2_gz_description)/urdf/rgbd_camera.gazebo.xacro" />

urdf/_d415.gazebo.xacro

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<robot name="gazebo_d415" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:ignition="http://gazebosim.org/schema">
2+
<robot name="gazebo_d415" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:gz="http://gazebosim.org/schema">
33

44
<xacro:include filename="$(find realsense2_gz_description)/urdf/rgb_camera.gazebo.xacro" />
55
<xacro:include filename="$(find realsense2_gz_description)/urdf/rgbd_camera.gazebo.xacro" />

urdf/_d435.gazebo.xacro

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<robot name="gazebo_d435" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:ignition="http://gazebosim.org/schema">
2+
<robot name="gazebo_d435" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:gz="http://gazebosim.org/schema">
33

44
<xacro:include filename="$(find realsense2_gz_description)/urdf/rgb_camera.gazebo.xacro" />
55
<xacro:include filename="$(find realsense2_gz_description)/urdf/rgbd_camera.gazebo.xacro" />

urdf/_d455.gazebo.xacro

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<robot name="gazebo_d455" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:ignition="http://gazebosim.org/schema">
2+
<robot name="gazebo_d455" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:gz="http://gazebosim.org/schema">
33

44
<xacro:include filename="$(find realsense2_gz_description)/urdf/rgb_camera.gazebo.xacro" />
55
<xacro:include filename="$(find realsense2_gz_description)/urdf/rgbd_camera.gazebo.xacro" />

urdf/example_d415_gazebo.urdf.xacro

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
Starting this plugin in the top level allows developers to define multiple cameras in their robot and only include the plugin once.
2323
If you don't want to start the Sensors plugin in your URDF you can move starting this plugin to the world.sdf file you are working with. -->
2424
<gazebo>
25-
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
25+
<plugin filename="gz-sim-sensors-system" name="gz::sim::systems::Sensors">
2626
<render_engine>ogre2</render_engine>
2727
</plugin>
2828
</gazebo>

urdf/rgb_camera.gazebo.xacro

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0"?>
2-
<robot name="gazebo_rgb" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:ignition="http://gazebosim.org/schema">
2+
<robot name="gazebo_rgb" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:gz="http://gazebosim.org/schema">
33

44
<!--
55
Gazebo plugins can only be included once so this xacro assumes that a parent will include and configure them.
66
This xacro requires Gazebo plugin:
7-
- ignition::gazebo::systems::Sensors
7+
- gz::sim::systems::Sensors
88
to publish simulated RGB camera data
99
1010
For example:
1111
<gazebo>
12-
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
12+
<plugin filename="gz-sim-sensors-system" name="gz::sim::systems::Sensors">
1313
<render_engine>ogre2</render_engine>
1414
</plugin>
1515
</gazebo>
@@ -60,7 +60,7 @@ For example:
6060
<triggered>${triggered}</triggered>
6161
<trigger_topic>${name}/trigger</trigger_topic>
6262
</camera>
63-
<ignition_frame_id>${name}_color_frame</ignition_frame_id>
63+
<gz_frame_id>${name}_color_frame</gz_frame_id>
6464
<always_on>1</always_on>
6565
<update_rate>${fps}</update_rate>
6666
<topic>${gz_topic_name}/image</topic>

urdf/rgbd_camera.gazebo.xacro

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0"?>
2-
<robot name="gazebo_rgbd" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:ignition="http://gazebosim.org/schema">
2+
<robot name="gazebo_rgbd" xmlns:xacro="http://www.ros.org/wiki/xacro" xmlns:gz="http://gazebosim.org/schema">
33

44
<!--
55
Gazebo plugins can only be included once so this xacro assumes that a parent will include and configure them.
66
This xacro requires Gazebo plugin:
7-
- ignition::gazebo::systems::Sensors
7+
- gz::sim::systems::Sensors
88
to publish simulated RGBD camera data
99
1010
For example:
1111
<gazebo>
12-
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
12+
<plugin filename="gz-sim-sensors-system" name="gz::sim::systems::Sensors">
1313
<render_engine>ogre2</render_engine>
1414
</plugin>
1515
</gazebo>
@@ -89,7 +89,7 @@ For example:
8989
</depth_camera>
9090
<optical_frame_id>${name}_color_optical_frame</optical_frame_id>
9191
</camera>
92-
<ignition_frame_id>${name}_color_frame</ignition_frame_id>
92+
<gz_frame_id>${name}_color_frame</gz_frame_id>
9393
<always_on>1</always_on>
9494
<update_rate>${fps}</update_rate>
9595
<visualize>false</visualize>

world/example.sdf

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
<real_time_factor>1.0</real_time_factor>
1010
</physics>
1111
<plugin
12-
filename="ignition-gazebo-physics-system"
13-
name="ignition::gazebo::systems::Physics">
12+
filename="gz-sim-physics-system"
13+
name="gz::sim::systems::Physics">
1414
</plugin>
1515
<plugin
16-
filename="ignition-gazebo-user-commands-system"
17-
name="ignition::gazebo::systems::UserCommands">
16+
filename="gz-sim-user-commands-system"
17+
name="gz::sim::systems::UserCommands">
1818
</plugin>
1919
<plugin
20-
filename="ignition-gazebo-scene-broadcaster-system"
21-
name="ignition::gazebo::systems::SceneBroadcaster">
20+
filename="gz-sim-scene-broadcaster-system"
21+
name="gz::sim::systems::SceneBroadcaster">
2222
</plugin>
2323

2424
<light type="directional" name="sun">
@@ -65,19 +65,19 @@
6565
<include>
6666
<pose>1.2 0.0 0.0 0.0 0.0 1.57</pose>
6767
<uri>
68-
https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Construction Cone
68+
https://fuel.gazebosim.org/1.0/OpenRobotics/models/Construction Cone
6969
</uri>
7070
</include>
7171
<include>
7272
<pose>1.2 0.5 0.0 0.0 0.0 1.57</pose>
7373
<uri>
74-
https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Suitcase2H
74+
https://fuel.gazebosim.org/1.0/OpenRobotics/models/Suitcase2H
7575
</uri>
7676
</include>
7777
<include>
7878
<pose>1.2 -0.5 0.0 0.0 0.0 1.57</pose>
7979
<uri>
80-
https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/Suitcase1H
80+
https://fuel.gazebosim.org/1.0/OpenRobotics/models/Suitcase1H
8181
</uri>
8282
</include>
8383
</world>

0 commit comments

Comments
 (0)