Skip to content

Commit

Permalink
ign -> gz CLI Migration : gz-sim (gazebosim#1533)
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon authored Jun 22, 2022
1 parent 136c840 commit 940bce8
Show file tree
Hide file tree
Showing 136 changed files with 382 additions and 372 deletions.
2 changes: 1 addition & 1 deletion .github/ci/after_make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ make install
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

# For ign-tools
export GZ_CONFIG_PATH=/usr/local/share/ignition
export GZ_CONFIG_PATH=/usr/local/share/gz

# For rendering / window tests
Xvfb :1 -screen 0 1280x1024x24 &
Expand Down
14 changes: 7 additions & 7 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
1. Sensor systems work if loaded after sensors
* [Pull request #1104](https://github.com/gazebosim/gz-sim/pull/1104)

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

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

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

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

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

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

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

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

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

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

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

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

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

1. Added support for specifying topics to record.
Expand Down
6 changes: 4 additions & 2 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ release will remove the deprecated code.
* `IGN_GAZEBO_PLUGIN_INSTALL_DIR`
* `IGN_GAZEBO_GUI_PLUGIN_INSTALL_DIR`
* `IGN_GAZEBO_WORLD_INSTALL_DIR`
* The `gazebo` command line verb is deprecated.
Use `sim` instead (e.g. `ign gazebo` -> `gz sim`).

## Gazebo Sim 6.1 to 6.2

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

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

* The `entity_name` field in the messages published by the imu system is
Expand All @@ -211,5 +213,5 @@ added an SDF message to the start of log files.
* The ignition-gazebo1-gui library has been changed to a `gui` component of
ignition-gazebo. To use the gui component downstream, update the find package
call in cmake to request for the component, e.g.
`ign_find_package(ignition-gazebo1 REQUIRED COMPONENTS gui)`, and link to the
`gz_find_package(ignition-gazebo1 REQUIRED COMPONENTS gui)`, and link to the
`libignition-gazebo1::gui` target instead of `libignition-gazebo1-gui`
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ See the [installation tutorial](https://gazebosim.org/api/gazebo/6.1/install.htm
Gazebo Sim can be run from the command line, once [installed](#install), using:

```
ign gazebo
gz sim
```

For help, and command line options use:

```
ign gazebo -h
gz sim -h
```

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

However, that environment variable only takes a single path, which means if the
Expand All @@ -114,9 +114,9 @@ line is using symbolic links to each library's YAML file.
```
mkdir ~/.gz/tools/configs -p
cd ~/.gz/tools/configs/
ln -s /usr/local/share/ignition/fuel8.yaml .
ln -s /usr/local/share/ignition/transport12.yaml .
ln -s /usr/local/share/ignition/transportlog12.yaml .
ln -s /usr/local/share/gz/fuel8.yaml .
ln -s /usr/local/share/gz/transport12.yaml .
ln -s /usr/local/share/gz/transportlog12.yaml .
...
export GZ_CONFIG_PATH=$HOME/.gz/tools/configs
```
Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/command_actor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build

Then run the demo world:

ign gazebo -v 4 command_actor.sdf -r
gz sim -v 4 command_actor.sdf -r

2 changes: 1 addition & 1 deletion examples/plugin/custom_component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build

Then run a world that loads the plugin as follows:

ign gazebo -s -v 4 custom_component.sdf
gz sim -s -v 4 custom_component.sdf

4 changes: 2 additions & 2 deletions examples/plugin/custom_sensor_system/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build

Then load the example world:

ign gazebo -r odometer.sdf
gz sim -r odometer.sdf

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

Listen to the odometer data with:

```
ign topic -e -t /world/odometer_world/model/model_with_sensor/link/link/sensor/an_odometer/odometer
gz topic -e -t /world/odometer_world/model/model_with_sensor/link/link/sensor/an_odometer/odometer
```

2 changes: 1 addition & 1 deletion examples/plugin/gui_system_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export IGN_GUI_PLUGIN_PATH=`pwd`/build

Then run a world, for example:

ign gazebo -v 4 shapes.sdf
gz sim -v 4 shapes.sdf

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

Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/hello_world/HelloWorld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void HelloWorld::PostUpdate(const gz::sim::UpdateInfo &_info,
msg += "paused.";

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

Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/hello_world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build

Then load the example world:

ign gazebo -v 3 hello_world_plugin.sdf
gz sim -v 3 hello_world_plugin.sdf

You should see green messages on the terminal like:

Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/rendering_plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Run the example world

~~~
cd examples/plugin/rendering_plugins
ign gazebo -v 4 -r rendering_plugins.sdf
gz sim -v 4 -r rendering_plugins.sdf
~~~

The ambient light on the server scene, visible from the camera sensor, will change every 2 seconds.
Expand Down
4 changes: 2 additions & 2 deletions examples/plugin/reset_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export GZ_SIM_SYSTEM_PLUGIN_PATH=`pwd`/build

Then run a world that loads the plugin as follows:

ign gazebo -r -v 4 joint_position_randomizer.sdf
gz sim -r -v 4 joint_position_randomizer.sdf

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

ign service -s /world/default/control --reqtype gz.msgs.WorldControl --reptype gz.msgs.Boolean --timeout 3000 --req 'reset: {all: true}'
gz service -s /world/default/control --reqtype gz.msgs.WorldControl --reptype gz.msgs.Boolean --timeout 3000 --req 'reset: {all: true}'
2 changes: 1 addition & 1 deletion examples/plugin/reset_plugin/joint_position_randomizer.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

To reset the world, run:

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

<world name="default">
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/distributed/primary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

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

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

2 changes: 1 addition & 1 deletion examples/scripts/distributed/secondary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

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

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

2 changes: 1 addition & 1 deletion examples/scripts/distributed/standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

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

ign gazebo -v 4 -z 100000000 $DIR/standalone.sdf
gz sim -v 4 -z 100000000 $DIR/standalone.sdf
2 changes: 1 addition & 1 deletion examples/scripts/distributed_levels/primary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

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

2 changes: 1 addition & 1 deletion examples/scripts/distributed_levels/secondary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

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

2 changes: 1 addition & 1 deletion examples/scripts/distributed_levels/standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

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

ign gazebo -v 4 -z 100000000 --levels $DIR/standalone.sdf
gz sim -v 4 -z 100000000 --levels $DIR/standalone.sdf
2 changes: 1 addition & 1 deletion examples/scripts/log_video_recorder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ box) where the entities are located at the start of the log.

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

ign gazebo log_record_shapes.sdf
gz sim log_record_shapes.sdf

Press Play and let the simulation run for 10 seconds of sim time. Stop and exit.
You should now see a `state.tlog` generated in `/tmp/log` directory. Now, let's
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/log_video_recorder/log_video_recorder.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This world is to be used with the log playback and log video recorder system.
Change the log playback path to the directory containing state.tlog before
launching the world. Videos will be created in the directory where ign gazebo
launching the world. Videos will be created in the directory where gz sim
is run. A string message will be published to /log_video_recorder/status when
recording is finished.
-->
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/log_video_recorder/record_one_run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ln -s $logDirPath $tmpDir
echo "Starting log playback and video recording"

sdfName="log_video_recorder"
ign gazebo -v 4 $sdfName.sdf
gz sim -v 4 $sdfName.sdf

echo "Video recording ended. Shutting down playback"

Expand Down
2 changes: 1 addition & 1 deletion examples/standalone/entity_creation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ make
This example only works if the world is called `empty`. Start an empty world with:

```
ign gazebo empty.sdf
gz sim empty.sdf
```

Then run the create program to spawn entities into the world:
Expand Down
2 changes: 1 addition & 1 deletion examples/standalone/external_ecm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This will generate the `external_ecm` executable under `build`.

Start a simulation, for example:

ign gazebo shapes.sdf
gz sim shapes.sdf

On another terminal, run the `external_ecm` executable, passing the name of the
running world you want to inspect:
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone/joy_to_twist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ that can be controlled using a joystick. You can run it as follows:
cd examples/standalone/joy_to_twist
./joy_to_twist ../joy_to_twist.sdf

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

cd examples/worlds
ign gazebo -v 4 diff_drive.sdf
gz sim -v 4 diff_drive.sdf

1. Now hold your joystick's A button (or equivalent) and move the directional
stick to control the vehicle.
Expand Down
6 changes: 3 additions & 3 deletions examples/standalone/joystick/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ the SDF file's `<dev>` tag, which defaults to `/dev/input/js0`.
If no errors are printed, you can check that the messages are being published by
echoing the `/joy` topic:

ign topic echo -t /joy
gz topic echo -t /joy

## Demo example

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

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

cd examples/worlds
ign gazebo -v 4 diff_drive.sdf
gz sim -v 4 diff_drive.sdf

1. Now hold your joystick's A button (or equivalent) and move the directional
stick to control the vehicle.
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone/keyboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ that can be controlled using a keyboard. You can run it as follows:
cd examples/standalone/keyboard/build
./keyboard ../keyboard.sdf

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

cd examples/worlds
ign gazebo -v 4 diff_drive.sdf
gz sim -v 4 diff_drive.sdf

1. Switch back to the first terminal. Use the arrow keys to control one vehicle,
and ASDW to control the other.
2 changes: 1 addition & 1 deletion examples/standalone/multi_lrauv_race/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ From this directory, run the following to compile:

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

ign gazebo -r ../../../worlds/multi_lrauv_race.sdf
gz sim -r ../../../worlds/multi_lrauv_race.sdf
./multi_lrauv_race

The example controller will output pseudorandom propeller and rudder commands
Expand Down
4 changes: 2 additions & 2 deletions examples/worlds/ackermann_steering.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
Try sending commands:
ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.1}"
gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.1}"
Listen to odometry:
ign topic -e -t /model/vehicle_blue/odometry
gz topic -e -t /model/vehicle_blue/odometry
-->
<sdf version="1.6">
Expand Down
4 changes: 2 additions & 2 deletions examples/worlds/apply_joint_force.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
Try sending commands:
This will apply a constant force on the joint
ign topic -t "/model/joint_force_example/joint/j1/cmd_force" -m gz.msgs.Double -p "data: 0.001"
gz topic -t "/model/joint_force_example/joint/j1/cmd_force" -m gz.msgs.Double -p "data: 0.001"
This will stop applying the force. The joint may continue to rotate for some time before coming to a stop
ign topic -t "/model/joint_force_example/joint/j1/cmd_force" -m gz.msgs.Double -p "data: 0.0"
gz topic -t "/model/joint_force_example/joint/j1/cmd_force" -m gz.msgs.Double -p "data: 0.0"
-->
<sdf version="1.6">
<world name="apply_joint_force">
Expand Down
Loading

0 comments on commit 940bce8

Please sign in to comment.