Skip to content

Point Cloud Library (PCL) Modified for Raspberry Pi 2 + Xtion camera (depth-only)

License

Notifications You must be signed in to change notification settings

chatchavan/pcl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pcl

The Point Cloud Library (PCL) is a standalone, large scale, open project for 2D/3D image and point cloud processing.

PCL is released under the terms of the BSD license, and thus free for commercial and research use. We are financially supported by a consortium of commercial companies, with our own non-profit organization, Open Perception. We would also like to thank individual donors and contributors that have been helping the project.

PCL on Raspberry Pi (Depth-only)

Rationale: To operate Asus Xtion Pro with Raspberry Pi without taxing CPU too much. We decided to use depth without RGB.

Installation instruction for Raspberry Pi

  1. Install OpenNI. See this instruction
  2. Install PCL dependencies. The easiest way to do this is to install libpcl from jessie (which wasn't compiled with OpenNI support). See this instruction.
  3. Clone this repository to a folder, let's say ~/pcl
  4. Configure:
cd ~/pcl && mkdir build && cd build
ccmake .. 

In this step, ensure that you enabled OpenNI support and that the path of OpenNI library is correct. (For the latter, you need to turn on the advance mode. (Press "t") See my configuration for reference. (I also turned many components that I don't need off.) 5. make and sudo make install.

Changes in CMakeLists.txt of your project

Our installation of OpenNI wasn't registered with pkg-config. Thus, we have to point each project to OpenNI manually. Manually adding OpenNI in CMakeLists.txt of your project. Add the following text just below the line starting with set(PCL_BUILD_TYPE

set(OPENNI_INCLUDE_DIRS_HINT "/usr/include/ni")
set(OPENNI_LIBRARY_DIRS "/usr/lib/") 
set(OPENNI_LIBRARY "/usr/lib/libOpenNI.so")

Difference from the example

If you use the example from PCL website, you have both depth and RGB. We'll get only depth. So, we change the binding function to use only XYZ, i.e., replace everything with XYZRGBA to XYZ like the following:

boost::function<void (const PointCloud<PointXYZ>::ConstPtr&)> f =
			boost::bind(&grabberCallback, _1);

NOTE: May be the example in PCL source code is a better starting point (pcl/io/tools/openni_grabber_depth_example.cpp). I haven't tested it though.

Other troubleshooting

  • Device not found:* edit sudo nano /usr/etc/primesense/GlobalDefaults.ini and uncommented ;UsbInterface=2 (removing semi colon)

About

Point Cloud Library (PCL) Modified for Raspberry Pi 2 + Xtion camera (depth-only)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 96.6%
  • CMake 2.2%
  • Other 1.2%