Robotics StackExchange | Archived questions

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:

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 slamgmapping scan:=middleVLP32C/velodynepoints

and play .bag there is an error:

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

When i run CARTOGRAPHER_ROS

roslaunch cartographerros myrobot.launch bag_filenames:=MYBAG.bag

there is error

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

my_robot.launch:

<launch>

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

<node name="rviz" pkg="rviz" type="rviz" required="true"
args="-d $(find cartographerros)/configurationfiles/demo3d.rviz"/>
<node name="cartographer
offlinenode" pkg="cartographerros" type="cartographerofflinenode" args="
-configurationdirectory $(find cartographerros)/configurationfiles
-configuration
basename myrobot.lua
-urdf
filename $(find cartographerros)/urdf/backpack3d.urdf
-bagfilenames $(arg bagfilenames)"
output="screen">
<remap from="points21" to="middleVLP32C/velodynepoints"/>
</node>
</launch>

my_robot.lua:

include "mapbuilder.lua" include "trajectorybuilder.lua"

options = {
mapbuilder = MAPBUILDER,
trajectorybuilder = TRAJECTORYBUILDER,
mapframe = "map",
tracking
frame = "baselink",
published
frame = "baselink",
odom
frame = "odom",
provideodomframe = false,
useodometry = false,
use
laserscan = false,
use
multiecholaserscan = false,
num
pointclouds = 1,
lookup
transformtimeoutsec = 0.2,
submappublishperiodsec = 0.3,
pose
publishperiodsec = 5e-3,
trajectorypublishperiodsec = 30e-3,
}
TRAJECTORY
BUILDER3D.scansper_accumulation = 160

MAPBUILDER.usetrajectorybuilder3d = true MAPBUILDER.numbackgroundthreads = 7 SPARSEPOSEGRAPH.optimizationproblem.huberscale = 5e2 SPARSEPOSEGRAPH.optimizeeverynscans = 320 SPARSEPOSEGRAPH.constraintbuilder.samplingratio = 0.03 SPARSEPOSEGRAPH.optimizationproblem.ceressolveroptions.maxnumiterations = 10 SPARSEPOSEGRAPH.constraintbuilder.adaptivevoxelfilter = TRAJECTORYBUILDER3D.highresolutionadaptivevoxelfilter SPARSEPOSEGRAPH.constraintbuilder.minscore = 0.62

return options

Which files should i change and how?

Asked by jegor on 2019-08-07 01:25:35 UTC

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

Asked by jegor on 2019-08-13 03:20:24 UTC

I am trying something similar.

You can start with Velodyne point cloud data .

https://github.com/ningwang1028/lidar_slam_3d

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 .

Asked by chrissunny94 on 2020-01-27 23:27:36 UTC

Answers