Ask Your Question
5

heightmap for gazebo

asked 2011-05-25 23:25:40 -0600

JonW gravatar image

I'm experimenting with using a heightmap in gazebo to produce some nice rolling terrain. So far I have found that it works wonderfully until I add a LIDAR sensor. When I add such a sensor to the robot I find that the simulation runs smoothly until an object enters the robots field of view. Adding any such object slows down the sim almost to a standstill.

I read the answer about improving performance in Gazebo adn tried improving the speed by reducing the number of LIDAR rays to 10 and chopping back the physics rate to 100Hz. With these changes the simulation runs at about 1/5th normal speed.

Is there any way of making the heightmap geom more gazebo friendly? failing that is it possible to import mesh based terrain? I have found at least one project that used both heightmaps and LIDAR under gazebo

edit retag flag offensive close merge delete

Comments

I have created a map in blender and exported it as a COLLADA file. I am not sure of the exact number of vertices, but the .xml mesh is about 2MB in size. This map does not exhibit the slowdown that I am seeing with an image based heightmap.
JonW gravatar imageJonW ( 2011-05-26 11:53:37 -0600 )edit
OK alternative idea - is there a good method for going from a heightmap image to a collada file? I have experimented with the blender tutorial here: http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Making_Landscapes_with_heightmaps but it is a very manual process.
JonW gravatar imageJonW ( 2011-05-28 15:22:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-06-10 03:45:45 -0600

nkoenig gravatar image

I did a little research into ODE heightfields, and it turns out the collider used for heightfields in ODE is not very efficient: http://groups.google.com/group/ode-users/browse_thread/thread/d883a0e15b1647d5

This has been of the features in Gazebo which has received little use. So, the near term solution is to use triangle meshes, like you have done. It may also be more efficient to break your large terrain into sections. The ODE collision engine uses bounding boxes as a first pass to determine if two object should be checked for collision. So, rather than one large bounding box for the entire terrain mesh, you can have multiple smaller bounding boxes. This will ideally reduce the number of collision checks.

edit flag offensive delete link more

Comments

Thanks for following this up. Breaking up terrain into sections sounds like a good idea.
JonW gravatar imageJonW ( 2011-06-10 15:39:32 -0600 )edit

Hey @JonW have you found a solution to your problem? I am experiencing the same thing; gazebo FPS goes down when my rover gets near a mountain.

ChickenSoup gravatar imageChickenSoup ( 2012-06-20 00:48:45 -0600 )edit

I am converting the heightmap into a collada mesh externally then importing that into gazebo. The release of gazebo in fuerte seems to be much happier dealing with big meshes - I just tried loading a collada heightmap with about 700k vertices (although I haven't collided anything with it yet)

JonW gravatar imageJonW ( 2012-06-20 16:30:21 -0600 )edit

@JonW Thanks for your comment. Currently, I am using the gazebo of ros-electric. I will give a try installing ros-fuerte

ChickenSoup gravatar imageChickenSoup ( 2012-06-20 21:21:34 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-05-25 23:25:40 -0600

Seen: 1,516 times

Last updated: Jun 10 '11