Why is slam_gmapping not updating?

asked 2021-08-07 14:55:36 -0500

MechyMan24 gravatar image

updated 2022-02-20 18:56:41 -0500

lucasw gravatar image

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic

Hi I’m a mechanical engineer and I’m dipping my toe in the water with ROS. I am running ROS Melodic on Ubuntu 18.04 and I am attempting to copy a youtuber as seen in the video below. I have also included the link to the github repository used.

https://www.youtube.com/watch?v=xB9tf... https://github.com/XRobots/Navigation...

I am using an Intel Realsense T265 camera and an RPLIDAR-A1. The package I am using is slam_gmapping.

I can’t get the gmapping to update past the first scan. The actual scan is correct and no errors have appeared in Rviz but it doesn't update. I have moved the sensor physically to see if that makes a difference but to no avail.

I have looked at similar questions and incorporated their answers such as changing the tf tree, altering the linear,angular and temporal update parameters in the launch but it doesn’t update the map.

I have altered the tfs slightly hence a different tree than you would get from github.

My plan was to show images but apparently you need 5 karma points so I will describe it as best I can.

Map → Odom → base_link → camera link → various camera bits and pieces

Coming off of base_link you have three SEPARATE branches one for laser, one for camera_pose_frame and one for the camera_link as described above.

All the camera stuff is generated by the t265, I think what matters is the order more than the gyros.

       (NODES ONLY RQT GRAPH)

To describe the rqt_graph there are several static_transform_publishers with /tf topics going to slam_gmapping and the rplidar is sending out /scan to slam_gmapping. The camera is sending out /tf_static to the slam_gmapping. From what I’ve managed to pull up in Rviz I would assume that the topics are correct.

(NODES/TOPICS (ALL) RQT GRAPH)

/static_transform_publishers not connected to anythig /rplidarnode → /scan → /slam_gmapping → /map

The camera has several different sections within it connected up but nothing connects outside of it to the chain above or to the map directly. Surely it must do though at a different level otherwise I wouldn’t be able to generate a map to begin with would I?

In the Rviz GUI everything is connected and no errors come up, the gmapping is overlayed by the laser scanner and everything looks to be in order but the map doesn’t update. For example if I turn the laserscanner by 90 degrees the laser will move but the gmapping will stay as it is.

If any of you know where I've gone wrong (particularly TF tree and topics) please point it out, or if you have any suggestions fire away.

Cheers and cheerio,

MM

edit retag flag offensive close merge delete