HU-Robotics-2 / ScannerBot

0 stars 0 forks source link

5.9: Get SLAM to work correctly. #73

Open AyomideCode opened 3 months ago

AyomideCode commented 3 months ago

I'm trying to get SLAM working on our Turtlebot, to no success. I tried the official video guide with no luck, with Rviz saying "Frame [map] does not exist"

I'm troubleshooting at home and I'm suspecting that the problem with SLAM not working is similar to the one found on this thread: https://github.com/turtlebot/turtlebot4/issues/372#issuecomment-2015376890 I will echo /odom on my laptop/raspi and see if I have a response

Furthermore, this video: https://youtu.be/YMG6DWEqv5g I will attempt to follow the video's DNS instructions for the create3, as that's where the /odom data is coming from.

Other threads I thought might have our solution:

https://github.com/turtlebot/turtlebot4/issues?q=is%3Aissue+map https://github.com/turtlebot/turtlebot4/issues/218 https://github.com/turtlebot/turtlebot4/issues/99!! https://github.com/turtlebot/turtlebot4/issues/300 https://robotics.stackexchange.com/questions/39454/turtlebot-rviz-frame-map-does-not-exist-error https://answers.ros.org/question/263715/fixed-frame-map-does-not-exist/

Extra (will be useful for autonomous docking/undocking): https://iroboteducation.github.io/create3_docs/api/docking/#undocking

AyomideCode commented 3 months ago

https://github.com/turtlebot/turtlebot4/issues/378#issuecomment-1998290451 Me & Darius are trying to follow these instructions today, in hopes this will fix things.

EDIT:

did not work.

did not work.

AyomideCode commented 3 months ago

For anyone having similar issues who have more time than us to get SLAM working on an offline Discovery Server, Here are general suggestions I received from an experienced user:

Approach 1

The possible time sync issue could be caused by the fact that the Quality of Service of the Lidar message is not accurate. To fix this, you must first identify the Quality of service that you should be using/modifying. You should go here https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Quality-of-Service-Settings.html to get a better understanding of the quality of service inside of ros2.

Once you have a better understanding of the Quality of service and of the way that the Lidar information is being processed in RVIZ, changing the Quality of service to a different value should fix your problem. It is important to note here, quality of service is a blanket term, you will need to identify the specific quality of service that needs to be modified, hence why the first step is to read up on the tutorials.

Approach 2:

To solve the syncing problem, you may needs to manually change the time stamp of the message that is coming in.

To do this you will need to first need to understand message construction. A message is made up of various types of information. The frame is meant to be the coordinate frame in which the information is based. The frame is stored inside a member of a message called Famre_ID. The Frame_ID is stored inside of the member Header. The frame you are concerned with is rplidar_link, so you will need to identify which message has a frame id rplidar_link. To do this you will need to look through the topics and identify which topic has a published message with that header. From there you will need to track down the file that created that publisher. In the generation of the publisher there should be a place where the time stamp is added, as the time step is also a part of the Header Member. Here you will need to modify the time step to be the same as the rest of the responses from the slam toolbox.

Otherwise, I highly suggest reading these threads if you're like us who have a working connection with our Turtlebot/Create3, but have a timesync issue: 1 2 3