Open Li357 opened 2 years ago
Hi,
This code:
if (stats.getLastSignatureData().sensorData().gridCellSize() > 0.0f) {
will be always false in iOS App because we don't create occupancy grids by default. You would have to enable local occupancy grids generation somewhere here:
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kRGBDCreateOccupancyGrid(), std::string("true")));
You would have to update also the Grid parameters to create something like below (see parameters on left I used on this scan):
cheers, Mathieu
I'm trying to generate an occupancy map using the iOS example on the iPad with LIDAR. I'm not sure what I am doing wrong but I am getting these weird lines and lots of empty space:
This is the 3D scan I'm generating the grid from (I guess there's a slight resemblance?):
I eventually want an output similar to what is found here where an occupancy map is created in a pgm format. Following
tools/Reprocess
which seems to generate a pgm given a database, https://github.com/introlab/rtabmap/blob/master/tools/Reprocess/main.cpp#L688-L731, I wrote injni/RTABMapApp.cpp
:where
grid_
is anrtabmap::OccupancyGrid
with default parameters. Then I call this method inhandleEvent
:Then when saving the map I have this code to print the map:
But I am something similar to the image above. I also tried looping through poses after saving the database and generating the grid that way with the same image result. Is there something extra (parameter-wise) I need to generate a full map when using LIDAR/RGBD data? How would I correctly generate a 2D occupancy grid in the iPad example?