Tools

World Statistics ==

The `gzstats` tool displays general statistics about currently running world.


 * Usage:**

> gzstats  > >  : Name of the world (Default = "default")


 * Example:**

$ gzstats

Factor[478.00] SimTime[831968.73] RealTime[2093.69] Paused[F] Factor[399.00] SimTime[832048.58] RealTime[2093.89] Paused[F] Factor[398.67] SimTime[832127.75] RealTime[2094.09] Paused[F]

Topic Info == The `gztopic` tool displays information about published topics.


 * Usage:**

> gztopic


 * Commands:**

> > list        : List all topics

> > info : Get information about a topic

> > echo : Output topic data to screen

> > view : View topic data using a QT widget

> > hz  : Get publish frequency

> > bw  : Get topic bandwidth

> > help        : Display help text


 * Options**:

> > -h [ --help ]       : Output this help message.

> > -u [ --unformatted ] : Output the data from echo and list without formatting.


 * Examples:**

$ gztopic list

/gazebo/default/gui /gazebo/default/scene /gazebo/default/response /gazebo/default/world_stats /gazebo/default/selection /gazebo/default/model/info /gazebo/default/pose/info /gazebo/default/visual /gazebo/default/request /gazebo/default/joint /gazebo/world/modify

$ gztopic info /gazebo/default/world_stats

Type: gazebo.msgs.WorldStatistics Publishers: 127.0.1.1:38186        Subscribers: 127.0.1.1:48983

$ gztopic hz /gazebo/default/world_stats

Hz:  4.63 Hz:  5.56 Hz:  4.63 Hz:  5.56

$ gztopic echo -u /gazebo/default/world_stats

sim_time { sec: 197 nsec: 357000000 } pause_time { sec: 0 nsec: 0 } real_time { sec: 198 nsec: 846875458 } paused: false iterations: 197357 sim_time { sec: 197 nsec: 557000000 } pause_time { sec: 0 nsec: 0 } real_time { sec: 199 nsec: 47136552 } paused: false iterations: 197557 sim_time { sec: 197 nsec: 757000000 } pause_time { sec: 0 nsec: 0 } real_time { sec: 199 nsec: 247788813 } paused: false iterations: 197757

Data Log Tool ==

The `gzlog` tool processes log files created by Gazebo.
 * Usage:**

> gzlog

>  Commands: > > info        : Display statistical information about a log file.

> > echo        : Output the contents of a log file to screen.

> > step        : Step through the contents of a log file.

> > help        : Display help text

>  Options: > > --filter arg : Filter output. Valid only for the echo and step commands

> > -z [ --hz ] arg : Filter output to the specified Hz rate.

> > -s [ --stamp ] arg : Add a timestamp to each line of output. Valid values are (sim,real,wall)

> > -r [ --raw ] : Output data from echo and step commands without XML formatting.

Raw Output

gzlog can be used to output state information without XML formatting. This is only valid for the `echo` and `step` commands, and will only work properly when filtering the type of output.

Example: Output the raw pose of the PR2

gzlog echo -r --filter pr2.pose gzserver.log

Time Stamp

The time stamp option, available via the -s [--stamp] command line option, prefixes output with the recorded simulation time, real time, or wall time. This option is only valid for the `echo` and `step` commands, and when used in conjunction with Raw output (see above).

Example: Output the raw pose of the PR2 with simulation time stamp

gzlog echo -r -s sim --filter pr2.pose gzserver.log

Filtering based on Time

State information can be filtered based on recorded real-time through the -z [ --hz ] command line option. This is only valid for the `echo` and `step` commands. The floating point number following the -z [--hz] option specifies the frequency at which state information should be output.

For example, to output state data at 30Hz:

gzlog echo -z 30 gzserver.log

Filtering based on Type

Filtering a log file is only applicable to the echo and step commands. A filter will cause only specific parts of a log file to print.

A filter consists of the following components:

.pose.[x,y,z,r,p,a]/.[pose.[x,y,z,r,p,a],velocity.[x,y,z,r,p,a],acceleration.[x,y,z,r,p,a],wrench.[x,y,z,r,p,a]]/.[0,1,2]

Each component in a filter is optional. The names , , and  can include a '*' to match multiple models, links, and joints.


 * Examples:**

Output the entire pr2 model state ~ gzlog echo state.log --filter pr2 ~

Output only the pose of the pr2 ~ gzlog echo state.log --filter pr2.pose ~

Output only the x position of the pr2 ~ gzlog echo state.log --filter pr2.pose.x ~

Output the x and y positions of the pr2 ~ gzlog echo state.log --filter pr2.pose.[x,y] ~

Output a only one link of the pr2 ~ gzlog echo state.log --filter pr2/r_upper_arm_roll_link ~

Output a only the pose of one link of the pr2 ~ gzlog echo state.log --filter pr2/r_upper_arm_roll_link.pose ~

Output the pr2 pose, and the pose of a link ~ gzlog echo state.log --filter pr2.pose/r_upper_arm_roll_link.pose ~

Output all link poses for the pr2 ~ gzlog echo state.log --filter pr2/*.pose ~