Closed Robotuks closed 6 years ago
Since you're splitting each laser measurement into 10 subdivisions, you should set num_accumulated_range data to 20, since you have two lasers.
Could you please modify cartographer_ros SensorBridge::HandleLaserScan
and replace
for (auto& point : subdivision) {
point[3] -= time_to_subdivision_end;
}
by
for (auto& point : subdivision) {
point[3] = 0;
}
If this fixes it, this may be interesting.
(In the future, please post the output of rosbag_validate as text rather than as an image.) In your bag file, serialization and sensor times do not match. Cartographer just looks at the sensor times, but other subscribers such as rviz may not work.
That fixed the problem, now it works. Thanks for your help.
Could you be a little bit more specific in what fixed the problem? Correctly tuning the ratio of subdivisions and accumulated range data or trying the code modification that gaschler suggested?
@gaschler I have been having the same problem as @Robotuks described. I have two laser scanners (connected by ethernet to the same computer) and if I configure cartographer to use 2 laser scanners I get the following error:
Check failed: time >= imu_tracker->time() (636542891459665714 vs. 636542891459685582)
[FATAL] [1518692345.992819099] [ros.cartographer_ros]: F0215 11:59:05.000000 11344 pose_extrapolator.cc:229] Check failed: time >= imu_tracker->time() (636542891459665714 vs. 636542891459685582)
After changing SensorBridge::HandleLaserScan
like you described it is possible for me to launch cartographer with 2 laser scanners and create a map.
Before running into this issue and your reply, I had been forced to use a laser scanner merging node to merge the two separate laser scans into one and assigning that a new (current ros time) timestamp.
I hope this information can help you track down the problem/bug (if it indeed is a bug).
Thanks for reproducing and confirming. I believe this is a bug.
@kajep09 Sorry for being unclear. Code modification suggested by @gaschler fixed the problem. Ratio of subdivisions and accumulated range data only improved performance of cartographer
Hello!
I am trying to use 2 LiDARs for 2D map, but I get the following error:
rosbag_validate :![kevin_bag_validate](https://user-images.githubusercontent.com/20703813/35961431-5aa4d498-0cb6-11e8-8523-6a6939cdc341.png)
My launch and config files : https://github.com/Robotuks/cartography_kevin Bag file: https://drive.google.com/open?id=1zPD5XZDP4nfwQyessiwYX5HX59vVGwqu
Then I try to run this bag with one LiDAR, everything works fine, doesn't matter which one I choose. Any ideas why it doesn't work? Might it be because data from LiDARs comes not at the same time? (Difference ~50 ms)