赞
踩
A-LOAM/LOAM/Lego-LOAM/SC_Lego_LOAM实时构建3d点云地图与2d栅格地图(octomap)
可以从 apt 安装或者以功能包的形式安装
#安装octomap
sudo apt-get install ros-melodic-octomap-ros
sudo apt-get install ros-melodic-octomap-server
#安装octomap在rviz中的插件
sudo apt-get install ros-melodic-octomap-rviz-plugins
clone 功能包
git clone https://github.com/OctoMap/octomap_mapping.git
<launch> <node pkg="octomap_server" type="octomap_server_node" name="octomap_server"> <!--resolution in meters per pixel--> <!--栅格分辨率,可调--> <param name="resolution" value="0.1" /> <!--世界坐标系话题--> <!--name of the fixed frame,needs to be "/map" for SLAM--> <param name="frame_id" type="string" value="/camera_init" /> <!--max range/depth resolution of the kinect meters--> <param name="sensor_model/max_range" value="1000.0" /> <param name="latch" value="true" /> <!--max/min height for occupancy map, should be in meters--> <param name="pointcloud_max_z" value="100" /> <param name="pointcloud_min_z" value="-100" /> <param name="graound_filter_angle" value="3.14" /> <!--点云消息名称 PointClout2--> <!--topic from where pointcloud2 messages are subscribed--> <remap from="cloud_in" to="laser_cloud_surround" /> </node> </launch>
// 先启动 octo 为实时降维三位地图做准备
roslaunch octomap_server octomap_server_test.launch
// 再启动 A-loam
roslaunch aloam_velodyne aloam_velodyne_VLP_16.launch
//运行bag
rosbag play xxx.bag
启动rviz后,点击“add”,分别添加"Map"、“OccupancyGrid"与"OccupancyMap”,并把其话题名依次改为"/projected_map"、“octomap_full"与"octomap_binary”。
纯点云
点云地图与栅格地图
八叉树地图与栅格地图
rosrun map_server map_saver map:=/projected_map -f PATH_TO_YOUR_FILE/mymap
实时建图后可以立马保存,无需等待
实时建图极吃内存,博主跑完1.5G的bag后octo节点还在后台运行,啥也没干看着octomap_server内存占用一直在涨,16G的内存十分钟不到就吃满了,直接导致图形界面崩溃。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。