cartographer-project / cartographer_ros

Provides ROS integration for Cartographer.
Apache License 2.0
1.67k stars 1.21k forks source link

Sparse laser scanner and cartographer #256

Closed makbut closed 7 years ago

makbut commented 7 years ago

Hello! I am running some simulations in V-Rep and I want to create the map of an environment using cartographer. In V-Rep there is a robot which publishes laser scanner data, imu data and odometer data to the appropriate ROS topics. The problem is with the laser scanner. When I configure it being sparse and having a resolution of 1 point per degree cartographer crashes, whereas when I configure it having a resolution of 1 points per 0.25 degree, it works!

My launchfile is:


<!--
  Copyright 2016 The Cartographer Authors

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<launch>
  <param name="/use_sim_time" value="true" />

  <node name="cartographer_node" pkg="cartographer_ros"
      type="cartographer_node" args="
          -configuration_directory $(find cartographer_ros)/configuration_files
          -configuration_basename carnode.lua"
      output="screen">
  </node>
</launch>

My configuration file is (currently I am not using the IMU):

-- Copyright 2016 The Cartographer Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
--      http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.

include "map_builder.lua"

options = {
  map_builder = MAP_BUILDER,
  map_frame = "map",
  tracking_frame = "base_link",
  published_frame = "base_link",
  odom_frame = "odom",
  provide_odom_frame = true,
  use_odometry = true,
  use_laser_scan = true,
  use_multi_echo_laser_scan = false,
  num_point_clouds = 0,
  lookup_transform_timeout_sec = 0.2,
  submap_publish_period_sec = 0.3,
  pose_publish_period_sec = 5e-3,
}

MAP_BUILDER.use_trajectory_builder_2d = true
TRAJECTORY_BUILDER_2D.use_imu_data = false
return options

My working and not working bag files are:

http://www.filedropper.com/sparse1degree http://www.filedropper.com/dense025degrees

SirVer commented 7 years ago

This fell through the cracks and the bag files are no longer available. Sorry for this :(.

If this is still an issue, please open a new issue and reattach the data.

ZRazer commented 6 years ago

Hi, have you ever mad any progress with this issue? I'm working with V-REP and cartographer, but still stuck in the same point.

cschuet commented 6 years ago

Can you post a stack trace of the crash?