cartographer-project / cartographer_ros

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

Loop Closure Not Triggered and Map Overlaps on Rotation #1181

Open BhavyanshM opened 5 years ago

BhavyanshM commented 5 years ago
  1. ROSBag Validate: https://gist.github.com/BhavyanshM/8220c54c4cbaf5a3bcf1d91adaddcf8c
  2. CartographerROS Branch with Configurations: https://github.com/BhavyanshM/CartographerROS
  3. Google Drive ROSBag Link: https://drive.google.com/file/d/1NeTsIZMo424BqBo_f4NjUhalic776mA0/view?usp=sharing
  4. Hardware and Software Configuration: Raspberry Pi 3B+, Navio2, RPLidar A1M8, ArduCopter 3.5.7, MAVROS 0.28.0

Hi,

First of all thank you so much for maintaining such an amazing SLAM package. This is my first attempt at using cartographer_ros with RPLidar A1M8. This setup is supposed to run on a Raspberry Pi 3B+ on-board a quadcopter with Navio2 running MAVROS and ArduCopter. I would be highly grateful if someone could help me debug this issue of map overlaps and inability to perform loop closure. I am entirely willing and able to provide any additional information needed to resolve this issue. Thank you again.

Bhavyansh

PS: Attaching below a visual of the final map generated at the end of the ROSBag

cartographer_4

eithwa commented 3 years ago

I used your parameters to execute the program, and the result was not the same as yours. I think it might have something to do with computer performance. image

I added these parameters, and the results are as follows. I think if imu is used, it can be helpful to build a map.

TRAJECTORY_BUILDER_2D.motion_filter.max_angle_radians = math.rad(0.1)
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.translation_delta_cost_weight = 1 
TRAJECTORY_BUILDER_2D.real_time_correlative_scan_matcher.rotation_delta_cost_weight = 1e-1
POSE_GRAPH.constraint_builder.sampling_ratio = 0.03
POSE_GRAPH.optimization_problem.odometry_translation_weight = 0.1
POSE_GRAPH.optimization_problem.odometry_rotation_weight = 0.3

image