Trying to use Cartographer to make maps from rosbags

634 views
Skip to first unread message

Sean Sanchez

unread,
Aug 24, 2017, 6:53:00 PM8/24/17
to google-cartographer
Hi all,

I'm trying to get a ROS-compatible SLAM mapping algorithm to work. I've had a lot of trouble with gmapping, and I'm still having trouble with Cartographer. I've installed it according to the docs and run the demos, but I'd like to make some edits, perhaps to use the offline_backpack_2d.launch file to make maps of rosbags containing nav_msgs/Odometry and sensor_msgs/LaserScan, so to create maps from a single laser scanner and odometry, instead of from the IMU and from a multi-echo scanner as in the demo.

Any and all help in making modifications would be appreciated!

The file I'm trying to get to map, Mapping1.bag, is attached.

Thanks in advance!
-Sean
Mapping1.bag

Brannon King

unread,
Aug 29, 2017, 11:53:25 AM8/29/17
to google-cartographer
Did you get your bag to run? Starting with a previous launch file seems like a fine plan. You probably have to add/remove some topic rename calls to it. You will need to change the lua file as well to not produce odometry but accept it, and to accept 1 laser scan and 0 echo scans. In addition to the Cartographer documentation, you probably need to read some ROS1 documentation on bag playback. Your question was a little too general for people to be able to help. Maybe now you have some specific question?

Sean Sanchez

unread,
Aug 30, 2017, 12:03:34 PM8/30/17
to google-cartographer
Hi Brannon et al.,

No, I haven't gotten it to work, and I see that my question was pretty vague though. Sorry about that. I put example .launch, .lua, .rviz and .urdf files I've modified here, along with the bag I'm still trying to run, Mapping1.bag file instead of the ones available on the Cartographer readthedocs pages.

As I said before the bag file has nav_msgs/Odometry and sensor_msgs/LaserScan messages, so I've made the changes to the above files that I think are appropriate, but no matter how I toggle the true/false settings or mess with link/remap names, the cartographer on-/off-line nodes just don't seem to behave the way I expect. The main issues I see are through rviz telling me that the [map] frame doesn't exist or that transforms between my links and the map frame don't exist. From the terminal an error I see often is "[ WARN] [1504108344.508388488]: W0830 11:52:24.000000  6466 tf_bridge.cc:51] Invalid argument passed to canTransform argument source_frame in tf2 frame_ids cannot be empty". Further, when I run "rostopic echo /tf" I get a "WARNING: no messages received and simulated time is active. Is /clock being publish?"

It seems like I've got issues in defining the links between my various frames, so I've tried adding static_transform_publishers, but the issues persist. What confuses me is where in the Cartographer demo examples these same links are made explicit. 

Any advice on how to troubleshoot these specific problems? Thanks!

Holger Rapp

unread,
Oct 4, 2017, 6:05:58 AM10/4/17
to google-cartographer
Sean, are you still having issues? If so, I can try looking into your setup.
Reply all
Reply to author
Forward
0 new messages