Gazebo | Ignition | Community
Ask Your Question

Z Offset of the grid in gazebo

asked 2013-05-20 05:32:18 -0500

peshala gravatar image

updated 2013-05-20 19:47:25 -0500

Hi all,

I just noticed that there is an z offset of the grid in gazebo. When a model is inserted this is clearly visible. image description

When I get a laser pointcloud using a tilting laser there is a similar offset visible and the robot appears to be floating; I guess there is a connection between this and the above. image description This is from rviz in ROS.

Is this a bug?

+++++ Edit +++++

world file <sdf version="1.4"> <world name="3D_odom_test">

    <!-- ground plane -->

    <!-- sun -->

    <!-- rover -->

</world> </sdf>

edit retag flag offensive close merge delete


I am using gazebo 1.7.1

peshala gravatar imagepeshala ( 2013-05-20 06:00:55 -0500 )edit

Can you verify that your rover is correct? Are all the dimensions specified correctly? You can try turning on collision visualization in the gazebo GUI (under the view menu). The orange shapes should match the textured shapes.

nkoenig gravatar imagenkoenig ( 2013-05-20 23:07:02 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-20 13:58:05 -0500

nkoenig gravatar image

The grid offset in gazebo is done on purpose. It's a hack to make sure the grid doesn't z-fight with the ground plane.

The grid in gazebo is not tied to the laser. What type of laser are you using (CPU or GPU)? It would also help to see your gazebo world file.

edit flag offensive delete link more


Thank you for your answer. I am using CPU laser (ros laser plugin). Also, can I know this grid offset value so that I can check whether there is any connection between laser pointcloud plane and the robot wheel plane?

peshala gravatar imagepeshala ( 2013-05-20 19:51:32 -0500 )edit

The grid you see in gazebo is very separate from the grid in rviz. You can even disable the grid in gazebo using the following SDF within your world: <scene><grid>false</grid></scene>. The grid height offset is 0.015 meters.

nkoenig gravatar imagenkoenig ( 2013-05-20 23:21:10 -0500 )edit

the rover moves on the grid in rviz but the pointcloud is below that. I will let you whether it matches with 0.015

peshala gravatar imagepeshala ( 2013-05-21 00:30:55 -0500 )edit

@nkoenig the reason for the pointcloud offset was due to an error of the laser plugin. I was using the laser plugin from simulator_gazebo (gazebo_ros_laser.cpp) and it was erroneous; gazebo_ros_laser.cpp from drcsim solved the problem.

peshala gravatar imagepeshala ( 2013-06-04 04:22:05 -0500 )edit

Hi, I am also moving polaris on the grid of gazebo but pointcloud is below the grid of rviz. I am just using model plugin of gazebo .How do i solve it ? Any help would be appreciated. Thanks!

anonymous gravatar imageanonymous ( 2014-11-13 01:42:54 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-05-20 05:32:18 -0500

Seen: 1,181 times

Last updated: May 20 '13