Ask Your Question

Slam Toolbox detects change of position in Gazebo

asked 2021-01-14 11:07:52 -0500

B3NY1 gravatar image

I am currently using the SLAM toolbox with the Turtlebot3 in a Gazebo simulation (see Navigation Tutorial). I have changed the position of the robot in Gazebo (changed the pose in the gui). So that the robot jumps through the room. According to my understanding the SLAM toolbox should not notice that the pose has changed. But I noticed in Rviz that the SLAM toolbox knows exactly where it jumped to. See picture (left original pose; right pose where the robot jumped to):

image description

My question is whether I have misunderstood and the SLAM toolbox uses the position of Gazebo. In a real application this is not possible.

Thank you for your Answer.

Additional information: ROS Version: ROS Foxy SLAM algorithm: SLAM Toolbox Navigation2 Stack

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-01-15 11:22:30 -0500

agutenkunst gravatar image

I did not check in depth but:

The odom information is publish by the GazeboDifferentialDrive Plugin (see the Plugin allows you to chose between WORLD and ENCODER source (set via <odometrySource>.

See e.g.

Set to the default WORLD source the Plugin uses the internal information from Gazebo. Thus if you jump the information is immediately available to the plugin resulting in the shown effect.

To get more realism into the simulation try switching to the ENCODER source. Scanning the plugin code this seems to require a defined joint for both the left and right wheel but maybe this is already set in your model.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools



Asked: 2021-01-14 11:07:52 -0500

Seen: 99 times

Last updated: Jan 15