Create a map with VLP-32 lidar in ROS Kinetic
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 = 160MAP_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?
types:
topics:
I am trying something similar.
You can start with Velodyne point cloud data .
https://github.com/ningwang1028/lidar...
Compile the above 3d SLAM implementation and run it .
Play the bag file you have .
Open up RVIZ and you should see a 3D map getting build up .
You will have realtime update on /pose .
This data can be fed into move_base package to make the vehicle move .