Feeding different SLAM algorithm with the same bag file
Hi I am trying to feed gmapping with bag dataset from cartographer. But terminal shows the gmapping is hoping the data type of "sensormsgs/LaserScan" while the cartographer dataset bag provides the topics of "horizontallaser2d","verticallaser2d" with data type "sensormsgs/Multiecholaserscan".
So, generally, how do people do to fit the dataset type issue If they want to run different SLAM algorithm with the same bag dataset.
Thank you.
-----------solved--------------------
The correct way should be modify the cartographer launch file and lua file to "tell" the cartographer what's kind of sensor and topic we will use. But I managed found out the cartographerturtlebot we have the related launch file and lua file in which the scan topic is "/scan" rather than "horziontallaser_2d".
Asked by sinsinsinsin on 2020-02-20 11:54:28 UTC
Answers
If I understood your question correctly, you could use rosbag API to get access to the bag data and modify it. (https://wiki.ros.org/rosbag/Code%20API)
Hope that helps :)
Asked by Benji on 2020-02-21 10:22:40 UTC
Comments
The difference between an ordinary laser scan and a multi echo laser scan is explained in REP 138. It looks like the laser_proc package has a nodelet that can listen to Multiecholaserscan and can publish LaserScans. Do you know how to run / test that?
Asked by Wilco Bonestroo on 2020-02-21 15:48:08 UTC
@xinxinxin: please mark the question as answered by clicking the checkmark to the left of the answer you feel is the answer.
We don't close questions here on ROS Answers when they are answered.
Asked by gvdhoorn on 2020-02-26 15:20:10 UTC
Hello, @sinsinsinsin can you elaborate further? I have this exact same issue but I have not been able to solve it.
I have my launch file which I use to run gmapping on other bag-files, but it doesn't work for cartographer bags because of this LaserScan VS MultiEchoLaserScan issue. Your solution says that the cartographer launch file and lua file need to be edited. But I need to run gmapping not cartographer and I already have my custom_gmapping.launch file and my custom.lua file.
How do I make it possible to run gmapping on the cartographer bag-file with my launch file?
Asked by TheLastMiniatureTitan on 2023-03-20 07:21:25 UTC