GZ(1)

πŸ“¦ version 11.10.2, in ubuntu jammy

πŸŽ€ gz(1) β€” bestie's guide to the gazebo command line ✨

okay so you opened the manual for gz and you came to the right place. this is the Gazebo command line tool for control and analysis, and we're gonna get through the whole thing together. boba in hand, let's go. πŸ’–


πŸ“– NAME

gz β€” Gazebo command line tool for control and analysis.

that's it. that's the whole vibe. πŸ‘‘


πŸ“œ SYNPOSIS

gz command [option]... [argument]...

so you say gz, then a command, then however many options you want, then your arguments. structure, we love her. πŸ¦‹


🧚 COMMANDS

πŸ“Έ camera

gz camera [options]

this one changes the properties of a camera. if you don't tell it which world you mean with -w, it just grabs the first world it finds on the Gazebo master, no questions asked. but a camera name? required. you gotta give it one, bestie.

Options:

  • --verbose β€” print extra information, if you're nosy like me πŸ™ˆ
  • -h, --help β€” print this help message
  • -w, --world-name=arg β€” world name.
  • -c, --camera-name=arg β€” camera name. psst, run gz camera -l to get a list of camera names first. πŸ’…
  • -l, --list β€” list all cameras
  • -f, --follow=arg β€” model to follow.

πŸ› debug

gz debug [options]

this one is used primarily for bash completion. you give it a command, it returns the completion list for that command. it's giving behind-the-scenes main character. ✨

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message
  • -o, --option=arg β€” show the command options.

πŸ†˜ help

gz help [options]

outputs information about a gz command. when in doubt, ask for help. no shame in it. 🫢

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message

🦾 joint

gz joint [options]

changes the properties of a joint. if you don't specify a world name with -w, it uses the first world found on the Gazebo master. a model name and a joint name are required.

ok so important: it is recommended to use only one type of command β€” force, position PID, or velocity PID. don't mix, bestie, it's not that kind of party.

here's the breakdown:

  • Force: use --force to apply a force.
  • Position PID: use --pos-t to specify a target position, along with --pos-p, --pos-i, --pos-d to specify the PID parameters.
  • Velocity PID: use --vel-t to specify a target velocity, along with --vel-p, --vel-i, --vel-d to specify the PID parameters.

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message
  • -w, --world-name=arg β€” world name.
  • -m, --model-name=arg β€” model name.
  • -j, --joint-name=arg β€” joint name.
  • -f, --force=arg β€” force to apply to a joint (N).
  • --pos-t=arg β€” target angle(rad) for rotation joints or position (m) for linear joints.
  • --pos-p=arg β€” position proportional gain.
  • --pos-i=arg β€” position integral gain.
  • --pos-d=arg β€” position differential gain.
  • --vel-t=arg β€” target speed (rad/s for rotational joints or m/s for linear joints).
  • --vel-p=arg β€” velocity proportional gain.
  • --vel-i=arg β€” velocity integral gain.
  • --vel-d=arg β€” velocity differential gain.

πŸ“Ό log

gz log [options]

introspect and manipulate Gazebo log files. the log command can also start and stop data log recording from an active Gazebo server. multitasking queen. πŸ‘‘

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message
  • -i, --info β€” output information about a log file. the log filename should be specified using the --file option
  • -e, --echo β€” output the contents of a log file to screen.
  • -s, --step β€” step through the contents of a log file.
  • -d, --record=arg β€” start/stop recording a log file from an active Gazebo server. 0=stop record, 1=start recording.
  • -w, --world-name=arg β€” world name, used when starting or stopping recording.
  • -r, --raw β€” output the data from echo and step without XML formatting. used in conjuction with --echo or --step.
  • --stamp=arg β€” add a timestamp to each line of output. valid values are sim, real, wall
  • -z, --hz=arg β€” filter output to the specified Hz rate. only valid for echo and step commands.
  • -f, --file=arg β€” path to a log file.
  • -o, --output=arg β€” output file, valid in conjunction with the filter, raw, hz, and encoding commands. by default, the output file will have the same encoding as the source file. override with the --encoding option
  • -n, --encoding=arg β€” specify the encoding (txt, zlib, or bz2) for an output file. valid in conjunction with the output command. see also the --output argument.
  • --filter=arg β€” filter output. valid only with the echo, step, and output commands

πŸ“ marker

gz marker [options]

add, modify, or delete visual markers. little stickers for your sim, basically. 🌸

πŸ” Option Details

-a, --add: no argument

this option indicates that a marker should be added or modified. use this in conjunction with -t to specify a marker type, -i to specify a marker id, -p to specify a parent, -f to specify a lifetime for the marker, or -n to specify a namespace.

-n, --namespace: string argument

namespaces allow markers to be grouped. this option can be used the -a and -x command. the default namespace is empty string.

-i, --id: integer argument

each marker has a unique id. use this option with the -a command to assign an id to a marker. if -i is not specified, a value of zero will be used.

-t, --type: string argument

use this command with -a to specify a marker type. the string argument must be one of: sphere, box, cylinder, line_list, line_strip, points, sphere, text, triangle_fan, triangle_list, triangle_strip.

-p, --parent: string argument

a marker can be attached to an existing visual. use this command with -a to specify a parent visual. by default a marker is not attached to a parent visual.

-f, --lifetime: double argument

a marker's lifetime is the number of seconds that it will exist. time starts counting when the marker is created. by default a marker has an infite lifetime.

-d, --delete: integer argument

this option will delete a single marker, if a marker exists with the specified id. the integer argument is the id of the marker to delete.

-x, --delete-all: no argument

delete all markers.

-l, --list: no argument

list all markers.

-y, --layer: integer argument

add or move a marker to the specified layer. use this argument with the -a argument.

-m, --msg: string argument

use this option to send a custom marker message. this option will override all other command line options. details about the marker message can be found using:

$ ign msg -i ign_msgs.Marker

Example:

$ gz marker -m 'action: ADD_MODIFY, type: SPHERE, id: 2, scale: {x:0.2, y:0.4, z:1.2}'

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message
  • -a, --add β€” add or modify a visual marker
  • -m, --msg=arg β€” specify and send a marker message.
  • -n, --namespace=arg β€” namespace for the visual marker
  • -i, --id=arg β€” positive integer value of a visual marker
  • -t, --type=arg β€” type of geometry: box, cylinder, sphere, line_list, line_strip, points, text, triangle_fan, triangle_list, triangle_strip
  • -p, --parent=arg β€” name of a visual to which this marker should be attached.
  • -f, --lifetime=arg β€” simulation time the marker should last before deletion.
  • -d, --delete β€” delete an existing visual marker.
  • -x, --delete-all β€” delete all markers, or all markers in a namespace.
  • -l, --list β€” get a list of the visual markers.
  • -y, --layer=arg β€” add or move a marker to the specified layer.

🧸 model

gz model [options]

change properties of a model, delete a model, or spawn a new model. if you don't name a world with -w, it grabs the first world found on the Gazebo master. (the original says "pecified" here, and honestly? relatable. we all have typos. πŸ’€)

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message
  • -m, --model-name=arg β€” model name.
  • -w, --world-name=arg β€” world name.
  • -d, --delete β€” delete a model.
  • -f, --spawn-file=arg β€” spawn model from SDF file.
  • -s, --spawn-string β€” spawn model from SDF string, pass by a pipe.
  • -i, --info β€” output model state information to the terminal.
  • -p, --pose β€” output model pose as a space separated 6-tuple: x y z roll pitch yaw.
  • -x, --pose-x arg β€” x value
  • -y, --pose-y arg β€” y value
  • -z, --pose-z arg β€” z value
  • -R, --pose-R arg β€” roll in radians.
  • -P, --pose-P arg β€” pitch in radians.
  • -Y, --pose-Y arg β€” yaw in radians.

πŸͺ physics

gz physics [options]

change properties of the physics engine on a specific world. no world name with -w? you know the drill β€” first world found on the Gazebo master. 🌈

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message
  • -w, --world-name=arg β€” world name.
  • -g, --gravity=arg β€” gravity vector. comma separated 3-tuple without whitespace, eg: -g 0,0,-9.8
  • -s, --step-size=arg β€” maximum step size (seconds).
  • -i, --iters=arg β€” number of iterations.
  • -u, --update-rate=arg β€” target real-time update rate.
  • -o, --profile=arg β€” preset physics profile.

πŸ“„ sdf

gz sdf [options]

introspect, convert, and output SDF files. use the -v option to specify the version of SDF for use with other options. πŸŽ€

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message
  • -d, --describe β€” print SDF format for given version(-v).
  • -c, --convert=arg β€” in place conversion of arg to the latest SDF version.
  • -o, --doc β€” print HTML SDF. use -v to specify version.
  • -k, --check=arg β€” validate arg.
  • -v, --version=arg β€” version of SDF to use with other options.
  • -p, --print=arg β€” print arg, useful for debugging and as a conversion tool.

πŸ“Š stats

gz stats [options]

prints gzserver statics to standard out. (yes, "statics". we're keeping it. πŸ’œ) if you don't specify a world with -w, it uses the first world found on the Gazebo master.

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message
  • -w, --world-name=arg β€” world name.
  • -d, --duration=arg β€” duration (seconds) to run.
  • -p, --plot β€” output comma-separated values, useful for processing and plotting.

πŸ“‘ topic

gz topic [options]

print topic information to standard out, or publish a message on a topic. if you don't specify a world name with -w, it uses the first world found on the Gazebo master. πŸ”₯

Options:

  • --verbose β€” print extra information
  • -h, --help β€” print this help message
  • -w, --world-name=arg β€” the world name, bestie. that's it, that's the whole thing 🫢
  • -l, --list β€” show me ALL the topics, every single one, the whole roster πŸ‘‘
  • -i, --info=arg β€” get the tea on a specific topic, drop the topic name in arg and it spills β˜•
  • -e, --echo=arg β€” blast the topic's data straight to your screen so you can watch it go brrr πŸ’…
  • -v, --view=arg β€” same idea but make it fashion: peep the topic data through a QT widget ✨
  • -z, --hz=arg β€” get the publish frequency, aka how often this thing is posting πŸ“ˆ
  • -b, --bw=arg β€” get the topic bandwidth, aka how chonky the data stream is 🌸
  • -p, --publish=arg β€” publish a message onto a topic. you're the main character now, you're the one posting πŸ“£
  • -r, --request=arg β€” send a request, like sliding into the DMs but for topics πŸ’Œ
  • -u, --unformatted β€” echo output but raw and unfiltered, no formatting, no makeup, no filter πŸͺž
  • -d, --duration=arg β€” how long (in seconds) to keep it running. only applies with echo, hz, and bw ⏱️
  • -m, --msg=arg β€” the actual message you're sending on the topic. applies with publish and request πŸ’¬
  • -f, --file=arg β€” path to a file holding the message you wanna send on the topic. also applies with publish and request πŸ“

🌍 world 🌍

gz world [options]

okay so this one changes the properties of a Gazebo world on a server that's already running. and here's the lil shortcut bestie needs to know: if you don't hand it a name for the world β€” that's option -w β€” it's just gonna grab the first world it finds on the Gazebo master. no questions asked, first come first served πŸ™ˆ

Options:

  • --verbose β€” print the extra deets, give me all the context πŸ—£οΈ
  • -h, --help β€” print this help message. classic, iconic, always there for you πŸŽ€
  • -w, --world-name=arg β€” world name. yeah she's back, she's everywhere πŸ’œ
  • -p, --pause=arg β€” pause or unpause the simulation. 0=unpause, 1=pause. freeze frame πŸ“Έ
  • -s, --step β€” step the simulation forward one single iteration. baby steps, one at a time πŸ¦‹
  • -m, --multi-step=arg β€” step the simulation mulitple iteration. (that's the original spelling bestie, i don't make the rules, i just respect them πŸ’€)
  • -r, --reset-all β€” reset time AND model poses. full factory reset energy, everything back to square one πŸ”„
  • -t, --reset-time β€” reset just the time ⏰
  • -o, --reset-models β€” reset just the models 🧸
heads up: --pause=arg is picky β€” it only takes 0 for unpause or 1 for pause. no vibes-based in-between values, fr fr.

and that's the whole page, bestie!! this one's from the September 2014 era, and it's the GZ(1) manual page. go forth and slay your simulations πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from