Robotics StackExchange | Archived questions

How can I get 3D pointcloud map

I'm working with google cartographer 3d and I'm using a tof-camera. I want to get a 3d pointcloud like in the title discribed. I already asked this multiple times on the issues page of google cartographer but did not get an answere. So I want to try it here: According to the tutorial (https://google-cartographer-ros.readthedocs.io/en/latest/assets_writer.html), I called roslaunch cartographer_ros assets_writer.launch bag_filenames:=... pose_graph_filename:=... If I run this command I get the error:

 terminate called after throwing an instance of 'tf2:ExtrapolationException'
what(): lookup would require extrapolation into the past. Requested time ... but the earliest data is at time ..., when looking up transform from frame [map] to frame [imu]

So my questions: 1. Why do I get this error? 2. How can I solve this?

I can already do the mapping there is no problem with tf or imu. My assumption is that there is something wrong with my bagfile. Maybe I'm running the bagfile wrong. https://github.com/googlecartographer/cartographer_ros/issues/1180 Here you can find my .lua file my bagfile and other stuff I need. I record the bagfile with this command: $ rosbag record -a Maybe this is wrong. And this is what I'm doing:

1. record the bagfile
2. stop recording
3. launch the bagfile
4. then finishing trajectory
5. writing state
6. stop bag file
7. launch assets_writer with the bag file and pbstream

Then I get the error.

Thanks in advance

Asked by S.Yildiz on 2019-02-12 02:24:28 UTC

Comments

Answers

Before step 3, do

rosparam set /use_sim_time true

Then play the bag with

rosbag play <bag file> --clock

Asked by janindu on 2019-02-17 19:31:59 UTC

Comments