Skip to content

Commit b729b45

Browse files
Update to gazebo harmonic
1 parent 38c8e92 commit b729b45

File tree

8 files changed

+63
-56
lines changed

8 files changed

+63
-56
lines changed

src/surface/rov_gazebo/description/body.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122

123123
<gazebo>
124124
<plugin
125-
filename="ignition-gazebo-hydrodynamics-system"
126-
name="ignition::gazebo::systems::Hydrodynamics">
125+
filename="gz-sim-hydrodynamics-system"
126+
name="gz::sim::systems::Hydrodynamics">
127127
<link_name>body</link_name>
128128
<water_density>1000</water_density>
129129
<!-- Added mass -->

src/surface/rov_gazebo/description/thruster.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@
121121

122122
<gazebo>
123123
<plugin
124-
filename="ignition-gazebo-thruster-system"
125-
name="ignition::gazebo::systems::Thruster">
124+
filename="gz-sim-gazebo-thruster-system"
125+
name="gz::sim::systems::Thruster">
126126
<namespace>rov</namespace>
127127
<joint_name>${thruster_name}_body_blade_joint</joint_name>
128128
<thrust_coefficient>0.004422</thrust_coefficient>

src/surface/rov_gazebo/launch/sim_launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def generate_launch_description() -> LaunchDescription:
2121

2222
# TODO: gz_sim launch might be nice
2323
start_gazebo = ExecuteProcess(
24-
cmd=['ign', 'gazebo', '-v', '3', '-r', world_path], output='screen'
24+
cmd=['gz', 'sim', '-v', '3', '-r', world_path], output='screen'
2525
)
2626

2727
start_ardusub = ExecuteProcess(

src/surface/rov_gazebo/models/rov24/model.sdf

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@
131131

132132
<!-- Hydrodynamics plugin -->
133133
<plugin
134-
filename="ignition-gazebo-hydrodynamics-system"
135-
name="ignition::gazebo::systems::Hydrodynamics">
134+
filename="gz-sim-hydrodynamics-system"
135+
name="gz::sim::systems::Hydrodynamics">
136136
<link_name>base_link</link_name>
137137
<water_density>1000.0</water_density>
138138
<!-- Added mass: -->
@@ -407,8 +407,8 @@
407407
</joint>
408408

409409
<plugin
410-
filename="ignition-gazebo-thruster-system"
411-
name="ignition::gazebo::systems::Thruster">
410+
filename="gz-sim-thruster-system"
411+
name="gz::sim::systems::Thruster">
412412
<namespace>rov24</namespace>
413413
<joint_name>thruster1_joint</joint_name>
414414
<thrust_coefficient>0.02</thrust_coefficient>
@@ -421,8 +421,8 @@
421421
</plugin>
422422

423423
<plugin
424-
filename="ignition-gazebo-thruster-system"
425-
name="ignition::gazebo::systems::Thruster">
424+
filename="gz-sim-thruster-system"
425+
name="gz::sim::systems::Thruster">
426426
<namespace>rov24</namespace>
427427
<joint_name>thruster2_joint</joint_name>
428428
<thrust_coefficient>0.02</thrust_coefficient>
@@ -435,8 +435,8 @@
435435
</plugin>
436436

437437
<plugin
438-
filename="ignition-gazebo-thruster-system"
439-
name="ignition::gazebo::systems::Thruster">
438+
filename="gz-sim-thruster-system"
439+
name="gz::sim::systems::Thruster">
440440
<namespace>rov24</namespace>
441441
<joint_name>thruster3_joint</joint_name>
442442
<!-- Reverse spin to balance torque -->
@@ -450,8 +450,8 @@
450450
</plugin>
451451

452452
<plugin
453-
filename="ignition-gazebo-thruster-system"
454-
name="ignition::gazebo::systems::Thruster">
453+
filename="gz-sim-thruster-system"
454+
name="gz::sim::systems::Thruster">
455455
<namespace>rov24</namespace>
456456
<joint_name>thruster4_joint</joint_name>
457457
<!-- Reverse spin to balance torque -->
@@ -465,8 +465,8 @@
465465
</plugin>
466466

467467
<plugin
468-
filename="ignition-gazebo-thruster-system"
469-
name="ignition::gazebo::systems::Thruster">
468+
filename="gz-sim-thruster-system"
469+
name="gz::sim::systems::Thruster">
470470
<namespace>rov24</namespace>
471471
<joint_name>thruster5_joint</joint_name>
472472
<thrust_coefficient>0.02</thrust_coefficient>
@@ -479,8 +479,8 @@
479479
</plugin>
480480

481481
<plugin
482-
filename="ignition-gazebo-thruster-system"
483-
name="ignition::gazebo::systems::Thruster">
482+
filename="gz-sim-thruster-system"
483+
name="gz::sim::systems::Thruster">
484484
<namespace>rov24</namespace>
485485
<joint_name>thruster6_joint</joint_name>
486486
<!-- Reverse spin to balance torque -->
@@ -494,8 +494,8 @@
494494
</plugin>
495495

496496
<plugin
497-
filename="ignition-gazebo-thruster-system"
498-
name="ignition::gazebo::systems::Thruster">
497+
filename="gz-sim-thruster-system"
498+
name="gz::sim::systems::Thruster">
499499
<namespace>rov24</namespace>
500500
<joint_name>thruster7_joint</joint_name>
501501
<!-- Reverse spin to balance torque -->
@@ -509,8 +509,8 @@
509509
</plugin>
510510

511511
<plugin
512-
filename="ignition-gazebo-thruster-system"
513-
name="ignition::gazebo::systems::Thruster">
512+
filename="gz-sim-thruster-system"
513+
name="gz::sim::systems::Thruster">
514514
<namespace>rov24</namespace>
515515
<joint_name>thruster8_joint</joint_name>
516516
<thrust_coefficient>0.02</thrust_coefficient>

src/surface/rov_gazebo/scripts/add_models_and_worlds.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Add GZ_SIM_SYSTEM_PLUGIN_PATH to .bashrc only if it isn't already there
4-
ROS_LINE="export IGN_GAZEBO_RESOURCE_PATH=$(pwd)/src/surface/rov_gazebo/models:$(pwd)/src/surface/rov_gazebo/models/props:$(pwd)/src/surface/rov_gazebo/worlds:$IGN_GAZEBO_RESOURCE_PATH"
4+
ROS_LINE='export GZ_SIM_RESOURCE_PATH=$(pwd)/src/surface/rov_gazebo/models:$(pwd)/src/surface/rov_gazebo/models/props:$(pwd)/src/surface/rov_gazebo/worlds:$GZ_SIM_RESOURCE_PATH'
55
if ! grep -qF "$ROS_LINE" ~/.bashrc ;
66
then echo "$ROS_LINE" >> ~/.bashrc ;
77
fi

src/surface/rov_gazebo/scripts/ardupilot_gazebo.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
#!/bin/bash
22

3+
export GZ_VERSION="harmonic"
4+
5+
sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
6+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
37
sudo apt-get update
4-
sudo apt-get install rapidjson-dev libignition-gazebo6-dev -y
8+
sudo apt-get install gz-harmonic -y
9+
sudo apt install libopencv-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl -y
10+
wget -q -O - https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh | sudo bash
11+
512
# Can't be ssh clone because that breaks docker.
613
# Can either make a second file or just hope that our fork does not need lots of dev work
7-
git clone -b fortress https://github.com/CWRUbotix/rov-ardupilot-gazebo-fortress.git ~/ardupilot_gazebo
14+
git clone https://github.com/ArduPilot/ardupilot_gazebo ~/ardupilot_gazebo
815
cd ~/ardupilot_gazebo
916
mkdir build && cd build
1017
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
1118
make -j4
1219

1320
# Add IGN_GAZEBO_SYSTEM_PLUGIN_PATH to .bashrc only if it isn't already there
14-
ROS_LINE='export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=$HOME/ardupilot_gazebo/build:$IGN_GAZEBO_SYSTEM_PLUGIN_PATH'
21+
ROS_LINE='export GZ_SIM_SYSTEM_PLUGIN_PATH=$HOME/ardupilot_gazebo/build:$GZ_SIM_SYSTEM_PLUGIN_PATH'
1522
if ! grep -qF "$ROS_LINE" ~/.bashrc ;
1623
then echo "$ROS_LINE" >> ~/.bashrc ;
1724
fi

src/surface/rov_gazebo/worlds/rov24_coral.sdf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44

55
<!-- Base Gazebo plugins -->
66
<plugin
7-
filename="ignition-gazebo-physics-system"
8-
name="ignition::gazebo::systems::Physics">
7+
filename="gz-sim-physics-system"
8+
name="gz::sim::systems::Physics">
99
</plugin>
1010
<plugin
11-
filename="ignition-gazebo-user-commands-system"
12-
name="ignition::gazebo::systems::UserCommands">
11+
filename="gz-sim-user-commands-system"
12+
name="gz::sim::systems::UserCommands">
1313
</plugin>
1414
<plugin
15-
filename="ignition-gazebo-scene-broadcaster-system"
16-
name="ignition::gazebo::systems::SceneBroadcaster">
15+
filename="gz-sim-scene-broadcaster-system"
16+
name="gz::sim::systems::SceneBroadcaster">
1717
</plugin>
1818

1919
<!-- IMU plugin manages all IMU sensors -->
2020
<plugin filename="libgz-sim-imu-system.so"
21-
name="ignition::gazebo::systems::Imu">
21+
name="gz::sim::systems::Imu">
2222
</plugin>
2323

24-
<plugin filename="ignition-gazebo-sensors-system"
25-
name="ignition::gazebo::systems::Sensors">
24+
<plugin filename="gz-sim-sensors-system"
25+
name="gz::sim::systems::Sensors">
2626
</plugin>
2727

2828
<!-- Buoyancy plugin manages buoyancy for all models -->
2929
<plugin
30-
filename="ignition-gazebo-buoyancy-system"
31-
name="ignition::gazebo::systems::Buoyancy">
30+
filename="gz-sim-buoyancy-system"
31+
name="gz::sim::systems::Buoyancy">
3232
<!-- Fluid density is 1 (air) above 0 and 1000 (water) below 0 -->
3333
<graded_buoyancy>
3434
<default_density>1000</default_density>

src/surface/rov_gazebo/worlds/world.sdf

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,37 @@
77
<real_time_factor>1.0</real_time_factor>
88
</physics>
99
<plugin
10-
filename="ignition-gazebo-physics-system"
11-
name="ignition::gazebo::systems::Physics">
10+
filename="gz-sim-physics-system"
11+
name="gz::sim::systems::Physics">
1212
</plugin>
1313
<plugin
14-
filename="ignition-gazebo-sensors-system"
15-
name="ignition::gazebo::systems::Sensors">
14+
filename="gz-sim-sensors-system"
15+
name="gz::sim::systems::Sensors">
1616
<render_engine>ogre</render_engine>
1717
</plugin>
1818
<plugin
19-
filename="ignition-gazebo-user-commands-system"
20-
name="ignition::gazebo::systems::UserCommands">
19+
filename="gz-sim-user-commands-system"
20+
name="gz::sim::systems::UserCommands">
2121
</plugin>
2222
<plugin
23-
filename="ignition-gazebo-scene-broadcaster-system"
24-
name="ignition::gazebo::systems::SceneBroadcaster">
23+
filename="gz-sim-scene-broadcaster-system"
24+
name="gz::sim::systems::SceneBroadcaster">
2525
</plugin>
2626
<plugin
27-
filename="ignition-gazebo-buoyancy-system"
28-
name="ignition::gazebo::systems::Buoyancy">
27+
filename="gz-sim-buoyancy-system"
28+
name="gz::sim::systems::Buoyancy">
2929
<uniform_fluid_density>1000</uniform_fluid_density>
3030
</plugin>
3131

3232
<gui fullscreen="0">
3333

3434
<!-- 3D scene -->
3535
<plugin filename="GzScene3D" name="3D View">
36-
<ignition-gui>
36+
<gz-gui>
3737
<title>3D View</title>
3838
<property type="bool" key="showTitleBar">true</property>
3939
<property type="string" key="state">docked</property>
40-
</ignition-gui>
40+
</gz-gui>
4141

4242
<engine>ogre</engine>
4343
<scene>scene</scene>
@@ -48,7 +48,7 @@
4848

4949
<!-- World control -->
5050
<plugin filename="WorldControl" name="World control">
51-
<ignition-gui>
51+
<gz-gui>
5252
<title>World control</title>
5353
<property type="bool" key="showTitleBar">true</property>
5454
<property type="bool" key="resizable">true</property>
@@ -61,7 +61,7 @@
6161
<line own="left" target="left"/>
6262
<line own="bottom" target="bottom"/>
6363
</anchors>
64-
</ignition-gui>
64+
</gz-gui>
6565

6666
<play_pause>true</play_pause>
6767
<step>true</step>
@@ -71,7 +71,7 @@
7171

7272
<!-- World statistics -->
7373
<plugin filename="WorldStats" name="World stats">
74-
<ignition-gui>
74+
<gz-gui>
7575
<title>World stats</title>
7676
<property type="bool" key="showTitleBar">false</property>
7777
<property type="bool" key="resizable">false</property>
@@ -84,7 +84,7 @@
8484
<line own="right" target="right"/>
8585
<line own="bottom" target="bottom"/>
8686
</anchors>
87-
</ignition-gui>
87+
</gz-gui>
8888

8989
<sim_time>true</sim_time>
9090
<real_time>true</real_time>
@@ -93,9 +93,9 @@
9393
</plugin>
9494

9595
<plugin filename="ImageDisplay" name="Image Display">
96-
<ignition-gui>
96+
<gz-gui>
9797
<property key="state" type="string">docked</property>
98-
</ignition-gui>
98+
</gz-gui>
9999
</plugin>
100100
</gui>
101101

0 commit comments

Comments
 (0)