3D map の作成方法
Closed this issue · 1 comments
tanacchi commented
Cartographer は諦めました。
準備
- blam を clone
- 一旦
./update
を実行 - このコメント に従い
blam/internal/src/geometry_utils
内のpackage.xml
とCMakeLists.txt
を修正する - 再度
./update
を実行する rosed roslaunch blam_example test_offline.launch
でtest_offline.launch
を以下のように修正する
<launch>
<!-- True for simulation, false for real-time and bagfiles -->
<param name="/use_sim_time" value="false"/>
<group ns="blam">
<!-- SLAM -->
<node pkg="blam_slam"
name="blam_slam"
type="blam_slam_offline"
output="screen">
<!-- Bagfile parameters -->
<param name="filename/bag" value="$(arg bagfile)"/>
<param name="scan_topic" value="/velodyne_points"/>
<param name="time_start" value="0.0"/>
<param name="time_end" value="-1.0"/>
<param name="time_scale" value="-1.0"/>
<!-- Initial pose -->
<rosparam param="init">
position: {x: 0.0, y: 0.0, z: 0.0}
orientation: {roll: 0.0, pitch: 0.0, yaw: 0.0}
position_sigma: {x: 0.1, y: 0.1, z: 0.1}
orientation_sigma: {roll: 0.02, pitch: 0.02, yaw: 0.02}
</rosparam>
<!-- Rates -->
<rosparam file="$(find blam_example)/config/blam_rates.yaml"/>
<!-- Frames -->
<rosparam file="$(find blam_example)/config/blam_frames.yaml"/>
<!-- Point cloud filter -->
<rosparam file="$(find point_cloud_filter)/config/parameters.yaml"/>
<!-- Point cloud odometry -->
<rosparam file="$(find point_cloud_odometry)/config/parameters.yaml"/>
<!-- Loop closure -->
<rosparam file="$(find laser_loop_closure)/config/parameters.yaml"/>
<!-- Localization -->
<rosparam file="$(find point_cloud_localization)/config/parameters.yaml"/>
<!-- Mapper -->
<rosparam file="$(find point_cloud_mapper)/config/parameters.yaml"/>
</node>
</group>
</launch>
使用方法
- 予めターミナルウィンドウは2つ用意しておく
source <path/to/blam/internal/devel/setup.bash>
roslaunch roslaunch blam_example test_offline.launch bagfile:=<path/to/bag_file.bag>
- 別ターミナルで
roslaunch fifth_robot_launcher pointcloud_to_pcd.launch
.ros/3dmap0.pcd
が生成される
tanacchi commented
test_offline.launch
の方はノードの引数に直接 Bag ファイルを指定しているので高速。
もちろんその分、処理が重たいです。のマシンでは処理落ちします。
屋外の地図を作るときは test_online.launch
で、別ターミナルで Bag を再生するほうがいいかもしれません。