[Solved] ROS 2 Tutorial -> SLAM - Rosbot simulation does not publish /map

Hi I am trying to run tutorial_pkg files SLAM | Husarion
on rosbot 2r in gazebo but unfortunatelly map is not received.

Tutorial’s recommended model in gazebo is: GitHub - husarion/rosbot_xl_ros: ROS 2 packages for ROSbot XL
and it’s working perfectly ok.
BUT
when i tried to use github /husarion/rosbot_ros
I’ve got map error in rviz2
I attach screenshots with the problem.

Unfortunatelly it’s obligatory for my team to use rosbot 2r not xl. I am typing exacly the same on both models.





Hi @thespgn and welcome to our community,

Please check this topic. I think I will be helpful.

Let me know if you managed to solve the problem.
Regards

Hi @RafalGorecki ,
we changed /scan_filtered for /scan in .yaml and .rviz files and also we change fixed frame to “odom” (instead of map) and it works now :smiley: .
Thank you for fast answear with solution of the problem :smiley:

Best Regards
thespgn

1 Like

P.S.
if someone have similar problem in the future, all you have to do is:

  1. Change scanning topic in .yaml

~/ros2_ws/src/tutorial_pkg/config$ gedit slam.yaml

(I use gedit, you can use your favourite)

you have to localize:


# ROS Parameters
    odom_frame: odom
    map_frame: map
    base_frame: base_link
    scan_topic: /scan_filtered

and change it to:

# ROS Parameters
    odom_frame: odom
    map_frame: map
    base_frame: base_link
    scan_topic: /scan
  1. Change rviz settings in .rviz

~/ros2_ws/src/tutorial_pkg/rviz$ gedit slam.rviz

you have to localize:

Value: /scan_filtered

and change it to:

Value: /scan

then you have to localize:

Fixed Frame: map

and change it to:

Fixed Frame: odom

I hope this reply is more readable then my previous.

Thank you for describing in detail what changes need to be made for it to work properly. For my part, I will add that for navigation it is worth reducing the footprint on the ROSbot 2R / 2 PRO, because it is smaller than the ROSbot XL.

footprint: '[[0.10, 0.12], [0.10, -0.12], [-0.10, -0.12], [-0.10, 0.12]]'

The last change about Fixed Frame doesn’t seem to be necessary, because map will be created by slam_toolbox.

Thanks

This topic was automatically closed after 7 days. New replies are no longer allowed.