Skip to content

Commit 940bce8

Browse files
authored
ign -> gz CLI Migration : gz-sim (#1533)
Signed-off-by: methylDragon <methylDragon@gmail.com>
1 parent 136c840 commit 940bce8

File tree

136 files changed

+382
-372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+382
-372
lines changed

.github/ci/after_make.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ make install
88
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
99

1010
# For ign-tools
11-
export GZ_CONFIG_PATH=/usr/local/share/ignition
11+
export GZ_CONFIG_PATH=/usr/local/share/gz
1212

1313
# For rendering / window tests
1414
Xvfb :1 -screen 0 1280x1024x24 &

Changelog.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@
357357
1. Sensor systems work if loaded after sensors
358358
* [Pull request #1104](https://github.com/gazebosim/gz-sim/pull/1104)
359359

360-
1. Support printing sensors using `ign model`
360+
1. Support printing sensors using `gz model`
361361
* [Pull request #1157](https://github.com/gazebosim/gz-sim/pull/1157)
362362

363363
1. Set camera clipping plane distances from the GUI
@@ -956,7 +956,7 @@
956956
1. 3 to 4
957957
* [Pull request #933](https://github.com/gazebosim/gz-sim/pull/933)
958958

959-
1. Model info CLI `ign model`
959+
1. Model info CLI `gz model`
960960
* [Pull request #893](https://github.com/gazebosim/gz-sim/pull/893)
961961

962962
1. Support Bullet on Edifice
@@ -1729,7 +1729,7 @@
17291729
1. Fix to handle multiple logical cameras.
17301730
* [Pull Request 539](https://github.com/gazebosim/gz-sim/pull/539)
17311731

1732-
1. Improve ign tool support on macOS.
1732+
1. Improve gz tool support on macOS.
17331733
* [Pull Request 477](https://github.com/gazebosim/gz-sim/pull/477)
17341734

17351735
1. Add support for topic statistics on breadcrumb deployments.
@@ -2064,7 +2064,7 @@
20642064
1. Hello world plugin added
20652065
* [Pull request #699](https://github.com/gazebosim/gz-sim/pull/699)
20662066

2067-
1. Model info CLI `ign model`
2067+
1. Model info CLI `gz model`
20682068
* [Pull request #893](https://github.com/gazebosim/gz-sim/pull/893)
20692069

20702070
1. Don't create components for entities that don't exist
@@ -2166,7 +2166,7 @@
21662166
1. Added screenshot to toolbar
21672167
* [Pull request #588](https://github.com/gazebosim/gz-sim/pull/588)
21682168

2169-
1. Improve ign tool support on macOS
2169+
1. Improve gz tool support on macOS
21702170
* [Pull request #477](https://github.com/gazebosim/gz-sim/pull/477)
21712171

21722172
1. change nullptr to a int ptr for qt 5.15.2 bug
@@ -2444,7 +2444,7 @@
24442444
* [Pull Request 351](https://github.com/gazebosim/gz-sim/pull/351)
24452445
* [Pull Request 362](https://github.com/gazebosim/gz-sim/pull/362)
24462446

2447-
1. Tests & Warnings: Qt 5.14, breadcrumbs, Gui, ign_TEST
2447+
1. Tests & Warnings: Qt 5.14, breadcrumbs, Gui, gz_TEST
24482448
* [Pull Request 327](https://github.com/gazebosim/gz-sim/pull/327)
24492449

24502450
1. Added support for specifying topics to record.
@@ -2585,7 +2585,7 @@
25852585
1. Enhanced log playback performance.
25862586
* [Pull Request 351](https://github.com/gazebosim/gz-sim/pull/351)
25872587

2588-
1. Tests & Warnings: Qt 5.14, breadcrumbs, Gui, ign_TEST
2588+
1. Tests & Warnings: Qt 5.14, breadcrumbs, Gui, gz_TEST
25892589
* [Pull Request 327](https://github.com/gazebosim/gz-sim/pull/327)
25902590

25912591
1. Added support for specifying topics to record.

Migration.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ release will remove the deprecated code.
3131
* `IGN_GAZEBO_PLUGIN_INSTALL_DIR`
3232
* `IGN_GAZEBO_GUI_PLUGIN_INSTALL_DIR`
3333
* `IGN_GAZEBO_WORLD_INSTALL_DIR`
34+
* The `gazebo` command line verb is deprecated.
35+
Use `sim` instead (e.g. `ign gazebo` -> `gz sim`).
3436

3537
## Gazebo Sim 6.1 to 6.2
3638

@@ -190,7 +192,7 @@ in SDF by setting the `<visual><material><double_sided>` SDF element.
190192
file can now be loaded without a flag.
191193

192194
* The `ign-gazebo` command line tool is deprecated. The new tool is
193-
`ign gazebo`, which has all the same options, except for
195+
`gz sim`, which has all the same options, except for
194196
`--distributed` and `--file`/`-f`, which have been removed.
195197

196198
* The `entity_name` field in the messages published by the imu system is
@@ -211,5 +213,5 @@ added an SDF message to the start of log files.
211213
* The ignition-gazebo1-gui library has been changed to a `gui` component of
212214
ignition-gazebo. To use the gui component downstream, update the find package
213215
call in cmake to request for the component, e.g.
214-
`ign_find_package(ignition-gazebo1 REQUIRED COMPONENTS gui)`, and link to the
216+
`gz_find_package(ignition-gazebo1 REQUIRED COMPONENTS gui)`, and link to the
215217
`libignition-gazebo1::gui` target instead of `libignition-gazebo1-gui`

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ See the [installation tutorial](https://gazebosim.org/api/gazebo/6.1/install.htm
8585
Gazebo Sim can be run from the command line, once [installed](#install), using:
8686

8787
```
88-
ign gazebo
88+
gz sim
8989
```
9090

9191
For help, and command line options use:
9292

9393
```
94-
ign gazebo -h
94+
gz sim -h
9595
```
9696

9797
## Known issue of command line tools
@@ -103,7 +103,7 @@ A workaround for a single package is to define the environment variable
103103
`GZ_CONFIG_PATH` to point to the location of the Gazebo library installation,
104104
where the YAML file for the package is found, such as
105105
```
106-
export GZ_CONFIG_PATH=/usr/local/share/ignition
106+
export GZ_CONFIG_PATH=/usr/local/share/gz
107107
```
108108

109109
However, that environment variable only takes a single path, which means if the
@@ -114,9 +114,9 @@ line is using symbolic links to each library's YAML file.
114114
```
115115
mkdir ~/.gz/tools/configs -p
116116
cd ~/.gz/tools/configs/
117-
ln -s /usr/local/share/ignition/fuel8.yaml .
118-
ln -s /usr/local/share/ignition/transport12.yaml .
119-
ln -s /usr/local/share/ignition/transportlog12.yaml .
117+
ln -s /usr/local/share/gz/fuel8.yaml .
118+
ln -s /usr/local/share/gz/transport12.yaml .
119+
ln -s /usr/local/share/gz/transportlog12.yaml .
120120
...
121121
export GZ_CONFIG_PATH=$HOME/.gz/tools/configs
122122
```

examples/plugin/command_actor/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build
2727

2828
Then run the demo world:
2929

30-
ign gazebo -v 4 command_actor.sdf -r
30+
gz sim -v 4 command_actor.sdf -r
3131

examples/plugin/custom_component/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build
2929

3030
Then run a world that loads the plugin as follows:
3131

32-
ign gazebo -s -v 4 custom_component.sdf
32+
gz sim -s -v 4 custom_component.sdf
3333

examples/plugin/custom_sensor_system/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build
3333

3434
Then load the example world:
3535

36-
ign gazebo -r odometer.sdf
36+
gz sim -r odometer.sdf
3737

3838
You should see a box slowly moving in a straight line.
3939

4040
Listen to the odometer data with:
4141

4242
```
43-
ign topic -e -t /world/odometer_world/model/model_with_sensor/link/link/sensor/an_odometer/odometer
43+
gz topic -e -t /world/odometer_world/model/model_with_sensor/link/link/sensor/an_odometer/odometer
4444
```
4545

examples/plugin/gui_system_plugin/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export IGN_GUI_PLUGIN_PATH=`pwd`/build
3434

3535
Then run a world, for example:
3636

37-
ign gazebo -v 4 shapes.sdf
37+
gz sim -v 4 shapes.sdf
3838

3939
From the GUI plugin menu on the top-right, choose "Gui System Plugin".
4040

examples/plugin/hello_world/HelloWorld.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void HelloWorld::PostUpdate(const gz::sim::UpdateInfo &_info,
4848
msg += "paused.";
4949

5050
// Messages printed with gzmsg only show when running with verbosity 3 or
51-
// higher (i.e. ign gazebo -v 3)
51+
// higher (i.e. gz sim -v 3)
5252
gzmsg << msg << std::endl;
5353
}
5454

examples/plugin/hello_world/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build
3131

3232
Then load the example world:
3333

34-
ign gazebo -v 3 hello_world_plugin.sdf
34+
gz sim -v 3 hello_world_plugin.sdf
3535

3636
You should see green messages on the terminal like:
3737

examples/plugin/rendering_plugins/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Run the example world
3030

3131
~~~
3232
cd examples/plugin/rendering_plugins
33-
ign gazebo -v 4 -r rendering_plugins.sdf
33+
gz sim -v 4 -r rendering_plugins.sdf
3434
~~~
3535

3636
The ambient light on the server scene, visible from the camera sensor, will change every 2 seconds.

examples/plugin/reset_plugin/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build
2727

2828
Then run a world that loads the plugin as follows:
2929

30-
ign gazebo -r -v 4 joint_position_randomizer.sdf
30+
gz sim -r -v 4 joint_position_randomizer.sdf
3131

3232
In another terminal, run the following to reset the world.
3333

34-
ign service -s /world/default/control --reqtype gz.msgs.WorldControl --reptype gz.msgs.Boolean --timeout 3000 --req 'reset: {all: true}'
34+
gz service -s /world/default/control --reqtype gz.msgs.WorldControl --reptype gz.msgs.Boolean --timeout 3000 --req 'reset: {all: true}'

examples/plugin/reset_plugin/joint_position_randomizer.sdf

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
To reset the world, run:
55

6-
ign service -s /world/default/control \-\-reqtype gz.msgs.WorldControl \-\-reptype gz.msgs.Boolean \-\-timeout 3000 \-\-req 'reset: {all: true}'
6+
gz service -s /world/default/control \-\-reqtype gz.msgs.WorldControl \-\-reptype gz.msgs.Boolean \-\-timeout 3000 \-\-req 'reset: {all: true}'
77
-->
88

99
<world name="default">

examples/scripts/distributed/primary.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

5-
ign gazebo -v 4 -z 100000000 --network-role primary --network-secondaries 3 $DIR/primary.sdf
5+
gz sim -v 4 -z 100000000 --network-role primary --network-secondaries 3 $DIR/primary.sdf
66

examples/scripts/distributed/secondary.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

5-
ign gazebo -s -v 4 -z 100000000 --network-role secondary $DIR/secondary.sdf
5+
gz sim -s -v 4 -z 100000000 --network-role secondary $DIR/secondary.sdf
66

examples/scripts/distributed/standalone.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

5-
ign gazebo -v 4 -z 100000000 $DIR/standalone.sdf
5+
gz sim -v 4 -z 100000000 $DIR/standalone.sdf

examples/scripts/distributed_levels/primary.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

55
# --levels is implied by --network-role
6-
ign gazebo -v 4 -z 100000000 --network-role primary --network-secondaries 2 $DIR/primary.sdf
6+
gz sim -v 4 -z 100000000 --network-role primary --network-secondaries 2 $DIR/primary.sdf
77

examples/scripts/distributed_levels/secondary.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

55
# --levels is implied by --network-role
6-
ign gazebo -s -v 4 -z 100000000 --network-role secondary $DIR/secondary.sdf
6+
gz sim -s -v 4 -z 100000000 --network-role secondary $DIR/secondary.sdf
77

examples/scripts/distributed_levels/standalone.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

5-
ign gazebo -v 4 -z 100000000 --levels $DIR/standalone.sdf
5+
gz sim -v 4 -z 100000000 --levels $DIR/standalone.sdf

examples/scripts/log_video_recorder/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ box) where the entities are located at the start of the log.
1010

1111
Run the `log_record_shapes.sdf` world to generate a state log of the simulation:
1212

13-
ign gazebo log_record_shapes.sdf
13+
gz sim log_record_shapes.sdf
1414

1515
Press Play and let the simulation run for 10 seconds of sim time. Stop and exit.
1616
You should now see a `state.tlog` generated in `/tmp/log` directory. Now, let's

examples/scripts/log_video_recorder/log_video_recorder.sdf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
This world is to be used with the log playback and log video recorder system.
66
Change the log playback path to the directory containing state.tlog before
7-
launching the world. Videos will be created in the directory where ign gazebo
7+
launching the world. Videos will be created in the directory where gz sim
88
is run. A string message will be published to /log_video_recorder/status when
99
recording is finished.
1010
-->

examples/scripts/log_video_recorder/record_one_run.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ln -s $logDirPath $tmpDir
3232
echo "Starting log playback and video recording"
3333

3434
sdfName="log_video_recorder"
35-
ign gazebo -v 4 $sdfName.sdf
35+
gz sim -v 4 $sdfName.sdf
3636

3737
echo "Video recording ended. Shutting down playback"
3838

examples/standalone/entity_creation/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ make
1414
This example only works if the world is called `empty`. Start an empty world with:
1515

1616
```
17-
ign gazebo empty.sdf
17+
gz sim empty.sdf
1818
```
1919

2020
Then run the create program to spawn entities into the world:

examples/standalone/external_ecm/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This will generate the `external_ecm` executable under `build`.
2121

2222
Start a simulation, for example:
2323

24-
ign gazebo shapes.sdf
24+
gz sim shapes.sdf
2525

2626
On another terminal, run the `external_ecm` executable, passing the name of the
2727
running world you want to inspect:

examples/standalone/joy_to_twist/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ that can be controlled using a joystick. You can run it as follows:
5050
cd examples/standalone/joy_to_twist
5151
./joy_to_twist ../joy_to_twist.sdf
5252

53-
1. Finally, on a 3rd terminal, run `ign gazebo` with the vehicle that will
53+
1. Finally, on a 3rd terminal, run `gz sim` with the vehicle that will
5454
consume the twist messages:
5555

5656
cd examples/worlds
57-
ign gazebo -v 4 diff_drive.sdf
57+
gz sim -v 4 diff_drive.sdf
5858

5959
1. Now hold your joystick's A button (or equivalent) and move the directional
6060
stick to control the vehicle.

examples/standalone/joystick/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ the SDF file's `<dev>` tag, which defaults to `/dev/input/js0`.
3939
If no errors are printed, you can check that the messages are being published by
4040
echoing the `/joy` topic:
4141

42-
ign topic echo -t /joy
42+
gz topic echo -t /joy
4343

4444
## Demo example
4545

@@ -59,11 +59,11 @@ that can be controlled using a joystick. You can run it as follows:
5959
cd examples/standalone/joy_to_twist
6060
./joy_to_twist ../joy_to_twist.sdf
6161

62-
1. Finally, on a 3rd terminal, run `ign gazebo` with the vehicle that will
62+
1. Finally, on a 3rd terminal, run `gz sim` with the vehicle that will
6363
consume the twist messages:
6464

6565
cd examples/worlds
66-
ign gazebo -v 4 diff_drive.sdf
66+
gz sim -v 4 diff_drive.sdf
6767

6868
1. Now hold your joystick's A button (or equivalent) and move the directional
6969
stick to control the vehicle.

examples/standalone/keyboard/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ that can be controlled using a keyboard. You can run it as follows:
3333
cd examples/standalone/keyboard/build
3434
./keyboard ../keyboard.sdf
3535

36-
1. On another terminal, run `ign gazebo` with the vehicle that will
36+
1. On another terminal, run `gz sim` with the vehicle that will
3737
consume the twist messages:
3838

3939
cd examples/worlds
40-
ign gazebo -v 4 diff_drive.sdf
40+
gz sim -v 4 diff_drive.sdf
4141

4242
1. Switch back to the first terminal. Use the arrow keys to control one vehicle,
4343
and ASDW to control the other.

examples/standalone/multi_lrauv_race/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ From this directory, run the following to compile:
1717

1818
From the `build` directory, run Gazebo Sim and the example controller:
1919

20-
ign gazebo -r ../../../worlds/multi_lrauv_race.sdf
20+
gz sim -r ../../../worlds/multi_lrauv_race.sdf
2121
./multi_lrauv_race
2222

2323
The example controller will output pseudorandom propeller and rudder commands

examples/worlds/ackermann_steering.sdf

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
55
Try sending commands:
66
7-
ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.1}"
7+
gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.1}"
88
99
Listen to odometry:
1010
11-
ign topic -e -t /model/vehicle_blue/odometry
11+
gz topic -e -t /model/vehicle_blue/odometry
1212
1313
-->
1414
<sdf version="1.6">

examples/worlds/apply_joint_force.sdf

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
Try sending commands:
66
77
This will apply a constant force on the joint
8-
ign topic -t "/model/joint_force_example/joint/j1/cmd_force" -m gz.msgs.Double -p "data: 0.001"
8+
gz topic -t "/model/joint_force_example/joint/j1/cmd_force" -m gz.msgs.Double -p "data: 0.001"
99
1010
This will stop applying the force. The joint may continue to rotate for some time before coming to a stop
11-
ign topic -t "/model/joint_force_example/joint/j1/cmd_force" -m gz.msgs.Double -p "data: 0.0"
11+
gz topic -t "/model/joint_force_example/joint/j1/cmd_force" -m gz.msgs.Double -p "data: 0.0"
1212
-->
1313
<sdf version="1.6">
1414
<world name="apply_joint_force">

0 commit comments

Comments
 (0)