Home | Tutorials | Wiki | Issues
Ask Your Question
0

Groundplane in Gazebo vs. Rviz

asked 2017-01-18 18:03:30 -0500

jetdillo gravatar image

I'm having some problems with how Gazebo and Rviz treat the simulated world our robot is running in. In Gazebo, our robot appears on the groundplane and moves and navigates successfully between goals either by teleop or program. It will programmatically recognize obstacles with the laser_plugin and some basic obstacle avoidance code I've written. I can even use gmapping to create a map of the simulated space. When I bring up that map in Rviz though, the robot is below the map and won't successfully proceed to an arbitrary goal picked out in Rviz w/ the "Set 2D Nav Goal" function.

When I load in another map(and world), say, the Willow Garage willow.yaml map, the robot shows up on the groundplane both in Rviz and in Gazebo.

The point where my map and or simulated robot intersect is at the Z-height of base_link. I know this should be telling me something, but I'm stuck as to what. I've attached pictures below of the situation. The robot model is a Gazebo-ized URDF, not SDF.

Gazebo simulation image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-04-01 14:59:39 -0500

jetdillo gravatar image

updated 2017-04-01 15:01:59 -0500

Just following up a few months after the fact.

The answer here is that I needed to provide a base_footprint <link> for the robot to raise it above the "floor". I added an empty link:

<link name="base_footprint" />

and then a corresponding joint to fix it to the robot.

<joint name="base_joint" type="fixed" >
   <parent link="base_link" />
   <child link="base_footprint" />
   <origin xyz="0 0 -0.57325" rpy="0 0 0" />
</joint>

The Z offset is from the geometric center of base_link. Yay! Now the Rviz mapping representation matches the Gazebo visualization.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-01-18 18:03:30 -0500

Seen: 297 times

Last updated: Apr 01