Create a map with VLP-32 lidar in ROS Kinetic

asked 2019-08-07 01:35:43 -0500

jegor gravatar image

Hello.

I'm new in ROS, so my question can looks silly

I have a .bag file with topics:

  • atlans_odom stereo/left/image_raw
  • rightVLP16/velodyne_points atlans_imu
  • stereo_map/left/image_raw
  • parsed_tx/scan_data_2205
  • middleVLP32C/velodyne_points
  • stereo_map/right/image_raw
  • as_tx/point_cloud atlans_geopose
  • stereo/right/image_raw
  • leftVLP16/velodyne_points
  • parsed_tx/object_data_2280 tf_static

How can i create a map with theese data?

I tried some methods. It's not very important now which kind of algorithm will be implemented, When i run GMAPPING (as described http://wiki.ros.org/slam_gmapping/Tutorials/MappingFromLoggedData

rosrun gmapping slam_gmapping scan:=middleVLP32C/velodyne_points

and play .bag there is an error:

[ERROR] [1565158821.576277158, 1548938315.050470087]: Client [/slam_gmapping] wants topic /middleVLP32C/velodyne_points to have datatype/md5sum [sensor_msgs/LaserScan/90c7ef2dc6895d81024acba2ac42f369], but our version has [sensor_msgs/PointCloud2/1158d486dd51d683ce2f1be655c3c181]. Dropping connection.

When i run CARTOGRAPHER_ROS

roslaunch cartographer_ros my_robot.launch bag_filenames:=MYBAG.bag

there is error

[FATAL] [1565157064.135475488]: F0807 08:51:04.000000 5804 map_builder_bridge.cc:78] Check failed: all_trajectory_nodes.size() == 1 (0 vs. 1)

my_robot.launch:

<launch>

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

<node name="rviz" pkg="rviz" type="rviz" required="true"
args="-d $(find cartographer_ros)/configuration_files/demo_3d.rviz"/>
<node name="cartographer_offline_node" pkg="cartographer_ros" type="cartographer_offline_node" args="
-configuration_directory $(find cartographer_ros)/configuration_files
-configuration_basename my_robot.lua
-urdf_filename $(find cartographer_ros)/urdf/backpack_3d.urdf
-bag_filenames $(arg bag_filenames)"
output="screen">
<remap from="points2_1" to="middleVLP32C/velodyne_points"/>
</node>
</launch>

my_robot.lua:

include "map_builder.lua" include "trajectory_builder.lua"

options = {
map_builder = MAP_BUILDER,
trajectory_builder = TRAJECTORY_BUILDER,
map_frame = "map",
tracking_frame = "base_link",
published_frame = "base_link",
odom_frame = "odom",
provide_odom_frame = false,
use_odometry = false,
use_laser_scan = false,
use_multi_echo_laser_scan = false,
num_point_clouds = 1,
lookup_transform_timeout_sec = 0.2,
submap_publish_period_sec = 0.3,
pose_publish_period_sec = 5e-3,
trajectory_publish_period_sec = 30e-3,
}
TRAJECTORY_BUILDER_3D.scans_per_accumulation = 160

MAP_BUILDER.use_trajectory_builder_3d = true MAP_BUILDER.num_background_threads = 7 SPARSE_POSE_GRAPH.optimization_problem.huber_scale = 5e2 SPARSE_POSE_GRAPH.optimize_every_n_scans = 320 SPARSE_POSE_GRAPH.constraint_builder.sampling_ratio = 0.03 SPARSE_POSE_GRAPH.optimization_problem.ceres_solver_options.max_num_iterations = 10 SPARSE_POSE_GRAPH.constraint_builder.adaptive_voxel_filter = TRAJECTORY_BUILDER_3D.high_resolution_adaptive_voxel_filter SPARSE_POSE_GRAPH.constraint_builder.min_score = 0.62

return options

Which files should i change and how?

edit retag flag offensive close merge delete

Comments

types:

  • geographic_msgs/GeoPoseStamped [cc409c8ed6064d8a846fa207bf3fba6b]
  • ibeo_msgs/ObjectData2280 [1feafc06b87a8faddd462af2854382a1]
  • ibeo_msgs/ScanData2205 [dd96693e46c44a2b405ce82587e7e698]
  • nav_msgs/Odometry [cd5e73d190d741a2f92e81eda573aca7]
  • sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743]
  • sensor_msgs/Imu [6a62c6daae103f4ff57a132d6f95cec2]
  • sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
  • tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec]

topics:

  • as_tx/point_cloud 2909 msgs : sensor_msgs/PointCloud2
  • atlans_geopose 11636 msgs : geographic_msgs/GeoPoseStamped
  • atlans_imu 11636 msgs : sensor_msgs/Imu
  • atlans_odom**ty
jegor gravatar imagejegor ( 2019-08-13 03:20:24 -0500 )edit