ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Rviz 'base map' at a different initial position compared to Gazebo world

asked 2020-03-31 14:06:52 -0500

Shivendra gravatar image

updated 2022-03-20 09:59:11 -0500

lucasw gravatar image

I launched the turtlebot3 using

roslaunch turtlebot3_gazebo
turtlebot3_world.launch

and then launched the ROS navigation stack and some other nodes using

roslaunch turtlebot3_navigation
turtlebot3_navigation.launch

I see that the default map in the Rviz is centered differently than the Gazebo. Why is that and how can I sync them?

Here's an image showing that - image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-04-04 10:49:35 -0500

Weasfas gravatar image

updated 2020-04-04 10:50:24 -0500

Hi @Shivendra,

The difference you see between Gazebo and the map is actually the normal behaviour when you launch the navigation for the first time. Since you are using AMCL to localize the robot in the map, you need to provide AMCL with a first pose estimate in order to begin the localization process.

This can be done by clicking in the top Panel of Rviz named 2D Pose Estimate and clicking again in the map in the "real" pose the robot is placed in the Gazebo world. You will see how AMCL corrects its estimations and the Pose array provided significantly decreases the uncertainty.

edit flag offensive delete link more

Comments

Thanks for the response and the explanation. I could manage to sync that but I did it slightly differently. I changed the initial pose arguments in the amcl.launch file to match the initial pose in turtlebot3_world.launch. I thought the GUI based way via RViz would make the pose almost the same but not pinpoint same.

Shivendra gravatar image Shivendra  ( 2020-04-05 19:40:36 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-03-31 14:06:52 -0500

Seen: 1,032 times

Last updated: Mar 20 '22