Gazebo | Ignition | Community
Ask Your Question
0

gz log does not work, causes segmentation fault

asked 2020-10-29 14:51:06 -0500

waffle_pi gravatar image

I launched an empty world with a waffle_pi, using the urdf from turtlebot3_description

Then in another terminal I run gz log -d 1 -e, I got

<?xml version='1.0'?>
<gazebo_log>
<header>
<log_version></log_version>
<gazebo_version></gazebo_version>
<rand_seed>0</rand_seed>
<log_start>0 0</log_start>
<log_end>0 0</log_end>
</header>

Segmentation fault

If I run gz log -d 1 without the -e, the terminal that is running the world shows

Error [parser_urdf.cc:3474] Unable to call parseURDF on robot model
Error [parser.cc:341] parse as old deprecated model file failed.

This happens on both gazebo 7.16.1 with ROS Kinetic and 9.13.2 with ROS Melodic

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-10-29 17:38:23 -0500

You are not supposed to use -d with -e. -d is for starting/stopping recording, and -e is for printing the contents of a file. A possible workflow could be:

  • gz log -d 1 to start recording
  • gz log -d 0 to stop recording
  • gz log -e -f <path-to>/state.log to view the contents of the log

You can ignore the parseUrdf error.

edit flag offensive delete link more

Comments

Thanks! A follow up question: I see that gz log -d 1 actually makes gazebo publish a message to ~/log/control, do you think I can write a ROS node, listen to a topic and do the same when received a message? Basically I want to programmatically start/stop recording

waffle_pi gravatar imagewaffle_pi ( 2020-10-29 21:59:10 -0500 )edit

Probably. If you don't want to look into the details, you can also do a system call to gz log ....

nlamprian gravatar imagenlamprian ( 2020-10-30 04:26:08 -0500 )edit

turns out it only works when you publish the message to gazebo/default/log/control but not ~/log/control

waffle_pi gravatar imagewaffle_pi ( 2020-10-30 16:32:41 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-10-29 14:51:06 -0500

Seen: 164 times

Last updated: Oct 29 '20