cartographer-project / cartographer_ros

Provides ROS integration for Cartographer.
Apache License 2.0
1.65k stars 1.2k forks source link

Cartographer crashes with Kinect #1366

Closed Louis-DR closed 5 years ago

Louis-DR commented 5 years ago

Hello everyone !

I have been using ROS and Cartographer for my current robotics internship, therefore I'm quite new. The lab I work at uses turtlebots with LiDars and I was tasked to make that work with Cartographer 2D, that worked. However they now ask me to do the same with cartographer 3D with a Kinect sensor. I use freenect and record every topics from the robot because I don't really know which ones are usefull. I tried modifying a lua file to use pointclould data, Odometry and TRAJECTORY_BUILDER_3D copying an other github issue about kinect. However Cartographer crashes everytime. https://github.com/Ixous/LS2N_Kinect/blob/master/turtlebot_slam_kinect

I tried looking at the logs it said it created but they don't actually exist..

I tried rosbag_validate and it shows errors about IMU data I don't use, gaps in the data that sould not crash cartographer and "Sensor with frame_id "gyro_link" jumps backwards in time.". I don't really know what to do about it as I haven't modified the data sent by the sensor. https://github.com/Ixous/LS2N_Kinect/blob/master/rosbag_validate

Cartographer is supposed to work with a pointcloud2 message nammed points2. The Kinect actually gives two pointcloud2 messages : /camera/depth/points and /camera/depth_registered/points but I don't know which one is used. I have tried to put a remap tag in the launch file but I don't think there is any documentation explaining where to put it. It didn't solve the issue. I don't could find really which topics were usefull because the recording are something like 100Mo/s ?

Is there a guide or indications I couldn't find about this setup ? Because even with the other github issues, I'm lost...

Here is the git of my ros folder https://github.com/Ixous/LS2N_Kinect

And the bag file https://drive.google.com/file/d/1eU5-BG5iWVm2DJhTvv-QUzcg6mcrcdkh/view?usp=sharing

Thank you very much !

Louis-DR commented 5 years ago

Welp I ended up using RTAB-map and it creates the maps I needed. I'll use cartographer with 2D LiDar and RTAB-map for 3D from now on