cartographer-project / cartographer_ros

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

Cartographer erases solid obstacles too quickly #1698

Open cblesing opened 2 years ago

cblesing commented 2 years ago

Hi all,

we have the problem that Cartographer erases solid obstacles, in our case euro pallets with small load carriers, too quickly. In general, low obstacles < 1.5 m are not solid and dissapear after a short period of time. This happens mainly after a rotation, but also in a weakened form during a linear movement. I have tried to increase the TRAJECTORY_BUILDER_2D.ceres_scan_matcher.translation and rotation weight up to 4e2 but without any effect. I have set POSE_GRAPH.optimize_every_n_nodes to zero to exclude the global part of the algorithm but the problem still exists.

As input sensor sources we use an IMU and a Velodyne VLP16 which gives us a point cloud (16 layer) and a 2D scan. The scan and the pointcloud do not show the same environment all the time, because the scan is taken from a mid level out of the 16 layer from the point cloud. To rule out the possibility that the different sensor measurements lead to this behavior we only used the pointcloud with the IMU as input, but the problem still exists.

Do you have any advice on where the problem may come from, or which parameter is responsible for that?

Our .lua file:

include "map_builder.lua"
include "trajectory_builder.lua"
options = {
  map_builder = MAP_BUILDER,
  trajectory_builder = TRAJECTORY_BUILDER,
  map_frame = "map",
  tracking_frame = "xsens_MTI300_link",
  published_frame = "odom",
  odom_frame = "odom",
  provide_odom_frame = false,
  publish_frame_projected_to_2d = true,
  use_pose_extrapolator = false,
  use_odometry = true,
  use_nav_sat = false,
  use_landmarks = false,
  num_laser_scans = 0,
  num_multi_echo_laser_scans = 0,
  num_subdivisions_per_laser_scan = 1,
  num_point_clouds = 1,
  lookup_transform_timeout_sec = 0.2,
  submap_publish_period_sec = 0.1,
  pose_publish_period_sec = 5e-3,
  trajectory_publish_period_sec = 30e-3,
  rangefinder_sampling_ratio = 1.,
  odometry_sampling_ratio = 1.,
  fixed_frame_pose_sampling_ratio = 1.,
  imu_sampling_ratio = 1.,
  landmarks_sampling_ratio = 1.,
}

MAP_BUILDER.use_trajectory_builder_2d = true
MAP_BUILDER.num_background_threads = 16

-- LOCAL SLAM
TRAJECTORY_BUILDER_2D.min_range = 1.5
TRAJECTORY_BUILDER_2D.max_range = 30.
TRAJECTORY_BUILDER_2D.use_imu_data = true
TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching = false
TRAJECTORY_BUILDER_2D.ceres_scan_matcher.translation_weight = 5. --0.01 --5.
TRAJECTORY_BUILDER_2D.ceres_scan_matcher.rotation_weight = 0.5 --0.5 --5.
-- TRAJECTORY_BUILDER_2D.voxel_filter_size = 0.2
-- TRAJECTORY_BUILDER_2D.max_z = 2.5 
-- TRAJECTORY_BUILDER_2D.min_z = 0.05
TRAJECTORY_BUILDER_2D.num_accumulated_range_data = 1

-- GLOBAL SLAM
POSE_GRAPH.constraint_builder.global_localization_min_score = 0.95
POSE_GRAPH.optimize_every_n_nodes = 0

return options

Here is the map, after passing the pallets once:

image

This is the map after passing the pallets twice:

image

And this are the supmaps published on the submap topic:

image

67617liu commented 10 months ago

Hello, I have a similar problem, do you have any idea how to solve this problem now?