ntnu-arl / mbplanner_ros

Motion-primitives Based Planner for Fast & Agile Exploration
BSD 3-Clause "New" or "Revised" License
318 stars 84 forks source link

How to run with custom data? #3

Closed Dung-Han-Lee closed 3 years ago

Dung-Han-Lee commented 4 years ago

Hello there, Thank you for sharing this amazing work! I'd like to modify this work and have it run on LIDAR pointclouds and odometry data generated from LOAM module. I intend to use TSDF mode, so I looked up the tsdf_server.h file, and found both pointcloud_sub and freespace_pointcloud_sub. Could you kindly advise me what to do next?

Thank you,

MihirDharmadhikari commented 3 years ago

Thank you very much for showing interest in our work!

The pointcloud_sub is the subscriber that takes the pointcloud from the lidar and adds it to the map. The freespace_sub is used for adding a hypothetical pointcloud into the map which only adds the free voxels and not the occupied voxels into the map. This is useful when you have a depth sensor with a small range which will return no pointcloud when it is in a big area. So you can add a hypothetical pointcloud at the max range of this camera which will only add free voxels in the camera frustum but will not add occupied voxels at the pointcloud. In your case, you will need to use the pointcloud_sub so you don't need to worry about the freespace_sub.

The mbplanner_ws has packages_https.rosinstall and packages_ssh.rosinstall either of which you can use to clone all the necessary packages. Following the instructions in the README of mbplanner_ws should clone all the necessary packages. The current implementation of mbplanner uses lidar data for mapping so it can directly work with your lidar. For the odometry, you will have to change the "ododmetry_topic" param in the mbplanner_m100_sim.launch file to the topic published by LOAM and it should work.

I hope this clarifies your doubts. Do let me know if you would like to know anything more!