Rviz & Gazebo mapping and navigation problem

I configured ROSBOT following the tutorials on github, but I can’t solve the following problem. Often the robot on rviz loses its real position (which is therefore different from that of a gazebo). For example, while I am creating a beautiful map of the environment, at a certain point everything moves because it moves the robot with the laser, and therefore on the correct map, I begin to write a translated and incorrect one. Also, let’s say I work with a saved map before the previous problem occurs. When I go to localization and navigation, the simulation becomes terribly slow. If you assign a goal using the rviz tools, it takes hours to reach it. I tried to change the configuration parameters (for example vel in trajectory planner) but the result doesn’t change. What can I do to improve my simulations? Thank you

Hello pls30,

The case of loosing position needs some more details:

  1. Could you point to which exact tutorial did you follow?
  2. Does the problem occur only in simulation or also on the real ROSbot?
  3. Are there any warnings or errors in the console output?
  4. Could you record a screen showing the issue?

The simulation speed greatly depends on computer efficiency. Also make sure that there are no other simulation instances running or computational intensive tasks.

Regards,
Łukasz

could you post the transform publisher you’re using to translate between base_link and laser? It looks like yours is turned by 90 degrees.

it should look something like this:

rosrun tf static_transform_publisher 0 0 0.1 3.14 0 0 base_link laser 100

or this

node if="$(arg use_rosbot)" pkg=“tf” type=“static_transform_publisher” name=“laser_broadcaster” args=“0 0 0 3.14 0 0 base_link laser 100” / with pointy brackets around it

depending on if you run it separately or in a launch file