PCL Developers blog

Stephen D. Fox

email:stfox88@gmail.com
project:PCL-URCS: Out-of-core Octree Integration
mentor:Radu B. Rusu & Jacob Schloss (Urban Robotics)

About me

I am from the Fordham University Robotics and Computer Vision Lab, where I’ve worked on various projects related to stereo cameras, mobile robotics, and cluster computing. I run 64-bit debian unstable on my development platform.

My research interests include:

  • Stereo vision
  • 3D perception
  • Image processing
  • Embedded systems

Hobbies

  • Road cycling
  • Running
  • Traveling

Recent status updates

URCS Final Report
Sunday, September 30, 2012
../../_images/urcs.png

Over the weekend, I finished the URCS final report. I would like to thank my mentors, Jacob Schloss at Urban Robotics, Radu, and Julius, who all provided me a lot of patient support and inspiration on this project. Justin Rosen on TRCS has been a great collaborator and deserves a lot of credit for the success of the outofcore integration.

I would like to draw some attention to a few items related to outofcore that I explain in this document in further detail. First of all, even though the URCS is drawing to a close, outofcore is sill very much under development. The API is not 100% set, though significant strides have been made in restructuring the internals for long term stability and integration with PCL. Most importantly, all functionality is available for PointCloud2-based insertion and query methods now! These should be the preferred methods of the interface.

Currently, for the average user, the pipeline will be:

  • Construct an outofcore octree with pcl_outofcore_process from a set of PCD files
  • Use one of the two available outofcore viewers for visualization.
  • When building LOD, remember the number of internal root nodes can grow exponentially the deeper the tree gets. As a consequence, building LOD can take quite a long time if you are inserting tens or hundreds of millions of points into a tree that is very deep.
  • pcl_outofcore_process computes the size of the bounding box of the ENTIRE set of PCD files. That said, if you want to update the tree later, it is your responsibility to make sure the points fall within the original bounding box. If you want to set an arbitrarily large bounding box, the source of pcl_outofcore_process is easy to modify for this case.

For developers, I should emphasize two things to ensure compatibility with future changes that will be introduced into outofcore. If anyone has opinions on this, we would certainly like to entertain some discussion on the pcl-developers@ mailing list.

  • The classes are still templated, but this will change. Because rendering is dynamic, please use the PointCloud2 methods of the outofcore octree. It is admittedly a little confusing because the interfaces are still in a single class with overloaded methods. The easiest way to handle this while it is in a state of flux is via a typedef:
typedef OutofcoreOctreeBase<OutofcoreOctreeDiskContainer<pcl::PointXYZ>, pcl::PointXYZ> OutofcoreBase;

Then, FORGET that it is templated on pcl::PointXYZ; it is not important. You can use whatever Point Type you would like packed into a PointCloud2 data structure. You can easily convert your PointCloud to a PointCloud2 by using toRosMsg.

  • I also emphasize that Outofcore, while an octree, is NOT related to pcl_octree at this time. I have added some methods to make their interfaces somewhat similar, but please beware of a false sense of consistency.

The final report should contain enough information to get started developing with outofcore. I hope it also provides a sense of where the code is coming from and where the library is heading in the context of its future place in the PCL library.

Out of core: Pending API Improvements
Sunday, August 26, 2012
../../_images/urcs.png

Over the past two weeks, I have made some considerable changes to the outofcore API:

  1. Renamed all of the out of core classes to meet the PCL class naming convention
    1. octree_base to OutofcoreOctreeBase
    2. octree_base_node to OutofcoreOctreeBaseNode
    3. octree_disk_container to OutofcoreOctreeDiskContainer
    4. octree_ram_container to OutofcoreOctreeRamContainer
  2. Renamed some public and private methods in OutofcoreOctreeBase, as well as pulled unused code, renamed protected methods, etc...
    1. printBB->printBoundingBox
    2. insertsectsWithBB->insertsectsWithBoundingBox
    3. pointWithinBB->pointInBoundingBox
    4. getBB->getBoundingBox
    5. withinBB->inBoundingBox
  3. Moved all Boost dependencies into a separate outofcore boost header
  4. Encapsulated the metadata of the OutofcoreOctreeBaseNode class into a separate class handling the JSON I/O. This should allow flexibility with metadata format (and the possibility of seamlessly switching to XML/YAML, etc...). This functionality lives in a separate class called OutofcoreOctreeNodeMetadata.

A few changes I am currently working on are:

  1. Implementing depth first and breadth first iterators, similar to the implementation in pcl_octree by Julius
  2. Improving the readability of the doxygen documentation
  3. Parameterizing of the LOD building algorithm (customization via pcl::Filter input)
New outofcore refactoring, cleaning of API
Saturday, August 04, 2012
../../_images/urcs.png

I have been working on cleaning up the outofcore library for its initial release. I still need to finish updating the documentation, add the examples to the doxygen mainpage (which is currently blank), and write a tutorial on how to use the out of core libraries. There is still quite a bit of unused code to pull, and a lot of refactoring to get the code fully to PCL’s style standards. I am still debating whether it makes sense to remove the templating. I committed some refactoring this afternoon, and will continue to do so concurrently while I am preparing the code for final testing. I have also started writing a final report to wrap up the code sprint. There has been some growing interest in outofcore features in PCL on the mailing lists lately, so I hope to have the code base fully useable soon.

Outofcore Octree Updates and Changes for PointCloud2
Monday, July 16, 2012
../../_images/urcs.png

I have been a bit quiet on my blog, but have finally checked in a lot of improvements to the OOC libraries, smoothing out construction of the trees with PointCloud2 data types. This allows us to compile OOC code without having to know the point type in the PCD file. I have finally finished implementing the PointCloud2 interface. I have not added some auxiliary functionality yet such as buildLOD (after insertion of data to leaves), but LOD can be built automatically on insertion using addPointCloud_and_genLOD.

OOC has also been enabled to build in trunk by default as it is approaching more stability. Justin is working on having the out of core visualization engine running on VTK while I am supporting lingering performance issues with OOC construction and query, and doing some final refactoring of the code and library. With the integration of PointCloud2, point clouds can be created with any XYZ-based data type by first using toROSMsg, then inserting the PointCloud2 to the OOC octree. Once Justin and I have a working out-of-core visualization pipeline (he’s handling the heavy lifting with rendering), there is still much more we can do to add to the capabilities of the library.

Outofcore Updates
Sunday, June 17, 2012
../../_images/urcs.png

I am still straightening out some I/O and insertion features with PointCloud2 and the lzf compression. I am hoping to have that part completely functional this week so Justin can finish integrating the API changes with his visualizer. I have not started changing the structure of the classes to reduce the amount of templating–I will hold off on that until we have the outofcore system up and running. Stay tuned for updates.