sikang / motion_primitive_library

Search-based motion planning for differential flat systems
Apache License 2.0
237 stars 70 forks source link

using mpl with octomap #2

Open bumblebee96 opened 5 years ago

bumblebee96 commented 5 years ago

I used the octomap library to create a map of the airspace that i want to fly in, octomap saves this map in an octree data structure, and I can use binvox to convert to different voxel file types. My question is what encoding does your MapUtil function require (.vtk, .raw, .MIRA...)? I saw in the example you have a .yaml file with a - data: parameter, how is this occupancy grid created?

gazebo_test_map

sikang commented 5 years ago

The MapUtil uses a single 1D array (Tmap type) to store the occupancy data, the example yaml file just stores the array itself, it will be tricky for Octomap... You can either change the MapUtil to use Octomap directly or output a uniform grid from Octomap. Alternatively, if you have the raw data like 'STL' or 'DAE' of the model, you can convert it into VoxelMap directly using this script: https://github.com/sikang/mpl_ros/blob/master/mpl_test_node/launch/map_generator/mesh_to_map.launch

mrhebert commented 5 years ago

I am actually interested in getting Octomap functionality working as well. Our team has an octomap server that is being populated from multiple different sources. Do you think it would be a massive undertaking to interface with either the server directly or a copy of the octomap or simply create a new MapUtil that interfaces with it. I am working through the code now but it is hard to tell where the cleanest place to interface with the new map would be. Thanks!

sikang commented 5 years ago

The easiest way is to change the MapUtil, but I can imagine there will be issues to deal with the API. You can try it, let me if there is problem and I'll also take a look at some time to make it work with Octomap.

mrhebert commented 5 years ago

Sounds good! I will give it a try in the next week or two and let you know what I find. Thank you!