[Solved] Gazebo on melodic

Hi,

Installed ROS melodic and rosbot_description per direction at rosbot_description/README.md at master · husarion/rosbot_description · GitHub.

Then, ran these for rosbot gazebo world with:

In Terminal 1, launch the Gazebo simulation:

$ source ~/catkin_ws/devel/setup.sh

$ roslaunch rosbot_description rosbot_rviz_gmapping.launch

Output:
opens gazebo with objects

      opens rviz with rosbot.  Changed laserscan topic from /rosbot/laser/scan to /scan

           Problem

                  See flat map

                  laser scan data is not visible and does not show (help!)

       Also, ran rostopic echo /scan results with

                 ranges: [ -inf, -inf.... , -inf]

                 intensities: [1.0, 1.0, 1.0, ... 1.0]

In Terminal 2, start teleop and drive the ROSbot, observe in Rviz as the map is created:

$ source ~/catkin_ws/devel/setup.sh

$ roslaunch rosbot_navigation rosbot_teleop.launch

NOTE: used this to move the rosbot in gazebo

Help: laserscan data is not visible in rviz and map is flat like the grid.

Thanks
Vineet

Hello Vineet,

Some GPU’s are not supporting correctly gazebo laser scanner plugin.
PLease find line 120 in rosbot.gazebo file and comment section following <!-- RpLidar A2 using GPU --> then uncomment section following <!-- RpLidar A2 using CPU -->.

With this modification, you should be able to see laser scans.

Regards,
Łukasz

Lukasz,

I have uncommented and it works.

Althought the lines are from 186 to 217 for RpLidar A2 using CPU.

Thanks
Vineet