Gazebo | Ignition | Community
Ask Your Question

how to create a new model using Gazebo's xml language?

asked 2017-08-16 05:14:59 -0500

langong gravatar image

I following the tutorial to save images on the disk. But I do not know what code can I use to custom model or the world. For instance, 1. how to change the filename of saved images? 2. how to save only one latest image always. Because I do not want there are millions of images in my disk hours later. So I just want to save the one image per second and replace the old image instead of new image each second with the same filename.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-08-16 17:13:19 -0500

sloretz gravatar image

As for the title, this tutorial shows how to create a velodyne lidar. The xml format gazebo uses is called sdformat and the specification is available here.

The name of the file comes from the name of the sensor. In the tutorial the images have the name default_camera_link_my_camera. default is because that's the name of the <world>. camera is the name of the <model> the sensor is on. link is the name of the <link> the sensor is on. my_camera is the name of the <sensor>. I don't think there is a way to tell gazebo to replace an old image with a new one without writing some code.

It can be done if you write a custom plugin to save the image. There are some general tutorials about creating plugins here. Once you're familiar with those I recommend using the camera plugin source code as a starting point.

edit flag offensive delete link more


Good answers. Thank you very much!

langong gravatar imagelangong ( 2017-08-17 09:25:19 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-08-16 05:14:59 -0500

Seen: 143 times

Last updated: Aug 16 '17