From 940bce8e85cd7a47e72f353adb51fd06591dabfd Mon Sep 17 00:00:00 2001 From: methylDragon Date: Wed, 22 Jun 2022 14:37:51 -0700 Subject: [PATCH] ign -> gz CLI Migration : gz-sim (#1533) Signed-off-by: methylDragon --- .github/ci/after_make.sh | 2 +- Changelog.md | 14 ++--- Migration.md | 6 ++- README.md | 12 ++--- examples/plugin/command_actor/README.md | 2 +- examples/plugin/custom_component/README.md | 2 +- .../plugin/custom_sensor_system/README.md | 4 +- examples/plugin/gui_system_plugin/README.md | 2 +- examples/plugin/hello_world/HelloWorld.cc | 2 +- examples/plugin/hello_world/README.md | 2 +- examples/plugin/rendering_plugins/README.md | 2 +- examples/plugin/reset_plugin/README.md | 4 +- .../joint_position_randomizer.sdf | 2 +- examples/scripts/distributed/primary.sh | 2 +- examples/scripts/distributed/secondary.sh | 2 +- examples/scripts/distributed/standalone.sh | 2 +- .../scripts/distributed_levels/primary.sh | 2 +- .../scripts/distributed_levels/secondary.sh | 2 +- .../scripts/distributed_levels/standalone.sh | 2 +- examples/scripts/log_video_recorder/README.md | 2 +- .../log_video_recorder/log_video_recorder.sdf | 2 +- .../log_video_recorder/record_one_run.bash | 2 +- examples/standalone/entity_creation/README.md | 2 +- examples/standalone/external_ecm/README.md | 2 +- examples/standalone/joy_to_twist/README.md | 4 +- examples/standalone/joystick/README.md | 6 +-- examples/standalone/keyboard/README.md | 4 +- .../standalone/multi_lrauv_race/README.md | 2 +- examples/worlds/ackermann_steering.sdf | 4 +- examples/worlds/apply_joint_force.sdf | 4 +- examples/worlds/auv_controls.sdf | 4 +- examples/worlds/breadcrumbs.sdf | 6 +-- examples/worlds/buoyancy.sdf | 4 +- examples/worlds/buoyancy_engine.sdf | 8 +-- .../camera_video_record_dbl_pendulum.sdf | 4 +- examples/worlds/collada_world_exporter.sdf | 2 +- examples/worlds/contact_sensor.sdf | 2 +- examples/worlds/default.sdf | 2 +- examples/worlds/detachable_joint.sdf | 8 +-- examples/worlds/diff_drive.sdf | 8 +-- examples/worlds/diff_drive_skid.sdf | 4 +- examples/worlds/elevator.sdf | 4 +- examples/worlds/empty.sdf | 10 ++-- examples/worlds/empty_gui.sdf | 2 +- .../worlds/gpu_lidar_retro_values_sensor.sdf | 2 +- examples/worlds/gpu_lidar_sensor.sdf | 2 +- examples/worlds/joint_controller.sdf | 8 +-- examples/worlds/joint_position_controller.sdf | 4 +- .../worlds/joint_trajectory_controller.sdf | 12 ++--- examples/worlds/kinetic_energy_monitor.sdf | 2 +- examples/worlds/levels.sdf | 4 +- examples/worlds/levels_no_performers.sdf | 10 ++-- examples/worlds/lift_drag.sdf | 4 +- examples/worlds/lift_drag_battery.sdf | 6 +-- examples/worlds/lift_drag_nested.sdf | 4 +- examples/worlds/linear_battery_demo.sdf | 16 +++--- examples/worlds/log_record_dbl_pendulum.sdf | 4 +- examples/worlds/log_record_keyboard.sdf | 4 +- examples/worlds/log_record_resources.sdf | 4 +- examples/worlds/log_record_shapes.sdf | 4 +- .../worlds/logical_audio_sensor_plugin.sdf | 6 +-- examples/worlds/logical_camera_sensor.sdf | 2 +- examples/worlds/mecanum_drive.sdf | 4 +- examples/worlds/model_photo_shoot.sdf | 2 +- .../worlds/multicopter_velocity_control.sdf | 12 ++--- .../worlds/optical_tactile_sensor_plugin.sdf | 2 +- examples/worlds/particle_emitter.sdf | 8 +-- examples/worlds/pendulum_links.sdf | 4 +- examples/worlds/perfect_comms.sdf | 2 +- examples/worlds/performer_detector.sdf | 4 +- examples/worlds/plane_propeller_demo.sdf | 2 +- examples/worlds/pose_publisher.sdf | 2 +- examples/worlds/quadcopter.sdf | 4 +- examples/worlds/rf_comms.sdf | 2 +- examples/worlds/sensors.sdf | 8 +-- examples/worlds/shapes.sdf | 2 +- examples/worlds/skid_steer_mecanum.sdf | 4 +- examples/worlds/spherical_coordinates.sdf | 6 +-- examples/worlds/touch_plugin.sdf | 4 +- examples/worlds/track_drive.sdf | 8 +-- examples/worlds/trajectory_follower.sdf | 4 +- examples/worlds/triggered_camera_sensor.sdf | 2 +- examples/worlds/triggered_publisher.sdf | 2 +- .../worlds/trisphere_cycle_wheel_slip.sdf | 2 +- examples/worlds/velocity_control.sdf | 4 +- examples/worlds/visualize_lidar.sdf | 2 +- examples/worlds/wind.sdf | 2 +- src/CMakeLists.txt | 8 +-- src/ModelCommandAPI_TEST.cc | 40 +++++++------- src/cmd/CMakeLists.txt | 14 ++--- src/cmd/cmdgazebo.rb.in | 54 ++++++++++--------- src/cmd/cmdmodel.rb.in | 10 ++-- src/cmd/gazebo.yaml.in | 6 ++- src/cmd/model.yaml.in | 2 +- src/{ign.cc => gz.cc} | 2 +- src/{ign.hh => gz.hh} | 0 src/{ign_TEST.cc => gz_TEST.cc} | 2 +- src/systems/air_pressure/AirPressure.hh | 2 +- src/systems/altimeter/Altimeter.hh | 2 +- src/systems/buoyancy/Buoyancy.hh | 4 +- src/systems/buoyancy_engine/BuoyancyEngine.hh | 8 +-- src/systems/contact/Contact.cc | 2 +- src/systems/hydrodynamics/Hydrodynamics.hh | 8 +-- src/systems/logical_camera/LogicalCamera.hh | 2 +- .../model_photo_shoot/ModelPhotoShoot.hh | 2 +- src/systems/thruster/Thruster.hh | 6 +-- .../triggered_publisher/TriggeredPublisher.cc | 2 +- .../triggered_publisher/TriggeredPublisher.hh | 4 +- test/integration/log_system.cc | 46 ++++++++-------- test/media/rolling_shapes_log/README.md | 2 +- .../model_photo_shoot_random_joints.sdf | 2 +- test/worlds/velocity_control.sdf | 4 +- tools/desktop/gz-sim.desktop.in | 2 +- tutorials/battery.md | 2 +- tutorials/collada_world_exporter.md | 2 +- tutorials/create_system_plugins.md | 2 +- tutorials/debugging.md | 10 ++-- tutorials/distributed_simulation.md | 8 +-- tutorials/entity_creation.md | 4 +- tutorials/erb_template.md | 4 +- tutorials/gui_config.md | 10 ++-- tutorials/headless_rendering.md | 6 +-- tutorials/levels.md | 10 ++-- tutorials/light_config.md | 2 +- tutorials/log.md | 6 +-- tutorials/logical_audio_sensor.md | 14 ++--- tutorials/mesh_to_fuel.md | 2 +- tutorials/model_command.md | 24 ++++----- tutorials/model_photo_shoot.md | 2 +- tutorials/particle_tutorial.md | 8 +-- tutorials/physics.md | 2 +- tutorials/server_config.md | 8 +-- tutorials/spherical_coordinates.md | 8 +-- tutorials/triggered_publisher.md | 6 +-- tutorials/underwater_vehicles.md | 10 ++-- tutorials/video_recorder.md | 2 +- 136 files changed, 382 insertions(+), 372 deletions(-) rename src/{ign.cc => gz.cc} (99%) rename src/{ign.hh => gz.hh} (100%) rename src/{ign_TEST.cc => gz_TEST.cc} (98%) diff --git a/.github/ci/after_make.sh b/.github/ci/after_make.sh index d7d0da54ef..51781ad6ae 100644 --- a/.github/ci/after_make.sh +++ b/.github/ci/after_make.sh @@ -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 & diff --git a/Changelog.md b/Changelog.md index 5df7354ea9..e16dc6d0d0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 @@ -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 @@ -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. @@ -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 @@ -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 @@ -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. @@ -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. diff --git a/Migration.md b/Migration.md index e56371fd6a..961b883408 100644 --- a/Migration.md +++ b/Migration.md @@ -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 @@ -190,7 +192,7 @@ in SDF by setting the `` 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 @@ -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` diff --git a/README.md b/README.md index ccf54a6cd1..aee4244849 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 ``` diff --git a/examples/plugin/command_actor/README.md b/examples/plugin/command_actor/README.md index 7f814ebe3b..a29cbacde8 100644 --- a/examples/plugin/command_actor/README.md +++ b/examples/plugin/command_actor/README.md @@ -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 diff --git a/examples/plugin/custom_component/README.md b/examples/plugin/custom_component/README.md index f4d83b93a6..13811a6366 100644 --- a/examples/plugin/custom_component/README.md +++ b/examples/plugin/custom_component/README.md @@ -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 diff --git a/examples/plugin/custom_sensor_system/README.md b/examples/plugin/custom_sensor_system/README.md index 3a04d7bad9..c5e43fcba1 100644 --- a/examples/plugin/custom_sensor_system/README.md +++ b/examples/plugin/custom_sensor_system/README.md @@ -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 ``` diff --git a/examples/plugin/gui_system_plugin/README.md b/examples/plugin/gui_system_plugin/README.md index c7286856bc..8fea7eea55 100644 --- a/examples/plugin/gui_system_plugin/README.md +++ b/examples/plugin/gui_system_plugin/README.md @@ -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". diff --git a/examples/plugin/hello_world/HelloWorld.cc b/examples/plugin/hello_world/HelloWorld.cc index 199f6e4122..f75e956baa 100644 --- a/examples/plugin/hello_world/HelloWorld.cc +++ b/examples/plugin/hello_world/HelloWorld.cc @@ -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; } diff --git a/examples/plugin/hello_world/README.md b/examples/plugin/hello_world/README.md index cae5fc44ad..87500fc417 100644 --- a/examples/plugin/hello_world/README.md +++ b/examples/plugin/hello_world/README.md @@ -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: diff --git a/examples/plugin/rendering_plugins/README.md b/examples/plugin/rendering_plugins/README.md index a40dcaf9dc..1d894d809f 100644 --- a/examples/plugin/rendering_plugins/README.md +++ b/examples/plugin/rendering_plugins/README.md @@ -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. diff --git a/examples/plugin/reset_plugin/README.md b/examples/plugin/reset_plugin/README.md index cd28de1560..c0d60b4a69 100644 --- a/examples/plugin/reset_plugin/README.md +++ b/examples/plugin/reset_plugin/README.md @@ -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}' diff --git a/examples/plugin/reset_plugin/joint_position_randomizer.sdf b/examples/plugin/reset_plugin/joint_position_randomizer.sdf index 7d79f5d3f4..033ac07987 100644 --- a/examples/plugin/reset_plugin/joint_position_randomizer.sdf +++ b/examples/plugin/reset_plugin/joint_position_randomizer.sdf @@ -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}' --> diff --git a/examples/scripts/distributed/primary.sh b/examples/scripts/distributed/primary.sh index d4c138ac6b..277f374237 100755 --- a/examples/scripts/distributed/primary.sh +++ b/examples/scripts/distributed/primary.sh @@ -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 diff --git a/examples/scripts/distributed/secondary.sh b/examples/scripts/distributed/secondary.sh index c3b1587981..f605b82b9c 100755 --- a/examples/scripts/distributed/secondary.sh +++ b/examples/scripts/distributed/secondary.sh @@ -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 diff --git a/examples/scripts/distributed/standalone.sh b/examples/scripts/distributed/standalone.sh index 5e61a13b66..b982728191 100755 --- a/examples/scripts/distributed/standalone.sh +++ b/examples/scripts/distributed/standalone.sh @@ -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 diff --git a/examples/scripts/distributed_levels/primary.sh b/examples/scripts/distributed_levels/primary.sh index e402340b40..8f07ffec2d 100755 --- a/examples/scripts/distributed_levels/primary.sh +++ b/examples/scripts/distributed_levels/primary.sh @@ -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 diff --git a/examples/scripts/distributed_levels/secondary.sh b/examples/scripts/distributed_levels/secondary.sh index fb98c7a19f..7eb3d7efc2 100755 --- a/examples/scripts/distributed_levels/secondary.sh +++ b/examples/scripts/distributed_levels/secondary.sh @@ -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 diff --git a/examples/scripts/distributed_levels/standalone.sh b/examples/scripts/distributed_levels/standalone.sh index 3820715341..5a022d579d 100755 --- a/examples/scripts/distributed_levels/standalone.sh +++ b/examples/scripts/distributed_levels/standalone.sh @@ -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 diff --git a/examples/scripts/log_video_recorder/README.md b/examples/scripts/log_video_recorder/README.md index 2108cc3fca..921697df95 100644 --- a/examples/scripts/log_video_recorder/README.md +++ b/examples/scripts/log_video_recorder/README.md @@ -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 diff --git a/examples/scripts/log_video_recorder/log_video_recorder.sdf b/examples/scripts/log_video_recorder/log_video_recorder.sdf index ae27d48874..66ef179246 100644 --- a/examples/scripts/log_video_recorder/log_video_recorder.sdf +++ b/examples/scripts/log_video_recorder/log_video_recorder.sdf @@ -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. --> diff --git a/examples/scripts/log_video_recorder/record_one_run.bash b/examples/scripts/log_video_recorder/record_one_run.bash index e3beb6305e..c0d447414b 100644 --- a/examples/scripts/log_video_recorder/record_one_run.bash +++ b/examples/scripts/log_video_recorder/record_one_run.bash @@ -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" diff --git a/examples/standalone/entity_creation/README.md b/examples/standalone/entity_creation/README.md index e9a4ffcc18..578ecf3d6b 100644 --- a/examples/standalone/entity_creation/README.md +++ b/examples/standalone/entity_creation/README.md @@ -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: diff --git a/examples/standalone/external_ecm/README.md b/examples/standalone/external_ecm/README.md index d65789813e..ff14a662f5 100644 --- a/examples/standalone/external_ecm/README.md +++ b/examples/standalone/external_ecm/README.md @@ -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: diff --git a/examples/standalone/joy_to_twist/README.md b/examples/standalone/joy_to_twist/README.md index 8f3b646cf8..144fc5c98f 100644 --- a/examples/standalone/joy_to_twist/README.md +++ b/examples/standalone/joy_to_twist/README.md @@ -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. diff --git a/examples/standalone/joystick/README.md b/examples/standalone/joystick/README.md index d658e9253e..c15d457857 100644 --- a/examples/standalone/joystick/README.md +++ b/examples/standalone/joystick/README.md @@ -39,7 +39,7 @@ the SDF file's `` 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 @@ -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. diff --git a/examples/standalone/keyboard/README.md b/examples/standalone/keyboard/README.md index 0430689caa..101bbd7ffc 100644 --- a/examples/standalone/keyboard/README.md +++ b/examples/standalone/keyboard/README.md @@ -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. diff --git a/examples/standalone/multi_lrauv_race/README.md b/examples/standalone/multi_lrauv_race/README.md index 43c71b7309..6609ba0f76 100644 --- a/examples/standalone/multi_lrauv_race/README.md +++ b/examples/standalone/multi_lrauv_race/README.md @@ -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 diff --git a/examples/worlds/ackermann_steering.sdf b/examples/worlds/ackermann_steering.sdf index 498f244540..22990dfaf3 100644 --- a/examples/worlds/ackermann_steering.sdf +++ b/examples/worlds/ackermann_steering.sdf @@ -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 --> diff --git a/examples/worlds/apply_joint_force.sdf b/examples/worlds/apply_joint_force.sdf index a863a8d97e..844c66accf 100644 --- a/examples/worlds/apply_joint_force.sdf +++ b/examples/worlds/apply_joint_force.sdf @@ -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" --> diff --git a/examples/worlds/auv_controls.sdf b/examples/worlds/auv_controls.sdf index 319dbb97b1..08a1a44698 100644 --- a/examples/worlds/auv_controls.sdf +++ b/examples/worlds/auv_controls.sdf @@ -16,12 +16,12 @@ 1. Move the rudder: - ign topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos \ + gz topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos \ -m gz.msgs.Double -p 'data: -0.17' 2. Propel the vehicle: - ign topic -t /model/tethys/joint/propeller_joint/cmd_thrust + gz topic -t /model/tethys/joint/propeller_joint/cmd_thrust -m gz.msgs.Double -p 'data: -31' --> diff --git a/examples/worlds/breadcrumbs.sdf b/examples/worlds/breadcrumbs.sdf index e8c4db2a66..d68e8f1f04 100644 --- a/examples/worlds/breadcrumbs.sdf +++ b/examples/worlds/breadcrumbs.sdf @@ -6,12 +6,12 @@ To move the vehicle: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}" To drop breadcrumbs: - ign topic -t "/B1/deploy" -m gz.msgs.Empty -p "unused: true" - ign topic -t "/B2/deploy" -m gz.msgs.Empty -p "unused: true" + gz topic -t "/B1/deploy" -m gz.msgs.Empty -p "unused: true" + gz topic -t "/B2/deploy" -m gz.msgs.Empty -p "unused: true" --> diff --git a/examples/worlds/buoyancy.sdf b/examples/worlds/buoyancy.sdf index 58b064af32..14eb5a52fd 100644 --- a/examples/worlds/buoyancy.sdf +++ b/examples/worlds/buoyancy.sdf @@ -7,7 +7,7 @@ 2. submarine_sinking: A simple submarine model that is not buoyant and sinks. 3. submarine_buoyant: A simple submarine model that is buoyant and floats. - To run this demo: `ign gazebo -v 4 buoyancy.sdf` + To run this demo: `gz sim -v 4 buoyancy.sdf` To alter a submarine's buoyancy do one or both of the following: @@ -16,7 +16,7 @@ To drive the submarine model: - 1. ign topic -t "/model/submarine/joint/propeller_joint/cmd_force" -m gz.msgs.Double -p "data: 1.2" + 1. gz topic -t "/model/submarine/joint/propeller_joint/cmd_force" -m gz.msgs.Double -p "data: 1.2" --> diff --git a/examples/worlds/buoyancy_engine.sdf b/examples/worlds/buoyancy_engine.sdf index 955a3152fc..3be960d1b4 100644 --- a/examples/worlds/buoyancy_engine.sdf +++ b/examples/worlds/buoyancy_engine.sdf @@ -33,7 +33,7 @@ listens to the topic `buoyancy_engine` or To get started run: ``` -ign gazebo buoyancy_engine.sdf +gz sim buoyancy_engine.sdf ``` You will see two boxes. The box on the right doesn't have a surface set whereas the box on the left does. When commanded to go up, the box on the left will rise @@ -41,19 +41,19 @@ until it breaches and then start oscillating around the surface. On the other hand the box on the right will rise forever as no surface is set. Enter the following in a separate terminal: ``` -ign topic -t /model/buoyant_box/buoyancy_engine/ -m gz.msgs.Double +gz topic -t /model/buoyant_box/buoyancy_engine/ -m gz.msgs.Double -p "data: 0.003" ``` The boxes will float up. Note that the box on the left will start oscillating once it breaches the surface. ``` -ign topic -t /model/buoyant_box/buoyancy_engine/ -m gz.msgs.Double +gz topic -t /model/buoyant_box/buoyancy_engine/ -m gz.msgs.Double -p "data: 0.001" ``` The boxes will go down. To see the current volume enter: ``` -ign topic -t /model/buoyant_box/buoyancy_engine/current_volume -e +gz topic -t /model/buoyant_box/buoyancy_engine/current_volume -e ``` --> diff --git a/examples/worlds/camera_video_record_dbl_pendulum.sdf b/examples/worlds/camera_video_record_dbl_pendulum.sdf index d4caee8394..21d73dff67 100644 --- a/examples/worlds/camera_video_record_dbl_pendulum.sdf +++ b/examples/worlds/camera_video_record_dbl_pendulum.sdf @@ -4,11 +4,11 @@ Call the following service to start video recording: - ign service -s /camera/record_video --reqtype gz.msgs.VideoRecord --reptype gz.msgs.Boolean --timeout 300 --req 'start: true, format:"mp4", save_filename:"test.mp4"' + gz service -s /camera/record_video --reqtype gz.msgs.VideoRecord --reptype gz.msgs.Boolean --timeout 300 --req 'start: true, format:"mp4", save_filename:"test.mp4"' Call the following service to stop video recording: - ign service -s /camera/record_video --reqtype gz.msgs.VideoRecord --reptype gz.msgs.Boolean --timeout 300 --req 'stop: true' + gz service -s /camera/record_video --reqtype gz.msgs.VideoRecord --reptype gz.msgs.Boolean --timeout 300 --req 'stop: true' The video is saved to test.mp4 diff --git a/examples/worlds/collada_world_exporter.sdf b/examples/worlds/collada_world_exporter.sdf index 47b20fc35b..3a7b40be9e 100644 --- a/examples/worlds/collada_world_exporter.sdf +++ b/examples/worlds/collada_world_exporter.sdf @@ -8,7 +8,7 @@ materials for the world. This example just exports simple shapes into a Collada file. To run use: - ign gazebo -v 4 -s -r --iterations 1 collada_world_exporter.sdf + gz sim -v 4 -s -r --iterations 1 collada_world_exporter.sdf --> diff --git a/examples/worlds/contact_sensor.sdf b/examples/worlds/contact_sensor.sdf index b5fa5665a6..be33753326 100644 --- a/examples/worlds/contact_sensor.sdf +++ b/examples/worlds/contact_sensor.sdf @@ -5,7 +5,7 @@ Gazebo contact sensor example Run the following to print out contacts, - ign topic -e -t "/contact_example" + gz topic -e -t "/contact_example" --> diff --git a/examples/worlds/default.sdf b/examples/worlds/default.sdf index acd9c876d6..34cfb29ebd 100644 --- a/examples/worlds/default.sdf +++ b/examples/worlds/default.sdf @@ -2,7 +2,7 @@ diff --git a/examples/worlds/diff_drive.sdf b/examples/worlds/diff_drive.sdf index 36c826ef65..64d93a5429 100644 --- a/examples/worlds/diff_drive.sdf +++ b/examples/worlds/diff_drive.sdf @@ -4,15 +4,15 @@ Try sending commands: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}" - ign topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.1}" + gz topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.1}" Listen to odometry: - ign topic -e -t /model/vehicle_blue/odometry + gz topic -e -t /model/vehicle_blue/odometry - ign topic -e -t /model/vehicle_green/odometry + gz topic -e -t /model/vehicle_green/odometry --> diff --git a/examples/worlds/diff_drive_skid.sdf b/examples/worlds/diff_drive_skid.sdf index f19dd8ac7e..0a6c2539ad 100644 --- a/examples/worlds/diff_drive_skid.sdf +++ b/examples/worlds/diff_drive_skid.sdf @@ -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.05}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}" Listen to odometry: - ign topic -e -t /model/vehicle_blue/odometry + gz topic -e -t /model/vehicle_blue/odometry --> diff --git a/examples/worlds/elevator.sdf b/examples/worlds/elevator.sdf index 907c27eb83..4f6917f209 100644 --- a/examples/worlds/elevator.sdf +++ b/examples/worlds/elevator.sdf @@ -4,11 +4,11 @@ Try sending a command: - ign topic -t "/model/elevator/cmd" -m gz.msgs.Int32 -p "data: 2" + gz topic -t "/model/elevator/cmd" -m gz.msgs.Int32 -p "data: 2" Listen to state: - ign topic -e -t /model/elevator/state + gz topic -e -t /model/elevator/state --> diff --git a/examples/worlds/empty.sdf b/examples/worlds/empty.sdf index b20fb4729c..c6a48b8abd 100644 --- a/examples/worlds/empty.sdf +++ b/examples/worlds/empty.sdf @@ -2,7 +2,7 @@ diff --git a/examples/worlds/gpu_lidar_sensor.sdf b/examples/worlds/gpu_lidar_sensor.sdf index 2e877ff70e..66c2681b6c 100644 --- a/examples/worlds/gpu_lidar_sensor.sdf +++ b/examples/worlds/gpu_lidar_sensor.sdf @@ -1,7 +1,7 @@ diff --git a/examples/worlds/joint_controller.sdf b/examples/worlds/joint_controller.sdf index 27d226d3b6..a5df3137a7 100644 --- a/examples/worlds/joint_controller.sdf +++ b/examples/worlds/joint_controller.sdf @@ -4,15 +4,15 @@ Try sending joint velocity commands (velocity mode): - ign topic -t "/model/joint_controller_demo/joint/j1/cmd_vel" -m gz.msgs.Double -p "data: -1.0" + gz topic -t "/model/joint_controller_demo/joint/j1/cmd_vel" -m gz.msgs.Double -p "data: -1.0" - ign topic -t "/model/joint_controller_demo/joint/j1/cmd_vel" -m gz.msgs.Double -p "data: 10.0" + gz topic -t "/model/joint_controller_demo/joint/j1/cmd_vel" -m gz.msgs.Double -p "data: 10.0" Try sending joint velocity commands (force mode): - ign topic -t "/model/joint_controller_demo_2/joint/j1/cmd_vel" -m gz.msgs.Double -p "data: -1.0" + gz topic -t "/model/joint_controller_demo_2/joint/j1/cmd_vel" -m gz.msgs.Double -p "data: -1.0" - ign topic -t "/model/joint_controller_demo_2/joint/j1/cmd_vel" -m gz.msgs.Double -p "data: 10.0" + gz topic -t "/model/joint_controller_demo_2/joint/j1/cmd_vel" -m gz.msgs.Double -p "data: 10.0" --> diff --git a/examples/worlds/joint_position_controller.sdf b/examples/worlds/joint_position_controller.sdf index 0ac07eaefb..401c4eae3b 100644 --- a/examples/worlds/joint_position_controller.sdf +++ b/examples/worlds/joint_position_controller.sdf @@ -4,9 +4,9 @@ Try sending joint position commands: - ign topic -t "/rotor_cmd" -m gz.msgs.Double -p "data: -1.0" + gz topic -t "/rotor_cmd" -m gz.msgs.Double -p "data: -1.0" - ign topic -t "/rotor_cmd" -m gz.msgs.Double -p "data: 1.0" + gz topic -t "/rotor_cmd" -m gz.msgs.Double -p "data: 1.0" --> diff --git a/examples/worlds/joint_trajectory_controller.sdf b/examples/worlds/joint_trajectory_controller.sdf index 4240a1ed06..83af697ac7 100644 --- a/examples/worlds/joint_trajectory_controller.sdf +++ b/examples/worlds/joint_trajectory_controller.sdf @@ -6,7 +6,7 @@ - Position control (Red RR robot) - - ign topic -t "/model/RR_position_control/joint_trajectory" -m gz.msgs.JointTrajectory -p ' + gz topic -t "/model/RR_position_control/joint_trajectory" -m gz.msgs.JointTrajectory -p ' joint_names: "RR_position_control_joint1" joint_names: "RR_position_control_joint2" points { @@ -45,7 +45,7 @@ - Velocity control (Green RR robot) - - ign topic -t "/model/RR_velocity_control/joint_trajectory" -m gz.msgs.JointTrajectory -p ' + gz topic -t "/model/RR_velocity_control/joint_trajectory" -m gz.msgs.JointTrajectory -p ' joint_names: "RR_velocity_control_joint1" joint_names: "RR_velocity_control_joint2" points { @@ -84,7 +84,7 @@ - Effort control (Blue RR robot) - - ign topic -t "/custom_topic_effort_control" -m gz.msgs.JointTrajectory -p ' + gz topic -t "/custom_topic_effort_control" -m gz.msgs.JointTrajectory -p ' joint_names: "RR_effort_control_joint1" joint_names: "RR_effort_control_joint2" points { @@ -115,9 +115,9 @@ Progress of each trajectory can then be tracked by subscribing to the corresponding topic: - ign topic -e -t "/model/RR_position_control/joint_trajectory_progress" - ign topic -e -t "/model/RR_velocity_control/joint_trajectory_progress" - ign topic -e -t "/custom_topic_effort_control_progress" + gz topic -e -t "/model/RR_position_control/joint_trajectory_progress" + gz topic -e -t "/model/RR_velocity_control/joint_trajectory_progress" + gz topic -e -t "/custom_topic_effort_control_progress" To enable hybrid control, e.g. position + velocity control, parameters for both PID controllers diff --git a/examples/worlds/kinetic_energy_monitor.sdf b/examples/worlds/kinetic_energy_monitor.sdf index 313fb34d5f..d2d33eeafa 100644 --- a/examples/worlds/kinetic_energy_monitor.sdf +++ b/examples/worlds/kinetic_energy_monitor.sdf @@ -4,7 +4,7 @@ Monitor output using: - ign topic -et "/model/sphere/kinetic_energy" + gz topic -et "/model/sphere/kinetic_energy" --> diff --git a/examples/worlds/levels.sdf b/examples/worlds/levels.sdf index f6112c8673..6a3bcc5562 100644 --- a/examples/worlds/levels.sdf +++ b/examples/worlds/levels.sdf @@ -5,9 +5,9 @@ Start gazebo using the "--levels" flag. Start the simulation and try sending commands: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 4.0}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 4.0}" - ign topic -t "/model/vehicle_red/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 2.0}" + gz topic -t "/model/vehicle_red/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 2.0}" --> diff --git a/examples/worlds/levels_no_performers.sdf b/examples/worlds/levels_no_performers.sdf index 1012a2b1db..3d37657f33 100644 --- a/examples/worlds/levels_no_performers.sdf +++ b/examples/worlds/levels_no_performers.sdf @@ -5,21 +5,21 @@ * Start gazebo using the "--levels" flag. * Start the simulation and try sending commands: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 4.0}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 4.0}" - ign topic -t "/model/vehicle_red/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 2.0}" + gz topic -t "/model/vehicle_red/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 2.0}" * The vehicles should both drive off the world's edge. * Restart simulation with the "--levels" flag. * This time, tell simulation that the "vehicle_red" is a perfomer using: - ign service -s /world/levels/level/set_performer --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "vehicle_red"' + gz service -s /world/levels/level/set_performer --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "vehicle_red"' * Apply a velocity command to both vehicles: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 4.0}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 4.0}" - ign topic -t "/model/vehicle_red/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 2.0}" + gz topic -t "/model/vehicle_red/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 2.0}" * The red vehicle will have a longer runway as new levels load. diff --git a/examples/worlds/lift_drag.sdf b/examples/worlds/lift_drag.sdf index 44e40f7f55..cdc778da3e 100644 --- a/examples/worlds/lift_drag.sdf +++ b/examples/worlds/lift_drag.sdf @@ -6,11 +6,11 @@ Try sending commands: - ign topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.7" + gz topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.7" Listen to joint states: - ign topic -e -t /world/lift_drag/model/lift_drag_demo_model/joint_state + gz topic -e -t /world/lift_drag/model/lift_drag_demo_model/joint_state --> diff --git a/examples/worlds/lift_drag_battery.sdf b/examples/worlds/lift_drag_battery.sdf index ae4d78be46..b03ab18eb0 100644 --- a/examples/worlds/lift_drag_battery.sdf +++ b/examples/worlds/lift_drag_battery.sdf @@ -6,15 +6,15 @@ Try sending commands: - ign topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.7" + gz topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.7" Listen to joint states: - ign topic -e -t /world/lift_drag/model/lift_drag_demo_model/joint_state + gz topic -e -t /world/lift_drag/model/lift_drag_demo_model/joint_state Listen to battery state: - ign topic -et /model/lift_drag_demo_model/battery/linear_battery/state + gz topic -et /model/lift_drag_demo_model/battery/linear_battery/state --> diff --git a/examples/worlds/lift_drag_nested.sdf b/examples/worlds/lift_drag_nested.sdf index 7e6742c74f..d3e1bad2bf 100644 --- a/examples/worlds/lift_drag_nested.sdf +++ b/examples/worlds/lift_drag_nested.sdf @@ -7,11 +7,11 @@ Try sending commands: - ign topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.7" + gz topic -t "/model/lift_drag_demo_model/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 0.7" Listen to joint states: - ign topic -e -t /world/lift_drag/model/lift_drag_demo_model/joint_state + gz topic -e -t /world/lift_drag/model/lift_drag_demo_model/joint_state --> diff --git a/examples/worlds/linear_battery_demo.sdf b/examples/worlds/linear_battery_demo.sdf index ec6e3e954e..6acf266553 100644 --- a/examples/worlds/linear_battery_demo.sdf +++ b/examples/worlds/linear_battery_demo.sdf @@ -6,27 +6,27 @@ It's recommended to run this demo at a high RTF, so it's faster to observe the battery drain: - ign gazebo -v 4 linear_battery_demo.sdf -z 1000000 + gz sim -v 4 linear_battery_demo.sdf -z 1000000 Move both vehicles: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 6.0} angular: {z: 0.4}" - ign topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 6.0} angular: {z: 0.4}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 6.0} angular: {z: 0.4}" + gz topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 6.0} angular: {z: 0.4}" Listen to battery state of charge: - ign topic -e -t /model/vehicle_blue/battery/linear_battery/state + gz topic -e -t /model/vehicle_blue/battery/linear_battery/state Recharge the battery using a service (default): - ign service -s /model/vehicle_blue/battery/linear_battery/recharge/start --reqtype gz.msgs.Boolean --reptype gz.msgs.Empty --req 'data:true' --timeout 1000 + gz service -s /model/vehicle_blue/battery/linear_battery/recharge/start --reqtype gz.msgs.Boolean --reptype gz.msgs.Empty --req 'data:true' --timeout 1000 Recharge the battery using a topic (optional if is true): - ign topic -t /model/vehicle_blue/battery/linear_battery/recharge/start -m gz.msgs.Boolean -p 'data:true' + gz topic -t /model/vehicle_blue/battery/linear_battery/recharge/start -m gz.msgs.Boolean -p 'data:true' Stop recharging the battery using a service (default): - ign service -s /model/vehicle_blue/battery/linear_battery/recharge/stop --reqtype gz.msgs.Boolean --reptype gz.msgs.Empty --req 'data:true' --timeout 1000 + gz service -s /model/vehicle_blue/battery/linear_battery/recharge/stop --reqtype gz.msgs.Boolean --reptype gz.msgs.Empty --req 'data:true' --timeout 1000 Stop recharging the battery using a topic (optional if is true): - ign topic -t /model/vehicle_blue/battery/linear_battery/recharge/stop -m gz.msgs.Boolean -p 'data:true' + gz topic -t /model/vehicle_blue/battery/linear_battery/recharge/stop -m gz.msgs.Boolean -p 'data:true' After the battery runs out, no force is applied to the joints in the blue vehicle. It eventually comes to a stop due to friction in its joints. Had there been no joint friction, diff --git a/examples/worlds/log_record_dbl_pendulum.sdf b/examples/worlds/log_record_dbl_pendulum.sdf index d3a225380f..d3ec96c275 100644 --- a/examples/worlds/log_record_dbl_pendulum.sdf +++ b/examples/worlds/log_record_dbl_pendulum.sdf @@ -5,13 +5,13 @@ Running this world will record log files to ~/.gz/sim/log/ by default. - Running `ign gazebo` with `-v 3` or `-v 4` will output a message indicating where + Running `gz sim` with `-v 3` or `-v 4` will output a message indicating where your logfile is being stored to (e.g., [Msg] Recording to log file [/home/username/.gz/sim/log//state.tlog]). You can playback the logs with: - ign gazebo --playback ~/.gz/sim/log/ + gz sim --playback ~/.gz/sim/log/ --> diff --git a/examples/worlds/log_record_keyboard.sdf b/examples/worlds/log_record_keyboard.sdf index c37dffe0cf..b66a3ac70c 100644 --- a/examples/worlds/log_record_keyboard.sdf +++ b/examples/worlds/log_record_keyboard.sdf @@ -5,7 +5,7 @@ Running this world will record log files to ~/.gz/sim/log/ by default. - Running `ign gazebo` with `-v 3` or `-v 4` will output a message indicating where + Running `gz sim` with `-v 3` or `-v 4` will output a message indicating where your logfile is being stored to (e.g., [Msg] Recording to log file [/home/username/.gz/sim/log//state.tlog]). @@ -13,7 +13,7 @@ You can playback the logs with: - ign gazebo --playback ~/.gz/sim/log/ + gz sim --playback ~/.gz/sim/log/ --> diff --git a/examples/worlds/log_record_resources.sdf b/examples/worlds/log_record_resources.sdf index 9d47a63646..05451bf728 100644 --- a/examples/worlds/log_record_resources.sdf +++ b/examples/worlds/log_record_resources.sdf @@ -5,13 +5,13 @@ Running this world will record log files to ~/.gz/sim/log/ by default. - Running `ign gazebo` with `-v 3` or `-v 4` will output a message indicating where + Running `gz sim` with `-v 3` or `-v 4` will output a message indicating where your logfile is being stored to (e.g., [Msg] Recording to log file [/home/username/.gz/sim/log//state.tlog]). You can playback the logs with: - ign gazebo --playback ~/.gz/sim/log/ + gz sim --playback ~/.gz/sim/log/ --> diff --git a/examples/worlds/log_record_shapes.sdf b/examples/worlds/log_record_shapes.sdf index e63d32c588..743b369782 100644 --- a/examples/worlds/log_record_shapes.sdf +++ b/examples/worlds/log_record_shapes.sdf @@ -5,14 +5,14 @@ Running this world will record log files to ~/.gz/sim/log/ by default. - Running `ign gazebo` with `-v 3` or `-v 4` will output a message indicating where + Running `gz sim` with `-v 3` or `-v 4` will output a message indicating where your logfile is being stored to (e.g., [Msg] Recording to log file [/home/username/.gz/sim/log//state.tlog]). You can playback the logs with: - ign gazebo --playback ~/.gz/sim/log/ + gz sim --playback ~/.gz/sim/log/ --> diff --git a/examples/worlds/logical_audio_sensor_plugin.sdf b/examples/worlds/logical_audio_sensor_plugin.sdf index b6252d4b9e..48d112cfd4 100644 --- a/examples/worlds/logical_audio_sensor_plugin.sdf +++ b/examples/worlds/logical_audio_sensor_plugin.sdf @@ -11,12 +11,12 @@ /source_/stop service calls. To play the source attached to the blue box, run the following command: - ign service -s /model/blue_box/sensor/source_1/play + gz service -s /model/blue_box/sensor/source_1/play --reqtype gz.msgs.Empty --reptype gz.msgs.Boolean --timeout 1000 --req 'unused: false' To stop the source attached to the blue box, run the following command: - ign service -s /model/blue_box/sensor/source_1/stop + gz service -s /model/blue_box/sensor/source_1/stop --reqtype gz.msgs.Empty --reptype gz.msgs.Boolean --timeout 1000 --req 'unused: false' @@ -24,7 +24,7 @@ The following command will display detections heard by the microphone attached to the green box: - ign topic -e -t /model/green_box/sensor/mic_1/detection + gz topic -e -t /model/green_box/sensor/mic_1/detection --> diff --git a/examples/worlds/logical_camera_sensor.sdf b/examples/worlds/logical_camera_sensor.sdf index bb791de1ea..5be7f99bc1 100644 --- a/examples/worlds/logical_camera_sensor.sdf +++ b/examples/worlds/logical_camera_sensor.sdf @@ -4,7 +4,7 @@ Listen to sensor readings: - ign topic -e -t /logical_camera + gz topic -e -t /logical_camera --> diff --git a/examples/worlds/mecanum_drive.sdf b/examples/worlds/mecanum_drive.sdf index 1c71dcd17f..829b135d86 100644 --- a/examples/worlds/mecanum_drive.sdf +++ b/examples/worlds/mecanum_drive.sdf @@ -4,9 +4,9 @@ Try sending commands: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5, y: 0.5}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5, y: 0.5}" - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {y: 0.5}, angular: {z: 0.2}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {y: 0.5}, angular: {z: 0.2}" --> diff --git a/examples/worlds/model_photo_shoot.sdf b/examples/worlds/model_photo_shoot.sdf index 0123fa9378..f7b1a84600 100644 --- a/examples/worlds/model_photo_shoot.sdf +++ b/examples/worlds/model_photo_shoot.sdf @@ -3,7 +3,7 @@ Gazebo Model Photo Shoot plugin demo This will take perspective, top, front, and both sides pictures of the model: - ign gazebo -s -r -v 4 \-\-iterations 50 model_photo_shoot.sdf + gz sim -s -r -v 4 \-\-iterations 50 model_photo_shoot.sdf --> diff --git a/examples/worlds/multicopter_velocity_control.sdf b/examples/worlds/multicopter_velocity_control.sdf index 3dc0d95202..c09e662fa5 100644 --- a/examples/worlds/multicopter_velocity_control.sdf +++ b/examples/worlds/multicopter_velocity_control.sdf @@ -6,28 +6,28 @@ You can use the velocity controller and command linear velocity and yaw angular Send commands to the quadcopter to go straight up: - ign topic -t "/X3/gazebo/command/twist" -m gz.msgs.Twist -p "linear: {x:0 y: 0 z: 0.1} angular {z: 0}" + gz topic -t "/X3/gazebo/command/twist" -m gz.msgs.Twist -p "linear: {x:0 y: 0 z: 0.1} angular {z: 0}" To hover - ign topic -t "/X3/gazebo/command/twist" -m gz.msgs.Twist -p " " + gz topic -t "/X3/gazebo/command/twist" -m gz.msgs.Twist -p " " Listen to odometry: - ign topic -e -t "/model/x3/odometry" + gz topic -e -t "/model/x3/odometry" Send commands to the hexacopter to go straight up: - ign topic -t "/X4/gazebo/command/twist" -m gz.msgs.Twist -p "linear: {x:0 y: 0 z: 0.1} angular {z: 0}" + gz topic -t "/X4/gazebo/command/twist" -m gz.msgs.Twist -p "linear: {x:0 y: 0 z: 0.1} angular {z: 0}" To hover - ign topic -t "/X4/gazebo/command/twist" -m gz.msgs.Twist -p " " + gz topic -t "/X4/gazebo/command/twist" -m gz.msgs.Twist -p " " Listen to odometry: - ign topic -e -t "/model/X4/odometry" + gz topic -e -t "/model/X4/odometry" --> diff --git a/examples/worlds/optical_tactile_sensor_plugin.sdf b/examples/worlds/optical_tactile_sensor_plugin.sdf index 4dae0b7eb2..e9539b9465 100644 --- a/examples/worlds/optical_tactile_sensor_plugin.sdf +++ b/examples/worlds/optical_tactile_sensor_plugin.sdf @@ -6,7 +6,7 @@ Disable the sensor with: - ign service -s /optical_tactile_plugin/enable \ + gz service -s /optical_tactile_plugin/enable \ --reqtype gz.msgs.Boolean \ --reptype gz.msgs.Empty \ --timeout 2000 --req 'data: false' diff --git a/examples/worlds/particle_emitter.sdf b/examples/worlds/particle_emitter.sdf index cd4ca08306..11fcbca14b 100644 --- a/examples/worlds/particle_emitter.sdf +++ b/examples/worlds/particle_emitter.sdf @@ -3,21 +3,21 @@ diff --git a/examples/worlds/pendulum_links.sdf b/examples/worlds/pendulum_links.sdf index 8b86e6bdf3..e64c3a99b2 100644 --- a/examples/worlds/pendulum_links.sdf +++ b/examples/worlds/pendulum_links.sdf @@ -3,9 +3,9 @@ Gazebo link velocity control demo Try sending commands: - ign topic -t "/model/double_pendulum_with_base/link/lower_link/cmd_vel" -m gz.msgs.Twist -p "angular: {x: 0.5}" + gz topic -t "/model/double_pendulum_with_base/link/lower_link/cmd_vel" -m gz.msgs.Twist -p "angular: {x: 0.5}" - ign topic -t "/model/double_pendulum_with_base/link/upper_link/cmd_vel" -m gz.msgs.Twist -p "linear: {x:0.2}, angular: {x: 0.5}" + gz topic -t "/model/double_pendulum_with_base/link/upper_link/cmd_vel" -m gz.msgs.Twist -p "linear: {x:0.2}, angular: {x: 0.5}" --> diff --git a/examples/worlds/perfect_comms.sdf b/examples/worlds/perfect_comms.sdf index c83ffae5e3..19d0bac114 100644 --- a/examples/worlds/perfect_comms.sdf +++ b/examples/worlds/perfect_comms.sdf @@ -10,7 +10,7 @@ make Try launching a comms subscriber: - ign topic -e -t addr2/rx + gz topic -e -t addr2/rx Try launching a comms publisher: ./publisher addr2 diff --git a/examples/worlds/performer_detector.sdf b/examples/worlds/performer_detector.sdf index b7c8a1b5da..1833c4a612 100644 --- a/examples/worlds/performer_detector.sdf +++ b/examples/worlds/performer_detector.sdf @@ -5,11 +5,11 @@ To move the vehicle: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}" Then, echo the PerformerDetector's topic to see when the vehicle is detected - ign topic -e -t /performer_detector + gz topic -e -t /performer_detector --> diff --git a/examples/worlds/plane_propeller_demo.sdf b/examples/worlds/plane_propeller_demo.sdf index e5ad836587..960d1d6f27 100644 --- a/examples/worlds/plane_propeller_demo.sdf +++ b/examples/worlds/plane_propeller_demo.sdf @@ -6,7 +6,7 @@ Try sending commands: - ign topic -t "/model/propeller_plane/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 70" + gz topic -t "/model/propeller_plane/joint/rod_1_joint/cmd_force" -m gz.msgs.Double -p "data: 70" --> diff --git a/examples/worlds/pose_publisher.sdf b/examples/worlds/pose_publisher.sdf index d8d0f31575..858d802d67 100644 --- a/examples/worlds/pose_publisher.sdf +++ b/examples/worlds/pose_publisher.sdf @@ -4,7 +4,7 @@ Try listening to topic: - ign topic -e -t "/model/double_pendulum_with_base/pose" + gz topic -e -t "/model/double_pendulum_with_base/pose" --> diff --git a/examples/worlds/quadcopter.sdf b/examples/worlds/quadcopter.sdf index 3b2c0ab790..423521f0a8 100644 --- a/examples/worlds/quadcopter.sdf +++ b/examples/worlds/quadcopter.sdf @@ -4,11 +4,11 @@ Send commands to go straight up: - ign topic -t /X3/gazebo/command/motor_speed --msgtype gz.msgs.Actuators -p 'velocity:[700, 700, 700, 700]' + gz topic -t /X3/gazebo/command/motor_speed --msgtype gz.msgs.Actuators -p 'velocity:[700, 700, 700, 700]' And to turn off propellers: - ign topic -t /X3/gazebo/command/motor_speed --msgtype gz.msgs.Actuators -p 'velocity:[0, 0, 0, 0]' + gz topic -t /X3/gazebo/command/motor_speed --msgtype gz.msgs.Actuators -p 'velocity:[0, 0, 0, 0]' --> diff --git a/examples/worlds/rf_comms.sdf b/examples/worlds/rf_comms.sdf index 00cae588d7..0ddf0cd970 100644 --- a/examples/worlds/rf_comms.sdf +++ b/examples/worlds/rf_comms.sdf @@ -10,7 +10,7 @@ make Try launching a comms subscriber: - ign topic -e -t addr2/rx + gz topic -e -t addr2/rx Try launching a comms publisher: ./publisher addr2 diff --git a/examples/worlds/sensors.sdf b/examples/worlds/sensors.sdf index e0bc60324b..5fd716d092 100644 --- a/examples/worlds/sensors.sdf +++ b/examples/worlds/sensors.sdf @@ -4,10 +4,10 @@ Listen to sensor readings: - Altimeter: ign topic -e -t /altimeter - Imu: ign topic -e -t /imu - Magnetometer: ign topic -e -t /magnetometer - Air pressure: ign topic -e -t /air_pressure + Altimeter: gz topic -e -t /altimeter + Imu: gz topic -e -t /imu + Magnetometer: gz topic -e -t /magnetometer + Air pressure: gz topic -e -t /air_pressure --> diff --git a/examples/worlds/shapes.sdf b/examples/worlds/shapes.sdf index eb76c2a0a1..1d75661b49 100644 --- a/examples/worlds/shapes.sdf +++ b/examples/worlds/shapes.sdf @@ -3,7 +3,7 @@ Try moving a model: - ign service -s /world/shapes/set_pose --reqtype gz.msgs.Pose --reptype gz.msgs.Boolean --timeout 300 --req 'name: "box", position: {z: 5.0}' + gz service -s /world/shapes/set_pose --reqtype gz.msgs.Pose --reptype gz.msgs.Boolean --timeout 300 --req 'name: "box", position: {z: 5.0}' --> diff --git a/examples/worlds/skid_steer_mecanum.sdf b/examples/worlds/skid_steer_mecanum.sdf index 9c86851d9e..2b7b910606 100644 --- a/examples/worlds/skid_steer_mecanum.sdf +++ b/examples/worlds/skid_steer_mecanum.sdf @@ -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.05}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}" Listen to odometry: - ign topic -e -t /model/vehicle_blue/odometry + gz topic -e -t /model/vehicle_blue/odometry --> diff --git a/examples/worlds/spherical_coordinates.sdf b/examples/worlds/spherical_coordinates.sdf index 5c18c649fb..8d140c0bfc 100644 --- a/examples/worlds/spherical_coordinates.sdf +++ b/examples/worlds/spherical_coordinates.sdf @@ -10,7 +10,7 @@ Try changing the world origin coordinates with: -ign service \ +gz service \ -s /world/spherical_coordinates/set_spherical_coordinates \ --reqtype gz.msgs.SphericalCoordinates \ --reptype gz.msgs.Boolean \ @@ -19,7 +19,7 @@ ign service \ Spawn a model in spherical coordinates: -ign service -s /world/spherical_coordinates/create \ +gz service -s /world/spherical_coordinates/create \ --reqtype gz.msgs.EntityFactory \ --reptype gz.msgs.Boolean \ --timeout 300 \ @@ -41,7 +41,7 @@ ign service -s /world/spherical_coordinates/create \ Move a model in spherical coordinates: -ign service -s /world/spherical_coordinates/set_spherical_coordinates \ +gz service -s /world/spherical_coordinates/set_spherical_coordinates \ --reqtype gz.msgs.SphericalCoordinates \ --reptype gz.msgs.Boolean \ --timeout 300 \ diff --git a/examples/worlds/touch_plugin.sdf b/examples/worlds/touch_plugin.sdf index f1277a5dfb..1800a77228 100644 --- a/examples/worlds/touch_plugin.sdf +++ b/examples/worlds/touch_plugin.sdf @@ -7,7 +7,7 @@ least one link on the model on which this plugin is attached. The plugin's parameters are documented in src/systems/touchplugin/TouchPlugin.hh If the plugin is not enabled by default send this command to enable - ign service -s /white_touches_only_green/enable \ + gz service -s /white_touches_only_green/enable \ --reqtype gz.msgs.Boolean \ --reptype gz.msgs.Empty \ --timeout 3000 \ @@ -15,7 +15,7 @@ If the plugin is not enabled by default send this command to enable The output of the plugin is via - ign topic -e -t /white_touches_only_green/touched + gz topic -e -t /white_touches_only_green/touched --> diff --git a/examples/worlds/track_drive.sdf b/examples/worlds/track_drive.sdf index b2132df1cf..9e77ec28d7 100644 --- a/examples/worlds/track_drive.sdf +++ b/examples/worlds/track_drive.sdf @@ -4,15 +4,15 @@ Try sending commands: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.7}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.7}" - ign topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.8}" + gz topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.8}" Listen to odometry: - ign topic -e -t /model/vehicle_blue/odometry + gz topic -e -t /model/vehicle_blue/odometry - ign topic -e -t /model/vehicle_green/odometry + gz topic -e -t /model/vehicle_green/odometry --> diff --git a/examples/worlds/trajectory_follower.sdf b/examples/worlds/trajectory_follower.sdf index a31aa46ec2..e470b4bd03 100644 --- a/examples/worlds/trajectory_follower.sdf +++ b/examples/worlds/trajectory_follower.sdf @@ -6,11 +6,11 @@ To pause the trajectory follower behavior: - ign topic -t "/model/box/trajectory_follower/pause" -m gz.msgs.Boolean -p "data: true" + gz topic -t "/model/box/trajectory_follower/pause" -m gz.msgs.Boolean -p "data: true" To resume the trajectory follower behavior: - ign topic -t "/model/box/trajectory_follower/pause" -m gz.msgs.Boolean -p "data: false" + gz topic -t "/model/box/trajectory_follower/pause" -m gz.msgs.Boolean -p "data: false" --> diff --git a/examples/worlds/triggered_camera_sensor.sdf b/examples/worlds/triggered_camera_sensor.sdf index 91e997f845..ce20382f1d 100644 --- a/examples/worlds/triggered_camera_sensor.sdf +++ b/examples/worlds/triggered_camera_sensor.sdf @@ -5,7 +5,7 @@ Trigger the camera by publishing a boolean message to the /camera/trigger topic. - ign topic -t /camera/trigger -m Boolean -p "data: true" -n 1 + gz topic -t /camera/trigger -m Boolean -p "data: true" -n 1 --> diff --git a/examples/worlds/triggered_publisher.sdf b/examples/worlds/triggered_publisher.sdf index 90e2999c3a..c40e91902e 100644 --- a/examples/worlds/triggered_publisher.sdf +++ b/examples/worlds/triggered_publisher.sdf @@ -3,7 +3,7 @@ Gazebo Trigger Publisher demo Send the command: - ign topic -t "/start" -m gz.msgs.Empty -p " " + gz topic -t "/start" -m gz.msgs.Empty -p " " The vehicle should start moving while the two boxes remain floating. When the vehicle crosses the line on the ground, the first box should start falling. diff --git a/examples/worlds/trisphere_cycle_wheel_slip.sdf b/examples/worlds/trisphere_cycle_wheel_slip.sdf index 180a2dc017..66081a8924 100644 --- a/examples/worlds/trisphere_cycle_wheel_slip.sdf +++ b/examples/worlds/trisphere_cycle_wheel_slip.sdf @@ -6,7 +6,7 @@ Run with - ign gazebo trisphere_cycle_wheel_slip.sdf + gz sim trisphere_cycle_wheel_slip.sdf --> diff --git a/examples/worlds/velocity_control.sdf b/examples/worlds/velocity_control.sdf index 2ec03b7b11..ce61fe1dbd 100644 --- a/examples/worlds/velocity_control.sdf +++ b/examples/worlds/velocity_control.sdf @@ -4,9 +4,9 @@ Try sending commands: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}" - ign topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.1}" + gz topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.1}" --> diff --git a/examples/worlds/visualize_lidar.sdf b/examples/worlds/visualize_lidar.sdf index 193fbb370d..baa9e81248 100644 --- a/examples/worlds/visualize_lidar.sdf +++ b/examples/worlds/visualize_lidar.sdf @@ -1,7 +1,7 @@ diff --git a/examples/worlds/wind.sdf b/examples/worlds/wind.sdf index 9fdeae1deb..37b0fcbefb 100644 --- a/examples/worlds/wind.sdf +++ b/examples/worlds/wind.sdf @@ -4,7 +4,7 @@ After starting the simulation, the wind velocity can be adjusted by publishing a Wind message Example: - ign topic -t "/world/wind_demo/wind/" -m gz.msgs.Wind -p "linear_velocity: {x:-50, y:50}, enable_wind: true" + gz topic -t "/world/wind_demo/wind/" -m gz.msgs.Wind -p "linear_velocity: {x:-50, y:50}, enable_wind: true" --> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1233a3c4d5..0f2e86bd2d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,7 +39,7 @@ set(gui_sources gz_add_component(gz SOURCES - ign.cc + gz.cc cmd/ModelCommandAPI.cc GET_TARGET_NAME gz_lib_target) target_link_libraries(${gz_lib_target} @@ -101,7 +101,7 @@ set (gtest_sources TestFixture_TEST.cc Util_TEST.cc World_TEST.cc - ign_TEST.cc + gz_TEST.cc comms/Broker_TEST.cc comms/MsgManager_TEST.cc network/NetworkConfig_TEST.cc @@ -184,14 +184,14 @@ gz_build_tests(TYPE UNIT # Command line tests need extra settings foreach(CMD_TEST - UNIT_ign_TEST + UNIT_gz_TEST UNIT_ModelCommandAPI_TEST) if(NOT TARGET ${CMD_TEST}) continue() endif() - # Running `ign gazebo` on macOS has problems when run with /usr/bin/ruby + # Running `gz sim` on macOS has problems when run with /usr/bin/ruby # due to System Integrity Protection (SIP). Try to find ruby from # homebrew as a workaround. if (APPLE) diff --git a/src/ModelCommandAPI_TEST.cc b/src/ModelCommandAPI_TEST.cc index 4fabf89a9c..28318041a1 100644 --- a/src/ModelCommandAPI_TEST.cc +++ b/src/ModelCommandAPI_TEST.cc @@ -26,7 +26,7 @@ #include "gz/sim/test_config.hh" // NOLINT(build/include) static const std::string kIgnModelCommand( - std::string(BREW_RUBY) + std::string(GZ_PATH) + "/ign model "); + std::string(BREW_RUBY) + std::string(GZ_PATH) + "/gz model "); ///////////////////////////////////////////////// @@ -72,7 +72,7 @@ std::string customExecStr(std::string _cmd) } ///////////////////////////////////////////////// -// Test `ign model` command when no Gazebo server is running. +// Test `gz model` command when no Gazebo server is running. // See https://github.com/gazebosim/gz-sim/issues/1175 TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(NoServerRunning)) { @@ -86,7 +86,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(NoServerRunning)) } ///////////////////////////////////////////////// -// Tests `ign model` command. +// Tests `gz model` command. TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(Commands)) { gz::sim::ServerConfig serverConfig; @@ -101,7 +101,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(Commands)) // Run without blocking. server.Run(false, 0, false); - // Tested command: ign model --list + // Tested command: gz model --list { const std::string cmd = kIgnModelCommand + "--list"; const std::string output = customExecStr(cmd); @@ -113,7 +113,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(Commands)) EXPECT_EQ(expectedOutput, output); } - // Tested command: ign model -m vehicle_blue + // Tested command: gz model -m vehicle_blue { const std::string cmd = kIgnModelCommand + "-m vehicle_blue"; std::string output = customExecStr(cmd); @@ -215,7 +215,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(Commands)) EXPECT_EQ(expectedOutput, output); } - // Tested command: ign model -m vehicle_blue --pose + // Tested command: gz model -m vehicle_blue --pose { const std::string cmd = kIgnModelCommand + "-m vehicle_blue --pose "; std::string output = customExecStr(cmd); @@ -230,7 +230,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(Commands)) EXPECT_EQ(expectedOutput, output); } - // Tested command: ign model -m vehicle_blue --link + // Tested command: gz model -m vehicle_blue --link { const std::string cmd = kIgnModelCommand + "-m vehicle_blue --link"; @@ -297,7 +297,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(Commands)) EXPECT_EQ(expectedOutput, output); } - // Tested command: ign model -m vehicle_blue --link caster + // Tested command: gz model -m vehicle_blue --link caster { const std::string cmd = kIgnModelCommand + "-m vehicle_blue --link caster"; @@ -322,7 +322,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(Commands)) EXPECT_EQ(expectedOutput, output); } - // Tested command: ign model -m vehicle_blue --joint + // Tested command: gz model -m vehicle_blue --joint { const std::string cmd = kIgnModelCommand + "-m vehicle_blue --joint"; @@ -364,7 +364,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(Commands)) EXPECT_EQ(expectedOutput, output); } - // Tested command: ign model -m vehicle_blue --joint caster_wheel + // Tested command: gz model -m vehicle_blue --joint caster_wheel { const std::string cmd = kIgnModelCommand + "-m vehicle_blue --joint caster_wheel"; @@ -386,7 +386,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_WIN32(Commands)) } ///////////////////////////////////////////////// -// Tests `ign model -s` command with an airpressure sensor. +// Tests `gz model -s` command with an airpressure sensor. TEST(ModelCommandAPI, AirPressureSensor) { gz::sim::ServerConfig serverConfig; @@ -401,7 +401,7 @@ TEST(ModelCommandAPI, AirPressureSensor) // Run without blocking. server.Run(false, 0, false); - // Tested command: ign model -m altimeter_mode -l link -s altimeter_sensor + // Tested command: gz model -m altimeter_mode -l link -s altimeter_sensor { const std::string cmd = kIgnModelCommand + "-m air_pressure_model -l link -s air_pressure_sensor"; @@ -429,7 +429,7 @@ TEST(ModelCommandAPI, AirPressureSensor) } ///////////////////////////////////////////////// -// Tests `ign model -s` command with an altimeter. +// Tests `gz model -s` command with an altimeter. TEST(ModelCommandAPI, AltimeterSensor) { gz::sim::ServerConfig serverConfig; @@ -444,7 +444,7 @@ TEST(ModelCommandAPI, AltimeterSensor) // Run without blocking. server.Run(false, 0, false); - // Tested command: ign model -m altimeter_mode -l link -s altimeter_sensor + // Tested command: gz model -m altimeter_mode -l link -s altimeter_sensor { const std::string cmd = kIgnModelCommand + "-m altimeter_model -l link -s altimeter_sensor"; @@ -479,7 +479,7 @@ TEST(ModelCommandAPI, AltimeterSensor) } ///////////////////////////////////////////////// -// Tests `ign model -s` command with a gpu lidar sensor. +// Tests `gz model -s` command with a gpu lidar sensor. TEST(ModelCommandAPI, GpuLidarSensor) { gz::sim::ServerConfig serverConfig; @@ -494,7 +494,7 @@ TEST(ModelCommandAPI, GpuLidarSensor) // Run without blocking. server.Run(false, 0, false); - // Tested command: ign model -m altimeter_mode -l link -s altimeter_sensor + // Tested command: gz model -m altimeter_mode -l link -s altimeter_sensor { const std::string cmd = kIgnModelCommand + "-m gpu_lidar -l gpu_lidar_link -s gpu_lidar"; @@ -535,7 +535,7 @@ TEST(ModelCommandAPI, GpuLidarSensor) } ///////////////////////////////////////////////// -// Tests `ign model -s` command with a magnetometer. +// Tests `gz model -s` command with a magnetometer. TEST(ModelCommandAPI, MagnetometerSensor) { gz::sim::ServerConfig serverConfig; @@ -550,7 +550,7 @@ TEST(ModelCommandAPI, MagnetometerSensor) // Run without blocking. server.Run(false, 0, false); - // Tested command: ign model -m altimeter_mode -l link -s altimeter_sensor + // Tested command: gz model -m altimeter_mode -l link -s altimeter_sensor { const std::string cmd = kIgnModelCommand + "-m magnetometer_model -l link -s magnetometer_sensor"; @@ -594,7 +594,7 @@ TEST(ModelCommandAPI, MagnetometerSensor) } ///////////////////////////////////////////////// -// Tests `ign model -s` command with an rgbd camera. +// Tests `gz model -s` command with an rgbd camera. TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_MAC(RgbdCameraSensor)) { gz::sim::ServerConfig serverConfig; @@ -609,7 +609,7 @@ TEST(ModelCommandAPI, GZ_UTILS_TEST_DISABLED_ON_MAC(RgbdCameraSensor)) // Run without blocking. server.Run(false, 0, false); - // Tested command: ign model -m altimeter_mode -l link -s altimeter_sensor + // Tested command: gz model -m altimeter_mode -l link -s altimeter_sensor { const std::string cmd = kIgnModelCommand + "-m rgbd_camera -l rgbd_camera_link -s rgbd_camera"; diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt index f586cd6b81..a5b55ea8ad 100644 --- a/src/cmd/CMakeLists.txt +++ b/src/cmd/CMakeLists.txt @@ -19,9 +19,9 @@ file(GENERATE INPUT "${cmd_script_configured}") # Install the ruby command line library in an unversioned location. -install(FILES ${cmd_script_generated} DESTINATION lib/ruby/ignition) +install(FILES ${cmd_script_generated} DESTINATION lib/ruby/gz) -set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}") +set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/gz/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}") # Generate a configuration file. # Note that the major version of the library is included in the name. @@ -51,10 +51,10 @@ file(GENERATE OUTPUT "${cmd_model_script_generated}" INPUT "${cmd_model_script_configured}") -install(FILES ${cmd_model_script_generated} DESTINATION lib/ruby/ignition) +install(FILES ${cmd_model_script_generated} DESTINATION lib/ruby/gz) # Used for the installed version. -set(gz_model_ruby_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmdmodel${PROJECT_VERSION_MAJOR}") +set(gz_model_ruby_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/gz/cmdmodel${PROJECT_VERSION_MAJOR}") set(model_configured "${CMAKE_CURRENT_BINARY_DIR}/model${PROJECT_VERSION_MAJOR}.yaml") configure_file( @@ -68,7 +68,7 @@ install(FILES ${model_configured} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_IN # Generate the ruby script for internal testing. # Note that the major version of the library is included in the name. # Ex: cmdgazebo0.rb -set(cmd_script_generated_test "${CMAKE_BINARY_DIR}/test/lib/ruby/ignition/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb") +set(cmd_script_generated_test "${CMAKE_BINARY_DIR}/test/lib/ruby/gz/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb") set(cmd_script_configured_test "${cmd_script_generated_test}.configured") # Set the library_location variable to the relative path to the library file @@ -86,7 +86,7 @@ file(GENERATE # Used only for internal testing. set(gz_library_path - "${CMAKE_BINARY_DIR}/test/lib/ruby/ignition/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}") + "${CMAKE_BINARY_DIR}/test/lib/ruby/gz/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}") # Generate a configuration file for internal testing. # Note that the major version of the library is included in the name. @@ -98,7 +98,7 @@ configure_file( #=============================================================================== # Generate the ruby script for internal testing. # Note that the major version of the library is included in the name. -set(cmd_model_ruby_test_dir "${CMAKE_BINARY_DIR}/test/lib/ruby/ignition") +set(cmd_model_ruby_test_dir "${CMAKE_BINARY_DIR}/test/lib/ruby/gz") set(cmd_model_script_generated_test "${cmd_model_ruby_test_dir}/cmdmodel${PROJECT_VERSION_MAJOR}.rb") set(cmd_model_script_configured_test "${cmd_model_script_generated_test}.configured") diff --git a/src/cmd/cmdgazebo.rb.in b/src/cmd/cmdgazebo.rb.in index 5a7e64dda0..fba7037708 100755 --- a/src/cmd/cmdgazebo.rb.in +++ b/src/cmd/cmdgazebo.rb.in @@ -39,10 +39,10 @@ COMMON_OPTIONS = " \n" + ' --versions Show the available versions.' -COMMANDS = { 'gazebo' => +COMMANDS = { 'sim' => "Run and manage Gazebo simulations. \n"\ " \n"\ - " ign gazebo [options] [file] \n"\ + " gz sim [options] [file] \n"\ " \n"\ " \n"\ "Available Options: \n"\ @@ -118,49 +118,49 @@ COMMANDS = { 'gazebo' => " The default verbosity is 1, use -v without \n"\ " arguments for level 3. \n"\ "\n"\ - " --gui-config [arg] Gazebo GUI configuration file to load. \n"\ + " --gui-config [arg] Gazebo GUI configuration file to load. \n"\ " If no config is given, the configuration in \n"\ " the SDF file is used. And if that's not \n"\ " provided, the default installed config is \n"\ " used. \n"\ "\n"\ - " --physics-engine [arg] Gazebo Physics engine plugin to load. \n"\ + " --physics-engine [arg] Gazebo Physics engine plugin to load. \n"\ " Gazebo will use DART by default. \n"\ " (ignition-physics-dartsim-plugin) \n"\ " Make sure custom plugins are in \n"\ - " GZ_SIM_PHYSICS_ENGINE_PATH. \n"\ + " GZ_SIM_PHYSICS_ENGINE_PATH. \n"\ "\n"\ - " --render-engine [arg] Gazebo Rendering engine plugin to load for \n"\ + " --render-engine [arg] Gazebo Rendering engine plugin to load for \n"\ " both the server and the GUI. Gazebo will use \n"\ " OGRE2 by default. (ogre2) \n"\ " Make sure custom plugins are in \n"\ - " GZ_SIM_RENDER_ENGINE_PATH. \n"\ + " GZ_SIM_RENDER_ENGINE_PATH. \n"\ "\n"\ - " --render-engine-gui [arg] Gazebo Rendering engine plugin to load for \n"\ + " --render-engine-gui [arg] Gazebo Rendering engine plugin to load for \n"\ " the GUI. Gazebo will use OGRE2 by default. \n"\ " (ogre2) \n"\ " Make sure custom plugins are in \n"\ - " GZ_SIM_RENDER_ENGINE_PATH. \n"\ + " GZ_SIM_RENDER_ENGINE_PATH. \n"\ "\n"\ - " --render-engine-server [arg] Gazebo Rendering engine plugin to load for \n"\ + " --render-engine-server [arg] Gazebo Rendering engine plugin to load for \n"\ " the server. Gazebo will use OGRE2 by default. \n"\ " (ogre2) \n"\ " Make sure custom plugins are in \n"\ - " GZ_SIM_RENDER_ENGINE_PATH. \n"\ + " GZ_SIM_RENDER_ENGINE_PATH. \n"\ "\n"\ " --version Print Gazebo version information. \n"\ "\n"\ " -z [arg] Update rate in Hertz. \n"\ "\n"+ COMMON_OPTIONS + "\n\n" + - "Environment variables: \n"\ - " GZ_SIM_RESOURCE_PATH Colon separated paths used to locate \n"\ - " resources such as worlds and models. \n\n"\ - " GZ_SIM_SYSTEM_PLUGIN_PATH Colon separated paths used to \n"\ - " locate system plugins. \n\n"\ - " GZ_SIM_SERVER_CONFIG_PATH Path to server configuration file. \n\n"\ - " GZ_GUI_PLUGIN_PATH Colon separated paths used to locate GUI \n"\ - " plugins. \n"\ + "Environment variables: \n"\ + " GZ_SIM_RESOURCE_PATH Colon separated paths used to locate \n"\ + " resources such as worlds and models. \n\n"\ + " GZ_SIM_SYSTEM_PLUGIN_PATH Colon separated paths used to \n"\ + " locate system plugins. \n\n"\ + " GZ_SIM_SERVER_CONFIG_PATH Path to server configuration file. \n\n"\ + " GZ_GUI_PLUGIN_PATH Colon separated paths used to locate GUI \n"\ + " plugins. \n"\ } # @@ -226,6 +226,12 @@ class Cmd usage = COMMANDS[args[0]] + # TODO(CH3): Deprecated. Remove on tock. + # Print deprecation warning + if args[0] == 'gazebo' + puts 'The `gazebo` verb is deprecated. Please use `sim` instead.' + end + opt_parser = OptionParser.new do |opts| opts.banner = usage @@ -311,7 +317,7 @@ class Cmd # SDF file as positional argument filename = args.pop - if filename and filename != 'gazebo' + if filename and filename != 'sim' and filename != 'gazebo' options['file'] = filename end @@ -459,7 +465,7 @@ Please use [GZ_SIM_RESOURCE_PATH] instead." if options['server'] == 0 && options['gui'] == 0 if plugin.end_with? ".dylib" - puts "`ign gazebo` currently only works with the -s argument on macOS. + puts "`gz sim` currently only works with the -s argument on macOS. See https://github.com/gazebosim/gz-sim/issues/44 for more info." exit(-1) end @@ -467,7 +473,7 @@ See https://github.com/gazebosim/gz-sim/issues/44 for more info." serverPid = Process.fork do ENV['RMT_PORT'] = '1500' Process.setpgid(0, 0) - Process.setproctitle('ign gazebo server') + Process.setproctitle('gz sim server') Importer.runServer(parsed, options['iterations'], options['run'], options['hz'], options['levels'], options['network_role'], options['network_secondaries'], options['record'], @@ -482,7 +488,7 @@ See https://github.com/gazebosim/gz-sim/issues/44 for more info." guiPid = Process.fork do ENV['RMT_PORT'] = '1501' Process.setpgid(0, 0) - Process.setproctitle('ign gazebo gui') + Process.setproctitle('gz sim gui') Importer.runGui(options['gui_config'], options['render_engine_gui']) end @@ -516,7 +522,7 @@ See https://github.com/gazebosim/gz-sim/issues/44 for more info." # Otherwise run the gui else options['gui'] if plugin.end_with? ".dylib" - puts "`ign gazebo` currently only works with the -s argument on macOS. + puts "`gz sim` currently only works with the -s argument on macOS. See https://github.com/gazebosim/gz-sim/issues/44 for more info." exit(-1) end diff --git a/src/cmd/cmdmodel.rb.in b/src/cmd/cmdmodel.rb.in index c426a879dc..ffe928d6c3 100644 --- a/src/cmd/cmdmodel.rb.in +++ b/src/cmd/cmdmodel.rb.in @@ -41,7 +41,7 @@ COMMON_OPTIONS = COMMANDS = { 'model' => "Print information about models.\n\n"+ " \n"\ - " ign model [options] \n"\ + " gz model [options] \n"\ " \n"\ "Available Options: \n"\ " --list Get a list of the available models. \n"\ @@ -53,7 +53,7 @@ COMMANDS = { 'model' => " \n"\ " E.g. to get information about the \n"\ " caster link in the diff_drive world, run: \n"\ - " ign model -m vehicle_blue -l caster \n"\ + " gz model -m vehicle_blue -l caster \n"\ " \n"\ " -s [--sensor] arg Select a sensor to show its properties. \n"\ " If no arg is passed all sensors are printed\n"\ @@ -61,7 +61,7 @@ COMMANDS = { 'model' => " \n"\ " E.g. to get information about the \n"\ " imu sensor in the sensors world, run: \n"\ - " ign model -m sensors_box -l link -s imu \n"\ + " gz model -m sensors_box -l link -s imu \n"\ " \n"\ " -j [--joint] arg Select a joint to show its properties. \n"\ " If no arg is passed all joints are printed \n"\ @@ -70,7 +70,7 @@ COMMANDS = { 'model' => " E.g. to get information about the \n"\ " caster_wheel joint in the diff_drive \n"\ " world, run: \n"\ - " ign model -m vehicle_blue -j caster_wheel \n\n"+ + " gz model -m vehicle_blue -j caster_wheel \n\n"+ COMMON_OPTIONS } @@ -186,7 +186,7 @@ class Cmd options['link_name'], options['joint_name'], options['sensor_name']) else puts 'Command error: I do not have an implementation for '\ - "command [ign #{options['command']}]." + "command [gz #{options['command']}]." end # # execute end diff --git a/src/cmd/gazebo.yaml.in b/src/cmd/gazebo.yaml.in index 8d575ada55..5381dc0e08 100644 --- a/src/cmd/gazebo.yaml.in +++ b/src/cmd/gazebo.yaml.in @@ -1,8 +1,10 @@ --- # Subcommands available inside Gazebo Sim format: 1.0.0 -library_name: ignition-gazebo-ign +library_name: gz-sim-ign library_version: @PROJECT_VERSION_FULL@ library_path: @gz_library_path@ commands: - - gazebo : Run and manage Gazebo. + - sim : Run and manage the Gazebo Simulator. + # TODO(CH3): Deprecated. Remove on tock. + - gazebo : Deprecated. Alias for sim. --- diff --git a/src/cmd/model.yaml.in b/src/cmd/model.yaml.in index 38d842528e..478d4e0df3 100644 --- a/src/cmd/model.yaml.in +++ b/src/cmd/model.yaml.in @@ -1,6 +1,6 @@ --- # Model subcommand available inside Gazebo Sim. format: 1.0.0 -library_name: ignition-gazebo-ign +library_name: gz-sim-ign library_version: @PROJECT_VERSION_FULL@ library_path: @gz_model_ruby_path@ commands: diff --git a/src/ign.cc b/src/gz.cc similarity index 99% rename from src/ign.cc rename to src/gz.cc index 106f3bd905..26fb285a86 100644 --- a/src/ign.cc +++ b/src/gz.cc @@ -15,7 +15,7 @@ * */ -#include "ign.hh" +#include "gz.hh" #include #include diff --git a/src/ign.hh b/src/gz.hh similarity index 100% rename from src/ign.hh rename to src/gz.hh diff --git a/src/ign_TEST.cc b/src/gz_TEST.cc similarity index 98% rename from src/ign_TEST.cc rename to src/gz_TEST.cc index 93cf8dd99f..77f8431399 100644 --- a/src/ign_TEST.cc +++ b/src/gz_TEST.cc @@ -28,7 +28,7 @@ static const std::string kBinPath(PROJECT_BINARY_PATH); static const std::string kIgnCommand( - std::string(BREW_RUBY) + std::string(GZ_PATH) + "/ign gazebo -s "); + std::string(BREW_RUBY) + std::string(GZ_PATH) + "/gz sim -s "); ///////////////////////////////////////////////// std::string customExecStr(std::string _cmd) diff --git a/src/systems/air_pressure/AirPressure.hh b/src/systems/air_pressure/AirPressure.hh index 4428d4d56d..7fbd8ea610 100644 --- a/src/systems/air_pressure/AirPressure.hh +++ b/src/systems/air_pressure/AirPressure.hh @@ -34,7 +34,7 @@ namespace systems /// \class AirPressure AirPressure.hh gz/sim/systems/AirPressure.hh /// \brief An air pressure sensor that reports vertical position and velocity - /// readings over ign transport + /// readings over gz transport class AirPressure: public System, public ISystemPreUpdate, diff --git a/src/systems/altimeter/Altimeter.hh b/src/systems/altimeter/Altimeter.hh index b4a07ef7a3..16a4c305a1 100644 --- a/src/systems/altimeter/Altimeter.hh +++ b/src/systems/altimeter/Altimeter.hh @@ -34,7 +34,7 @@ namespace systems /// \class Altimeter Altimeter.hh gz/sim/systems/Altimeter.hh /// \brief An altimeter sensor that reports vertical position and velocity - /// readings over ign transport + /// readings over gz transport class Altimeter: public System, public ISystemPreUpdate, diff --git a/src/systems/buoyancy/Buoyancy.hh b/src/systems/buoyancy/Buoyancy.hh index 2f11b87049..858b1e7775 100644 --- a/src/systems/buoyancy/Buoyancy.hh +++ b/src/systems/buoyancy/Buoyancy.hh @@ -73,7 +73,7 @@ namespace systems /// floats. To run: /// /// ``` - /// ign gazebo -v 4 buoyancy.sdf + /// gz sim -v 4 buoyancy.sdf /// ``` /// /// ### `graded_buoyancy` world @@ -86,7 +86,7 @@ namespace systems /// `graded_buoyancy.sdf` world. /// /// ``` - /// ign gazebo -v 4 graded_buoyancy.sdf + /// gz sim -v 4 graded_buoyancy.sdf /// ``` /// /// You should be able to see a sphere bobbing up and down undergoing simple diff --git a/src/systems/buoyancy_engine/BuoyancyEngine.hh b/src/systems/buoyancy_engine/BuoyancyEngine.hh index b636531db0..ab0ad73324 100644 --- a/src/systems/buoyancy_engine/BuoyancyEngine.hh +++ b/src/systems/buoyancy_engine/BuoyancyEngine.hh @@ -68,22 +68,22 @@ namespace systems /// ## Examples /// To get started run: /// ``` - /// ign gazebo buoyancy_engine.sdf + /// gz sim buoyancy_engine.sdf /// ``` /// Enter the following in a separate terminal: /// ``` - /// ign topic -t /model/buoyant_box/buoyancy_engine/ -m gz.msgs.Double + /// gz topic -t /model/buoyant_box/buoyancy_engine/ -m gz.msgs.Double /// -p "data: 0.003" /// ``` /// To see the box float up. /// ``` - /// ign topic -t /model/buoyant_box/buoyancy_engine/ -m gz.msgs.Double + /// gz topic -t /model/buoyant_box/buoyancy_engine/ -m gz.msgs.Double /// -p "data: 0.001" /// ``` /// To see the box go down. /// To see the current volume enter: /// ``` - /// ign topic -t /model/buoyant_box/buoyancy_engine/current_volume -e + /// gz topic -t /model/buoyant_box/buoyancy_engine/current_volume -e /// ``` class BuoyancyEnginePlugin: public gz::sim::System, diff --git a/src/systems/contact/Contact.cc b/src/systems/contact/Contact.cc index 7b3ec722e6..9878dc39e7 100644 --- a/src/systems/contact/Contact.cc +++ b/src/systems/contact/Contact.cc @@ -62,7 +62,7 @@ class ContactSensor public: void AddContacts(const std::chrono::steady_clock::duration &_stamp, const msgs::Contacts &_contacts); - /// \brief Publish sensor data over ign transport + /// \brief Publish sensor data over gz transport public: void Publish(); /// \brief Topic to publish data to diff --git a/src/systems/hydrodynamics/Hydrodynamics.hh b/src/systems/hydrodynamics/Hydrodynamics.hh index 98e32b89d4..4514fc3412 100644 --- a/src/systems/hydrodynamics/Hydrodynamics.hh +++ b/src/systems/hydrodynamics/Hydrodynamics.hh @@ -84,16 +84,16 @@ namespace systems /// thruster plugin to propel the craft and the buoyancy plugin for buoyant /// force. To run the example run. /// ``` - /// ign gazebo auv_controls.sdf + /// gz sim auv_controls.sdf /// ``` /// To control the rudder of the craft run the following /// ``` - /// ign topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos + /// gz topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos /// -m gz.msgs.Double -p 'data: -0.17' /// ``` /// To apply a thrust you may run the following command /// ``` - /// ign topic -t /model/tethys/joint/propeller_joint/cmd_pos + /// gz topic -t /model/tethys/joint/propeller_joint/cmd_pos /// -m gz.msgs.Double -p 'data: -31' /// ``` /// The vehicle should move in a circle. @@ -103,7 +103,7 @@ namespace systems /// hydrodynamics plugin allows simulation of such currents. We can add /// a current simply by publishing the following: /// ``` - /// ign topic -t /ocean_current -m gz.msgs.Vector3d -p 'x: 1, y:0, z:0' + /// gz topic -t /ocean_current -m gz.msgs.Vector3d -p 'x: 1, y:0, z:0' /// ``` /// You should observe your vehicle slowly drift to the side. /// diff --git a/src/systems/logical_camera/LogicalCamera.hh b/src/systems/logical_camera/LogicalCamera.hh index 3c4f569b13..8d60b9ec40 100644 --- a/src/systems/logical_camera/LogicalCamera.hh +++ b/src/systems/logical_camera/LogicalCamera.hh @@ -36,7 +36,7 @@ namespace systems * gz/sim/systems/LogicalCamera.hh **/ /// \brief A logical camera sensor that reports objects detected within its - /// frustum readings over ign transport + /// frustum readings over gz transport class LogicalCamera: public System, public ISystemPreUpdate, diff --git a/src/systems/model_photo_shoot/ModelPhotoShoot.hh b/src/systems/model_photo_shoot/ModelPhotoShoot.hh index dc6f982bf7..b575a83b52 100644 --- a/src/systems/model_photo_shoot/ModelPhotoShoot.hh +++ b/src/systems/model_photo_shoot/ModelPhotoShoot.hh @@ -58,7 +58,7 @@ namespace systems /// /// To run the example: /// ``` - /// ign gazebo model_photo_shoot.sdf -s -r --iterations 50 + /// gz sim model_photo_shoot.sdf -s -r --iterations 50 /// ``` /// This will start gazebo, load the model take the pictures and shutdown /// after 50 iterations. You will find the pictures in the same location you diff --git a/src/systems/thruster/Thruster.hh b/src/systems/thruster/Thruster.hh index 2ca04b5156..7057724542 100644 --- a/src/systems/thruster/Thruster.hh +++ b/src/systems/thruster/Thruster.hh @@ -90,16 +90,16 @@ namespace systems /// thruster plugin to propell the craft and the buoyancy plugin for buoyant /// force. To run the example: /// ``` - /// ign gazebo auv_controls.sdf + /// gz sim auv_controls.sdf /// ``` /// To control the rudder of the craft run the following: /// ``` - /// ign topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos + /// gz topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos /// -m gz.msgs.Double -p 'data: -0.17' /// ``` /// To apply a thrust you may run the following command: /// ``` - /// ign topic -t /model/tethys/joint/propeller_joint/cmd_thrust + /// gz topic -t /model/tethys/joint/propeller_joint/cmd_thrust /// -m gz.msgs.Double -p 'data: -31' /// ``` /// The vehicle should move in a circle. diff --git a/src/systems/triggered_publisher/TriggeredPublisher.cc b/src/systems/triggered_publisher/TriggeredPublisher.cc index c3f73dc338..166d4b4bce 100644 --- a/src/systems/triggered_publisher/TriggeredPublisher.cc +++ b/src/systems/triggered_publisher/TriggeredPublisher.cc @@ -123,7 +123,7 @@ class FullMatcher : public InputMatcher /// return false. /// \param[in] _matchString String used to construct the protobuf message /// against which input messages are matched. This is the human-readable - /// representation of a protobuf message as used by `ign topic` for publishing + /// representation of a protobuf message as used by `gz topic` for publishing /// messages public: FullMatcher(const std::string &_msgType, bool _logicType, const std::string &_matchString); diff --git a/src/systems/triggered_publisher/TriggeredPublisher.hh b/src/systems/triggered_publisher/TriggeredPublisher.hh index a4ffc4e8db..3fa75a96d4 100644 --- a/src/systems/triggered_publisher/TriggeredPublisher.hh +++ b/src/systems/triggered_publisher/TriggeredPublisher.hh @@ -62,7 +62,7 @@ namespace systems /// message is compared for a match. /// * Value: String used to construct the protobuf message against which /// input messages are matched. This is the human-readable - /// representation of a protobuf message as used by `ign topic` for + /// representation of a protobuf message as used by `gz topic` for /// publishing messages /// /// - ``: Contains configuration for output messages: Multiple @@ -73,7 +73,7 @@ namespace systems /// * `topic`: Output message topic name /// * Value: String used to construct the output protobuf message . This is /// the human-readable representation of a protobuf message as used by - /// `ign topic` for publishing messages + /// `gz topic` for publishing messages /// /// ``: Integer number of milliseconds, in simulation time, to /// delay publication. diff --git a/test/integration/log_system.cc b/test/integration/log_system.cc index 3ecf081cbf..7f34b41e67 100644 --- a/test/integration/log_system.cc +++ b/test/integration/log_system.cc @@ -63,7 +63,7 @@ static const std::string kBinPath(PROJECT_BINARY_PATH); #ifndef __APPLE__ static const std::string kIgnCommand( "GZ_SIM_SYSTEM_PLUGIN_PATH=" + kBinPath + "/lib LD_LIBRARY_PATH=" + - kBinPath + "/lib:/usr/local/lib:${LD_LIBRARY_PATH} ign gazebo -s "); + kBinPath + "/lib:/usr/local/lib:${LD_LIBRARY_PATH} gz sim -s "); #endif ///////////////////////////////////////////////// @@ -333,7 +333,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogDefaults)) // Test case 1: // No path specified on command line. This does not go through - // ign.cc, recording should take place in the `.gz` directory + // gz.cc, recording should take place in the `.gz` directory { // Load SDF sdf::Root recordSdfRoot; @@ -369,7 +369,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogDefaults)) // Test case 2: // No path specified on command line (only --record, no --record-path). // No path specified in SDF. - // Run from command line, which should trigger ign.cc, which should initialize + // Run from command line, which should trigger gz.cc, which should initialize // gzLogDirectory() to default timestamp path. Both console and state logs // should be recorded here. @@ -381,7 +381,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogDefaults)) entryList(logPath, entriesBefore); { - // Command line triggers ign.cc, which handles initializing gzLogDirectory + // Command line triggers gz.cc, which handles initializing gzLogDirectory std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 " + "--record " + recordSdfPath; std::cout << "Running command [" << cmd << "]" << std::endl; @@ -436,7 +436,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogPaths)) // A path is specified in SDF - a feature removed in Gazebo Dome. // No path specified in C++ API. // Should ignore SDF path. No default logging directory is initialized for - // state and console logs because ign.cc is not triggered. + // state and console logs because gz.cc is not triggered. { // Change log path in SDF to build directory sdf::Root recordSdfRoot; @@ -486,7 +486,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogPaths)) // A path is specified in SDF - a feature removed in Gazebo Dome. // SDF path should be ignored. // State log and console log should be stored to default timestamp path - // gzLogDirectory because ign.cc is triggered by command line. + // gzLogDirectory because gz.cc is triggered by command line. { // Change log path in SDF to build directory sdf::Root recordSdfRoot; @@ -501,7 +501,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogPaths)) ofs << recordSdfRoot.Element()->ToString("").c_str(); ofs.close(); - // Command line triggers ign.cc, which handles initializing gzLogDirectory + // Command line triggers gz.cc, which handles initializing gzLogDirectory std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 " + "--record " + tmpRecordSdfPath; std::cout << "Running command [" << cmd << "]" << std::endl; @@ -545,7 +545,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogPaths)) // A path is specified in SDF - a feature removed in Gazebo Dome. // Empty path is specified via C++ API. // Should ignore SDF path. No default logging directory is initialized for - // state and console logs because ign.cc is not triggered. + // state and console logs because gz.cc is not triggered. std::string stateLogPath = this->logDir; { @@ -584,7 +584,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogPaths)) // A path is specified in SDF - a feature removed in Gazebo Dome. // A different path is specified via C++ API. // Should take C++ API path. State log should be stored here. Console log is - // not initialized because ign.cc is not triggered. + // not initialized because gz.cc is not triggered. const std::string sdfPath = common::joinPaths(this->logsDir, "sdfPath"); const std::string cppPath = common::joinPaths(this->logsDir, "cppPath"); { @@ -624,7 +624,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogPaths)) // A path is specified by --record-path on command line. // Both state and console logs should be stored here. { - // Command line triggers ign.cc, which handles initializing gzLogDirectory + // Command line triggers gz.cc, which handles initializing gzLogDirectory std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 " + "--record-path " + this->logDir + " " + recordSdfPath; std::cout << "Running command [" << cmd << "]" << std::endl; @@ -666,7 +666,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogPaths)) ofs << recordSdfRoot.Element()->ToString("").c_str(); ofs.close(); - // Command line triggers ign.cc, which handles initializing gzLogDirectory + // Command line triggers gz.cc, which handles initializing gzLogDirectory std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 " + "--record-path " + cliPath + " " + tmpRecordSdfPath; std::cout << "Running command [" << cmd << "]" << std::endl; @@ -844,7 +844,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(RecordAndPlayback)) TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogControl)) { // TODO(anyone) when re-recording state.tlog file, do not run - // `ign gazebo --record rolling_shapes.sdf` with `-r` flag and pause sim + // `gz sim --record rolling_shapes.sdf` with `-r` flag and pause sim // before terminating. For some reason, when running with `-r` &/or // terminating sim w/o pausing causing strange pose behavior // when seeking close to end of file followed by rewind. For more details: @@ -1038,9 +1038,9 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogOverwrite)) // Test case 2: // Path exists, command line --log-overwrite, should overwrite by - // command-line logic in ign.cc + // command-line logic in gz.cc { - // Command line triggers ign.cc, which handles creating a unique path if + // Command line triggers gz.cc, which handles creating a unique path if // file already exists, so as to not overwrite std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 --log-overwrite " + "--record-path " + this->logDir + " " + recordSdfPath; @@ -1066,9 +1066,9 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogOverwrite)) // Test case 3: // Path exists, no --log-overwrite, should create new files by command-line - // logic in ign.cc + // logic in gz.cc { - // Command line triggers ign.cc, which handles creating a unique path if + // Command line triggers gz.cc, which handles creating a unique path if // file already exists, so as to not overwrite std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 " + "--record-path " + this->logDir + " " + recordSdfPath; @@ -1085,9 +1085,9 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogOverwrite)) EXPECT_TRUE(common::exists(clogPath)); // On OS X, ign-gazebo-server (server_main.cc) is being used as opposed to - // ign gazebo. server_main.cc is deprecated and does not have overwrite + // gz sim. server_main.cc is deprecated and does not have overwrite // renaming implemented. So will always overwrite. Will not test (#) type of - // renaming on OS X until ign gazebo is fixed: + // renaming on OS X until gz sim is fixed: // https://github.com/gazebosim/gz-sim/issues/25 // New log files were created @@ -1430,7 +1430,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogCompressCmdLine)) EXPECT_TRUE(common::exists(recordPath)); EXPECT_TRUE(common::exists(defaultCmpPath)); - // Command line triggers ign.cc, which handles creating a unique path if + // Command line triggers gz.cc, which handles creating a unique path if // file already exists, so as to not overwrite std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 --log-compress " + "--record-path " + recordPath + " " + recordSdfPath; @@ -1460,7 +1460,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogCompressCmdLine)) EXPECT_FALSE(common::exists(recordPath)); EXPECT_TRUE(common::exists(this->AppendExtension(recordPath, "(1).zip"))); - // Command line triggers ign.cc, which handles creating a unique path if + // Command line triggers gz.cc, which handles creating a unique path if // file already exists, so as to not overwrite std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 --log-compress " + "--record-path " + recordPath + " " + recordSdfPath; @@ -1505,7 +1505,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogResources)) #ifndef __APPLE__ // Log resources from command line { - // Command line triggers ign.cc, which handles initializing gzLogDirectory + // Command line triggers gz.cc, which handles initializing gzLogDirectory std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 " + "--record --record-resources --record-path " + recordPath + " " + recordSdfPath; @@ -1550,7 +1550,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogResources)) } // Console log is not created because gzLogDirectory() is not initialized, - // as ign.cc is not executed by command line. + // as gz.cc is not executed by command line. EXPECT_TRUE(common::exists(statePath)); // Recorded models should exist @@ -1592,7 +1592,7 @@ TEST_F(LogSystemTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(LogTopics)) #ifndef __APPLE__ // Log only the /clock topic from command line { - // Command line triggers ign.cc, which handles initializing gzLogDirectory + // Command line triggers gz.cc, which handles initializing gzLogDirectory std::string cmd = kIgnCommand + " -r -v 4 --iterations 5 " + "--record-topic /clock " + "--record-path " + recordPath + " " diff --git a/test/media/rolling_shapes_log/README.md b/test/media/rolling_shapes_log/README.md index e196bcf7ea..f46d7e4050 100644 --- a/test/media/rolling_shapes_log/README.md +++ b/test/media/rolling_shapes_log/README.md @@ -1,7 +1,7 @@ Log file generated with -`ign gazebo -r -s -i 5000 --log-overwrite --physics-engine ignition-physics-bullet-plugin rolling_shapes.sdf --record-path test/media/rolling_shapes_log/` +`gz sim -r -s -i 5000 --log-overwrite --physics-engine ignition-physics-bullet-plugin rolling_shapes.sdf --record-path test/media/rolling_shapes_log/` Note that this file will be removed when the command above is run, be sure to restore it afterwards. diff --git a/test/worlds/model_photo_shoot_random_joints.sdf b/test/worlds/model_photo_shoot_random_joints.sdf index f843a61a06..6b1ed25fe1 100644 --- a/test/worlds/model_photo_shoot_random_joints.sdf +++ b/test/worlds/model_photo_shoot_random_joints.sdf @@ -3,7 +3,7 @@ Gazebo Model Photo Shoot plugin demo This will take perspective, top, front, and both sides pictures of the model: - ign gazebo -s -r -v 4 \-\-iterations 50 model_photo_shoot.sdf + gz sim -s -r -v 4 \-\-iterations 50 model_photo_shoot.sdf --> diff --git a/test/worlds/velocity_control.sdf b/test/worlds/velocity_control.sdf index 31c966d61b..0a85d7c831 100644 --- a/test/worlds/velocity_control.sdf +++ b/test/worlds/velocity_control.sdf @@ -4,9 +4,9 @@ Try sending commands: - ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}" + gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}" - ign topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.1}" + gz topic -t "/model/vehicle_green/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.1}" --> diff --git a/tools/desktop/gz-sim.desktop.in b/tools/desktop/gz-sim.desktop.in index 3d905f6fc9..1d19187da0 100644 --- a/tools/desktop/gz-sim.desktop.in +++ b/tools/desktop/gz-sim.desktop.in @@ -3,7 +3,7 @@ Version=1.0 Type=Application Name=Gazebo Sim @PROJECT_VERSION_MAJOR@ Comment=3D Robot Simulator -Exec=/usr/bin/ign gazebo --force-version @PROJECT_VERSION_MAJOR@ +Exec=/usr/bin/gz sim --force-version @PROJECT_VERSION_MAJOR@ Icon=gz-logo@PROJECT_VERSION_MAJOR@ Categories=Education;Science;Robotics;Development; StartupNotify=true diff --git a/tutorials/battery.md b/tutorials/battery.md index d257f19097..b4493ace13 100644 --- a/tutorials/battery.md +++ b/tutorials/battery.md @@ -114,7 +114,7 @@ Both services accept an `gz::msgs::Boolean` parameter. A battery has been added to a demo world, which can be run using: ``` -ign gazebo -v 4 linear_battery_demo.sdf -z 1000000 +gz sim -v 4 linear_battery_demo.sdf -z 1000000 ``` The blue vehicle on the left has a battery, while the one on the right does not. When the battery drains, the corresponding vehicle stops moving. Please, see diff --git a/tutorials/collada_world_exporter.md b/tutorials/collada_world_exporter.md index 7f9a872e29..4b3e877735 100644 --- a/tutorials/collada_world_exporter.md +++ b/tutorials/collada_world_exporter.md @@ -17,7 +17,7 @@ loader. 2. Run the world using ``` -ign gazebo -v 4 -s -r --iterations 1 WORLD_FILE_NAME +gz sim -v 4 -s -r --iterations 1 WORLD_FILE_NAME ``` 3. A subdirectory, named after the world, has been created in the current working directory. Within this subdirectory is the mesh and materials for the world. diff --git a/tutorials/create_system_plugins.md b/tutorials/create_system_plugins.md index 98f4c8fbe3..22eb1ab507 100644 --- a/tutorials/create_system_plugins.md +++ b/tutorials/create_system_plugins.md @@ -82,7 +82,7 @@ Implement the system class as usual, for example: In your `CMakeLists.txt` add the following ``` -ign_find_package(ignition-plugin1 REQUIRED COMPONENTS register) +gz_find_package(ignition-plugin1 REQUIRED COMPONENTS register) set(IGN_PLUGIN_VER ${ignition-plugin1_VERSION_MAJOR}) # Add sources for each plugin to be registered. diff --git a/tutorials/debugging.md b/tutorials/debugging.md index 3b4456272b..a6cfedb1c6 100644 --- a/tutorials/debugging.md +++ b/tutorials/debugging.md @@ -4,7 +4,7 @@ The Gazebo command line tools are based on Ruby. If you want to use GDB to debug a problem, which we highly encourage, then you'll need to run GDB against -the Ruby executable. Once in the GDB shell, you can run the `ign gazebo` +the Ruby executable. Once in the GDB shell, you can run the `gz sim` script to run an instance of Gazebo. You'll likely want to debug the Gazebo server or GUI separately. Refer to the @@ -12,7 +12,7 @@ following two sections for instructions concerning each case. ### Debugging the server -1. Find the `ign` executable: +1. Find the `gz` executable: `which ign` @@ -26,7 +26,7 @@ following two sections for instructions concerning each case. 3. Run the Gazebo server with the desired arguments. Make sure to use the `-s` argument. The following example runs the `shapes.sdf` world. - `(gdb) r /usr/bin/ign gazebo -s shapes.sdf` + `(gdb) r /usr/bin/gz sim -s shapes.sdf` 4. Use GDB as normal @@ -39,10 +39,10 @@ following two sections for instructions concerning each case. 2. Run the Gazebo GUI with the desired arguments. Make sure to use the `-g` argument. - `(gdb) r /usr/bin/ign gazebo -g` + `(gdb) r /usr/bin/gz sim -g` 3. In another terminal run the Gazebo server. - `ign gazebo -s -v 4 -r shapes.sdf` + `gz sim -s -v 4 -r shapes.sdf` 4. Use GDB as normal. diff --git a/tutorials/distributed_simulation.md b/tutorials/distributed_simulation.md index 8f3220fcde..9c536a3dd4 100644 --- a/tutorials/distributed_simulation.md +++ b/tutorials/distributed_simulation.md @@ -10,7 +10,7 @@ ## High-Level design -Each `ign gazebo` instance has the ability to run with the `--network-role` flag. +Each `gz sim` instance has the ability to run with the `--network-role` flag. When the flag is present, the instance attempts to join a distributed simulation environment by utilizing `ign-transport`. Ign-transport is used to register and track available peers, as well as synchronize clock and state among multiple @@ -34,7 +34,7 @@ active than instances, multiple levels will be allocated to each secondary. ## Assumptions -* When executing in a distributed environment, each `ign gazebo` instance only +* When executing in a distributed environment, each `gz sim` instance only has one `SimulationRunner` instance, which means that instance is incapable of simulating multiple worlds. @@ -50,7 +50,7 @@ active than instances, multiple levels will be allocated to each secondary. ### Configuration and launch -Multiple `ign gazebo` executables are started on the same local area network, +Multiple `gz sim` executables are started on the same local area network, each with the `--distributed` flag set. #### Command line options @@ -70,7 +70,7 @@ The secondary instances will only read the role command line option ### Discovery -Once the `ign gazebo` instance is started, it will begin a process of +Once the `gz sim` instance is started, it will begin a process of discovering peers in the network. Each peer will send an announcement in the `/announce` topic when it joins or leaves the network, and also periodically sends a heartbeat on `/heartbeat`. diff --git a/tutorials/entity_creation.md b/tutorials/entity_creation.md index 0c951d347d..4051712ecd 100644 --- a/tutorials/entity_creation.md +++ b/tutorials/entity_creation.md @@ -19,13 +19,13 @@ You can check if this service is available typing: In one terminal ```bash -ign gazebo -r -v 4 .sdf +gz sim -r -v 4 .sdf ``` In another terminal, see if the create service is listed: ```bash -ign service --list +gz service --list /gazebo/resource_paths/add /gazebo/resource_paths/get /gazebo/worlds diff --git a/tutorials/erb_template.md b/tutorials/erb_template.md index 7dd406361e..e30da7cb9f 100644 --- a/tutorials/erb_template.md +++ b/tutorials/erb_template.md @@ -157,11 +157,11 @@ erb my_first_erb.erb > my_first_erb.sdf ## Run simulation world -To test if the ERB template works, run the SDF file with the `ign gazebo` command +To test if the ERB template works, run the SDF file with the `gz sim` command ```{.sh} # run with Gazebo -ign gazebo my_first_erb.sdf +gz sim my_first_erb.sdf ``` If there are any errors or warnings from running the SDF file, you would need to go back to the ERB file and see if any coding mistakes were made. diff --git a/tutorials/gui_config.md b/tutorials/gui_config.md index 4fed5b4f39..e0c14446a6 100644 --- a/tutorials/gui_config.md +++ b/tutorials/gui_config.md @@ -31,7 +31,7 @@ through the command line or the SDF file. Let's try this in practice. First, let's open Gazebo without passing any arguments: -`ign gazebo` +`gz sim` You should see an empty world with several plugins loaded by default, such as the 3D Scene, the play/pause button, etc. @@ -57,7 +57,7 @@ Let's try customizing it: 3. Reload Gazebo: - `ign gazebo` + `gz sim` Note how the UI is now in dark mode! @@ -117,7 +117,7 @@ favorite editor and save this file as `fuel_preview.sdf`: Now let's load this world: -`ign gazebo /fuel_preview.sdf` +`gz sim /fuel_preview.sdf` Notice how the application has only one GUI plugin loaded, the 3D scene, as defined on the SDF file above. @@ -141,7 +141,7 @@ hand, we'll create it from the UI. 1. Let's start loading the SDF world we created above, with the `` element back: -`ign gazebo /fuel_preview.sdf` +`gz sim /fuel_preview.sdf` 2. Now from the top-right menu, choose to add the "View Angle" plugin. This plugin has convenient buttons to change the camera angle, try them out! @@ -164,7 +164,7 @@ hand, we'll create it from the UI. 2. Finally, let's load the previous world, with our custom configuration: - `ign gazebo /fuel_preview.sdf --gui-config saved.config` + `gz sim /fuel_preview.sdf --gui-config saved.config` 3. Gazebo should open with your custom layout. diff --git a/tutorials/headless_rendering.md b/tutorials/headless_rendering.md index 8db2030f7f..2e4f9a30fe 100644 --- a/tutorials/headless_rendering.md +++ b/tutorials/headless_rendering.md @@ -13,7 +13,7 @@ An easier solution is through the use of [EGL](https://www.khronos.org/egl), whi Example usage: ``` -ign gazebo -v 4 -s --headless-rendering sensors_demo.sdf +gz sim -v 4 -s --headless-rendering sensors_demo.sdf ``` If you are using Gazebo as a library, then you can configure the @@ -66,11 +66,11 @@ here](https://www.ogre3d.org/2021/02/06/ogre-2-2-5-cerberus-released-and-egl-hea 11. [Install Gazebo](https://gazebosim.org/docs/latest/install). 12. Run a Gazebo world that uses OGRE2 with camera sensors using headless rendering. This will enable EGL. ``` - ign gazebo -v 4 -s -r --headless-rendering sensors_demo.sdf + gz sim -v 4 -s -r --headless-rendering sensors_demo.sdf ``` 13. Check that simulation is producing sensor data by ssh'ing into the EC2 instance from a new terminal and echoing a sensor topic. ``` ssh -i SSH_PEM_FILE_USED_DURING_LAUNCH ubuntu@EC_INSTANCE_PUBLIC_IP - ign topic -et /thermal_camera + gz topic -et /thermal_camera ``` diff --git a/tutorials/levels.md b/tutorials/levels.md index 55e61ae018..c2a59c092a 100644 --- a/tutorials/levels.md +++ b/tutorials/levels.md @@ -32,18 +32,18 @@ Gazebo ships with an example world that demos the levels feature. Try it as foll 1. Run the example world with the `--levels` flag: - `ign gazebo levels.sdf --levels` + `gz sim levels.sdf --levels` Gazebo will open with a world that has 2 vehicles, one red and one blue. 2. Open a new terminal and publish the following commands for the vehicles to drive forward: - `ign topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 4.0}"` + `gz topic -t "/model/vehicle_blue/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 4.0}"` and - `ign topic -t "/model/vehicle_red/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 2.0}"` + `gz topic -t "/model/vehicle_red/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 2.0}"` 3. Press play on Gazebo. You'll see that the tunnels will be loaded as the vehicles move forward. @@ -232,7 +232,7 @@ successfuly added. 1. Run the `levels_no_performer.sdf` world in a terminal. ``` -ign gazebo levels_no_performers.sdf -v 4 --levels +gz sim levels_no_performers.sdf -v 4 --levels ``` Here you will see the two vehicles, which are regular models that do not trigger level loading. They are not performers until you call the service. @@ -240,7 +240,7 @@ Here you will see the two vehicles, which are regular models that do not trigger 2. In another terminal call the add performer service for the blue vehicle. ``` -ign service -s /world/levels/level/set_performer --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "vehicle_blue"' +gz service -s /world/levels/level/set_performer --reqtype gz.msgs.StringMsg --reptype gz.msgs.Boolean --timeout 2000 --req 'data: "vehicle_blue"' ``` ### Example diff --git a/tutorials/light_config.md b/tutorials/light_config.md index d3f2d432bd..4cb5c6f1de 100644 --- a/tutorials/light_config.md +++ b/tutorials/light_config.md @@ -36,7 +36,7 @@ Then you should open two terminals and run: - Terminal one: ```bash - ign gazebo -r -v 4 empty.sdf + gz sim -r -v 4 empty.sdf ``` - Terminal two: diff --git a/tutorials/log.md b/tutorials/log.md index 4def7dfa32..0ab56316b8 100644 --- a/tutorials/log.md +++ b/tutorials/log.md @@ -19,13 +19,13 @@ Gazebo records two types of information to files: Run the example world with `--record` flag. This records data to a default path, i.e. `~/.gz/sim/log/`: -`ign gazebo -v 4 -r --record pose_publisher.sdf` +`gz sim -v 4 -r --record pose_publisher.sdf` A custom path can be specified for recorded files through the `--record-path` flag. When `--record-path` is specified, `--record` does not need to be separately specified: -`ign gazebo -v 4 -r --record-path ./foo pose_publisher.sdf ` +`gz sim -v 4 -r --record-path ./foo pose_publisher.sdf ` Other options for recording: @@ -94,7 +94,7 @@ The final record path will depend on a few options: Playback can be triggered by `--playback` command line flag. `` is the directory specified to record: -`ign gazebo -r -v 4 --playback ` +`gz sim -r -v 4 --playback ` ### From plugin in SDF diff --git a/tutorials/logical_audio_sensor.md b/tutorials/logical_audio_sensor.md index a29a891ef8..fe47d25aa5 100644 --- a/tutorials/logical_audio_sensor.md +++ b/tutorials/logical_audio_sensor.md @@ -64,7 +64,7 @@ Let's use the SDF file introduced above (`logical_audio_sensor_plugin.sdf`) to s Start a simulation that uses this SDF file by running the following command in a terminal: ``` -ign gazebo logical_audio_sensor_plugin.sdf +gz sim logical_audio_sensor_plugin.sdf ``` You should see a something like this: @@ -77,7 +77,7 @@ If a logical microphone can detect a source, it will publish a message to a dete With the simulator still running, open a new terminal and run the following command to see which microphone detection topics are available: ``` -ign topic -l +gz topic -l ``` You should see the following detection topics as a part of the output (the `_1` suffix is the ID assigned to the microphones in the SDF): @@ -91,7 +91,7 @@ Let's see if the microphone attached to `yellow_box` can hear anything. Run the following command: ``` -ign topic -e -t /model/yellow_box/sensor/mic_1/detection +gz topic -e -t /model/yellow_box/sensor/mic_1/detection ``` You'll notice that this command produces no output. @@ -101,7 +101,7 @@ Now, let's see if the microphone attached to `green_box` can hear anything. Modify the command you just ran to look like this: ``` -ign topic -e -t /model/green_box/sensor/mic_1/detection +gz topic -e -t /model/green_box/sensor/mic_1/detection ``` You'll notice an output that looks like the following: @@ -142,7 +142,7 @@ Logical audio sources can be started/stopped manually through Gazebo services. To see which services to call in order to start/stop a service, open a new terminal and run the following command (make sure the simulator is still running): ``` -ign service -l +gz service -l ``` If you look through the list of available services, you should see the following audio source services (the `_1` suffix is the ID assigned to the sources in the SDF): @@ -158,7 +158,7 @@ Let's start the source attached to `blue_box`. This can be done by running the following command, which calls the "play" service for the source attached to `blue_box`: ``` -ign service -s /model/blue_box/sensor/source_1/play --reqtype gz.msgs.Empty --reptype gz.msgs.Boolean --timeout 1000 --req 'unused: false' +gz service -s /model/blue_box/sensor/source_1/play --reqtype gz.msgs.Empty --reptype gz.msgs.Boolean --timeout 1000 --req 'unused: false' ``` Now, if you look back at the terminal that is displaying the output of `green_box`'s microphone detections, we can see that this microphone is detecting audio from `blue_box`'s source (we see `blue_box` as a part of the `key` field): @@ -187,7 +187,7 @@ Move `blue_box` back towards its original position, until you see detection mess Now, go ahead and stop `blue_box`'s source by running the following command: ``` -ign service -s /model/blue_box/sensor/source_1/stop --reqtype gz.msgs.Empty --reptype gz.msgs.Boolean --timeout 1000 --req 'unused: false' +gz service -s /model/blue_box/sensor/source_1/stop --reqtype gz.msgs.Empty --reptype gz.msgs.Boolean --timeout 1000 --req 'unused: false' ``` Now, if you look at the output for either microphone topic, you'll notice that no new messages are being published, which makes sense since no audio sources are currently playing. diff --git a/tutorials/mesh_to_fuel.md b/tutorials/mesh_to_fuel.md index 1fd6b3ecba..87c26d6b5b 100644 --- a/tutorials/mesh_to_fuel.md +++ b/tutorials/mesh_to_fuel.md @@ -179,7 +179,7 @@ The syntax for including any model from Fuel is: To launch the world and see your mesh, run Gazebo from inside the directory where you saved `import_mesh.sdf`: ```bash -ign gazebo import_mesh.sdf +gz sim import_mesh.sdf ``` ![Launch sample world with mesh](https://raw.githubusercontent.com/gazebosim/gz-sim/main/tutorials/files/mesh_to_fuel/launch_world2.png) diff --git a/tutorials/model_command.md b/tutorials/model_command.md index c2d5c2c06b..100219ad52 100644 --- a/tutorials/model_command.md +++ b/tutorials/model_command.md @@ -1,7 +1,7 @@ \page model_command Model Command ## Overview -`ign model` command allows you to get information about the models for a given running Gazebo simulation. +`gz model` command allows you to get information about the models for a given running Gazebo simulation. For each model, it is possible to get information about its - Pose: Pose of the model @@ -12,12 +12,12 @@ For each model, it is possible to get information about its To try out this command we need first a running simulation. Let's load the `diff_drive` example world. In a terminal, run: - ign gazebo diff_drive.sdf + gz sim diff_drive.sdf -Once Gazebo is up, we can use the ign model command to get information of the simulation. +Once Gazebo is up, we can use the gz model command to get information of the simulation. Open a new terminal and enter: - ign model --list + gz model --list And available models should be printed: @@ -29,9 +29,9 @@ And available models should be printed: Once you get the name of the model you want to see, you may run the following commands to get its properties. -`ign model -m ` to get the **complete information of the model**. e.g. +`gz model -m ` to get the **complete information of the model**. e.g. - ign model -m vehicle_blue + gz model -m vehicle_blue ``` Requesting state for world [diff_drive]... @@ -129,9 +129,9 @@ Once you get the name of the model you want to see, you may run the following co ``` -`ign model -m --pose` to get the **pose** information. e.g. +`gz model -m --pose` to get the **pose** information. e.g. - ign model -m vehicle_blue --pose + gz model -m vehicle_blue --pose ``` @@ -147,12 +147,12 @@ Once you get the name of the model you want to see, you may run the following co To get the information of **all the model links** enter - ign model -m --link + gz model -m --link Or you can get the information of a **single link** by adding the name as argument. e.g. - ign model -m vehicle_blue --link caster + gz model -m vehicle_blue --link caster ``` Requesting state for world [diff_drive]... @@ -175,11 +175,11 @@ Or you can get the information of a **single link** by adding the name as argume To get the information of **all the model joints** enter - ign model -m --joint + gz model -m --joint Or you can get the information of a **single joint** by adding the name as argument. e.g. - ign model -m vehicle_blue --joint caster_wheel + gz model -m vehicle_blue --joint caster_wheel ``` Requesting state for world [diff_drive]... diff --git a/tutorials/model_photo_shoot.md b/tutorials/model_photo_shoot.md index b6726e50a6..80f1632b01 100644 --- a/tutorials/model_photo_shoot.md +++ b/tutorials/model_photo_shoot.md @@ -8,7 +8,7 @@ in Gazebo, located at `examples/worlds/model_photo_shoot.sdf`, by running the following command: ``` -ign gazebo -s -r -v 4 --iterations 50 model_photo_shoot.sdf +gz sim -s -r -v 4 --iterations 50 model_photo_shoot.sdf ``` This will start Gazebo server, load the model and the plugin, take the diff --git a/tutorials/particle_tutorial.md b/tutorials/particle_tutorial.md index aed7b80616..71d1223f89 100644 --- a/tutorials/particle_tutorial.md +++ b/tutorials/particle_tutorial.md @@ -60,7 +60,7 @@ The SDF 1.6+ specification supports having a `` SDF element as Let's launch the example world to see what it looks like. ```bash -ign gazebo -v 4 -r particle_emitter.sdf +gz sim -v 4 -r particle_emitter.sdf ``` You should see the fog slowly starting to appear from the ground plane in the world: @@ -70,7 +70,7 @@ You should see the fog slowly starting to appear from the ground plane in the wo Next, try changing some properties of the particle emitter while the simulation is running. You can do this by publishing messages over Gazebo Transport. Try turning off the particle emitter by setting the `emitting` property to `false`. Make sure the simulation is running in order for this command to take effect. ```bash -ign topic -t /model/fog_generator/link/fog_link/particle_emitter/emitter/cmd -m gz.msgs.ParticleEmitter -p 'emitting: {data: false}' +gz topic -t /model/fog_generator/link/fog_link/particle_emitter/emitter/cmd -m gz.msgs.ParticleEmitter -p 'emitting: {data: false}' ``` Note the above command tells the particle emitter to stop emitting. It does not make all the particles disappear immediately. The particles that have already been emitted will naturally fade and disappear over the specified `lifetime`. @@ -78,13 +78,13 @@ Note the above command tells the particle emitter to stop emitting. It does not Turn particle emitter back on by setting the `emitting` property to `true`: ```bash -ign topic -t /model/fog_generator/link/fog_link/particle_emitter/emitter/cmd -m gz.msgs.ParticleEmitter -p 'emitting: {data: true}' +gz topic -t /model/fog_generator/link/fog_link/particle_emitter/emitter/cmd -m gz.msgs.ParticleEmitter -p 'emitting: {data: true}' ``` Here is an example command for changing the `rate` property of the particle emitter. This should make the particle emitter emit more particles per second, causing it to visually appear more dense. ```bash -ign topic -t /model/fog_generator/link/fog_link/particle_emitter/emitter/cmd -m gz.msgs.ParticleEmitter -p 'rate: {data: 100}' +gz topic -t /model/fog_generator/link/fog_link/particle_emitter/emitter/cmd -m gz.msgs.ParticleEmitter -p 'rate: {data: 100}' ``` ## Particle Effects on Sensors diff --git a/tutorials/physics.md b/tutorials/physics.md index b945a91ba0..4a913308c1 100644 --- a/tutorials/physics.md +++ b/tutorials/physics.md @@ -68,7 +68,7 @@ For the example above, you can load it like this: Alternatively, you can choose a plugin from the command line using the `--physics-engine` option, for example: -`ign gazebo --physics-engine CustomEngine` +`gz sim --physics-engine CustomEngine` ### From C++ API diff --git a/tutorials/server_config.md b/tutorials/server_config.md index 9d947f37c8..cb7df87a1a 100644 --- a/tutorials/server_config.md +++ b/tutorials/server_config.md @@ -33,7 +33,7 @@ environment variable. Let's try this in practice. First, let's open Gazebo without passing any arguments: -`ign gazebo` +`gz sim` You should see an empty world with several systems loaded by default, such as physics, the scene broadcaster (which keeps the GUI updated), and the system that @@ -66,7 +66,7 @@ Let's try customizing it: 3. Reload Gazebo: - `ign gazebo` + `gz sim` Now insert a shape and press play: it shouldn't fall because physics wasn't loaded. @@ -127,7 +127,7 @@ favorite editor and save this file as `fuel_preview.sdf`: Now let's load this world: -`ign gazebo -r /fuel_preview.sdf` +`gz sim -r /fuel_preview.sdf` Notice how the application has only one system plugin loaded, the scene broadcaster, as defined on the SDF file above. Physics is not loaded, so even @@ -221,7 +221,7 @@ Let's start by saving this simple world with a camera sensor as Then load the `simple_camera.sdf` world: -`ign gazebo -r /simple_camera.sdf` +`gz sim -r /simple_camera.sdf` You'll see a world with a camera and a cone. If you refresh the image display plugin, it won't show any image topics. That's because the default server diff --git a/tutorials/spherical_coordinates.md b/tutorials/spherical_coordinates.md index b08b3b178f..405102a256 100644 --- a/tutorials/spherical_coordinates.md +++ b/tutorials/spherical_coordinates.md @@ -60,7 +60,7 @@ Try out an example world that ships with Gazebo and has the coordinates above as follows: ``` -ign gazebo spherical_coordinates.sdf +gz sim spherical_coordinates.sdf ``` On the component inspector, expand the `Spherical Coordinates` component to see @@ -81,7 +81,7 @@ through the `/world//set_spherical_coordinates` service. Loading the world above, try calling for example: ```.bash -ign service \ +gz service \ -s /world/spherical_coordinates/set_spherical_coordinates \ --reqtype gz.msgs.SphericalCoordinates \ --reptype gz.msgs.Boolean \ @@ -105,7 +105,7 @@ For example, you can spawn a sphere into the `spherical_coordinates.sdf` world as follows: ```.bash -ign service -s /world/spherical_coordinates/create \ +gz service -s /world/spherical_coordinates/create \ --reqtype gz.msgs.EntityFactory \ --reptype gz.msgs.Boolean \ --timeout 300 \ @@ -135,7 +135,7 @@ specify the entity to be moved. For example, to move the sphere created above: ```.bash -ign service -s /world/spherical_coordinates/set_spherical_coordinates \ +gz service -s /world/spherical_coordinates/set_spherical_coordinates \ --reqtype gz.msgs.SphericalCoordinates \ --reptype gz.msgs.Boolean \ --timeout 300 \ diff --git a/tutorials/triggered_publisher.md b/tutorials/triggered_publisher.md index 6b99db8033..e146a70872 100644 --- a/tutorials/triggered_publisher.md +++ b/tutorials/triggered_publisher.md @@ -57,7 +57,7 @@ The `` tag sets up the `TriggeredPublisher` to subscribe to the topic `/start` with a message type of `gz.msgs.Empty`. The `` tag specifies the topic of the output and the actual data to be published. The data is expressed in the human-readable form of Google Protobuf messages. This is -the same format used by `ign topic` for publishing messages. +the same format used by `gz topic` for publishing messages. Since the `TriggeredPublisher` only deals with Gazebo topics, it can be anywhere a `` tag is allowed. For this example, we will put it under @@ -255,11 +255,11 @@ numbers is not advised, we will set a tolerance of 0.2. We can now run the simulation and from the command line by running ``` -ign gazebo -r triggered_publisher.sdf +gz sim -r triggered_publisher.sdf ``` and publish the start message ``` -ign topic -t "/start" -m gz.msgs.Empty -p " " +gz topic -t "/start" -m gz.msgs.Empty -p " " ``` diff --git a/tutorials/underwater_vehicles.md b/tutorials/underwater_vehicles.md index eabcee682b..6c434bf461 100644 --- a/tutorials/underwater_vehicles.md +++ b/tutorials/underwater_vehicles.md @@ -48,7 +48,7 @@ rpm. Under the `` or `` tag add the following: ``` Now if we were to publish to `/model/tethys/joint/propeller_joint/cmd_pos` ``` -ign topic -t /model/tethys/joint/propeller_joint/cmd_pos \ +gz topic -t /model/tethys/joint/propeller_joint/cmd_pos \ -m gz.msgs.Double -p 'data: -31' ``` we should see the model move. The thrusters are governed by the equation on @@ -161,7 +161,7 @@ name="gz::sim::systems::JointPositionController"> ``` We should now be able to wiggle the fins using the following command: ``` -ign topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos \ +gz topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos \ -m gz.msgs.Double -p 'data: -0.17' ``` @@ -169,12 +169,12 @@ ign topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos \ To control the rudder of the craft run the following ``` -ign topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos \ +gz topic -t /model/tethys/joint/vertical_fins_joint/0/cmd_pos \ -m gz.msgs.Double -p 'data: -0.17' ``` To apply a thrust you may run the following command ``` -ign topic -t /model/tethys/joint/propeller_joint/cmd_pos \ +gz topic -t /model/tethys/joint/propeller_joint/cmd_pos \ -m gz.msgs.Double -p 'data: -31' ``` The vehicle should move in a circle. @@ -185,6 +185,6 @@ When underwater, vehicles are often subject to ocean currents. The hydrodynamics plugin allows simulation of such currents. We can add a current simply by publishing the following: ``` -ign topic -t /ocean_current -m gz.msgs.Vector3d -p 'x: 1, y:0, z:0' +gz topic -t /ocean_current -m gz.msgs.Vector3d -p 'x: 1, y:0, z:0' ``` You should observe your vehicle slowly drift to the side. diff --git a/tutorials/video_recorder.md b/tutorials/video_recorder.md index d40618611e..cc533b2522 100644 --- a/tutorials/video_recorder.md +++ b/tutorials/video_recorder.md @@ -10,7 +10,7 @@ plugin to open the Video Recorder tool. Alternatively, launch the demo world in Gazebo that already has this plugin included in the GUI. ``` -ign gazebo -v 4 video_record_dbl_pendulum.sdf +gz sim -v 4 video_record_dbl_pendulum.sdf ``` In this plugin, you should see a single button with a video recorder icon.