Skip to content

HuaYuXiao/EasonDrone_Mapping

Repository files navigation

EasonDrone_Mapping

A ROS package for mapping with LiDAR and D435i.

HitCount Static Badge Static Badge Static Badge Static Badge

RealSense T265 is a tracking camera that is designed to be more optimal for Visual Odometry and SLAM (wider field of view and not using infrared light). It can do SLAM onboard as well as loop closure. However, this camera is not able to return RGB images (since it does not have a RGB camera onboard) and the depth returned is not as good as the D400 series (and can be a little trickier to get).

Using both a RealSense D435i sensor and a RealSense T265 sensor can provide both the maps and the better quality visual odometry for developing a full SLAM system. The D435i used for the mapping, and the T265 for the tracking.

Compilation

catkin_make install --source Reconstruction/EasonDrone_Mapping --build Reconstruction/EasonDrone_Mapping/build

octomap

建立地图

In real world,

roslaunch easondrone_mapping experiment.launch

In simulator,

roslaunch easondrone_mapping simulation.launch

保存地图

You are trying to invoke octomap_saver as an argument to the octomap_server node. However, octomap_saver is a node of its own, so you only have to start it from a separate terminal while octomap_server is running. Check the documentation at http://wiki.ros.org/octomap_server#octomap_saver

控制无人机完成建图后,用以下指令保存.bt(相较于.ot体积更小)格式的地图文件,默认保存到~/下,

rosrun octomap_server octomap_saver -f map.bt

image

参考:

查看地图

方法1:rviz

一种方法是在rviz中查看,

rosrun rviz rviz
rosrun octomap_server octomap_server_node map.bt

添加OccupancyGrid,话题选择/octomap_binary

image

参考:

方法2:octovis

也可以借助octovis工具查看,

octovis map.bt

加载地图

参考:

Cartographer

Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.

开始建图

roslaunch cartographer_ros ~/cartographer_ws/src/cartographer_ros/cartographer_ros/launch/demo_backpack_3d.launch

结束建图

rosservice call /finish_trajectory 0
rosservice call /write_state "{filename: '~/map.pbstream'}"

image

参考:

Release Note

  • v2.1.2: import message_filters::sync_policies::ApproximateTime for merge
  • v2.1.1: publish pose
  • v2.1.0: merge PointCloud2 from several sources, with frame_id = "base_link"

Acknowledgement

Thanks to following packages: