Skip to content

Creating an OctoMap and a 2D Occupancy Grid from RGBD in C++ #934

Answered by matlabbe
camasmie asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, those classes/functions could work. Follow those options in rtabmap-reprocess:

" -o2 Assemble OctoMap 2D projection and save it to \"[output]_octomap.pgm\". Use with -db to save in database.\n"
" -o3 Assemble OctoMap 3D cloud and save it to \"[output]_octomap.pcd\".\n"

This will give you an example how to generate a 3D OctoMap in C++.

OctoMap octomap;

// in the main loop after adding a new node (after `rtabmap.process()`):
const rtabmap::Statistics & stats = rtabmap.getStatistics();
const cv::Point3f & viewpoint = stats.getLastSignatureData().sensorData().gridViewPoint();
cv::Mat ground, obstacles, emp…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by camasmie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants