Category Archives: 3d scan

Getting XTion / Kinect to run on Pi 3, pt 2

So after yesterday’s compile of the PointCloudLibrary that worked although I couldn’t install some of the files before, I compiled today OpenNI although I was not able to install g++-multilib (following Larry’s tutorial).

Well, the error codes seemed to talk more about errors generating documentation, but I don’t care too much about that since google / stackexchange et al are the best documentation…

Also, the installation worked (within seconds).

Nextup was the installation of the Kinect driver / software package. Then it hailed errors. So, it seems that the g++-multilib is necessary for the SensorKinect package to compile. This will be an adventure to get somehow since it doesn’t seem to be available in Raspbian.

Interestingly, I found in an older tutorial from 2013 the necessity to install g++, not g++-multilib. However, trying to install this just led to the message that I had the latest version already.

In another old blog article, I found another version of this tutorial with an error similar to the one I got when calling make in the Build directory. And luckily, there was a reply by another visitor from May this year that there’s two files to change slightly to be able to compile it.

I don’t quite understand what exactly has been changed there, but I’ll try out tomorrow to see whether this will work.

So to sum up:

  • swap file extended
  • compiled PCL
  • compiled OpenNI
  • tosucceed: compile SensorKinect

 

Using the XTion / Kinect on Raspberry Pi 3 pt. 1

Recently, I managed to use the Oculus Rift as a display for the Pi 3 together with listening to the gyros via OpenHMD. And I found another instruction to run the XTion RGBd camera on the Pi 3 as well. For the sake of simplicity I set up a new system first and then will “fuse” the two.

First prerequisite in Larry’s tutorial is to add decent swap space on the OS, his OS is Ubuntu, mine is Debian Jessie Pixel and that is done differently. So, on the default Raspberry OS, you change the size of the swapspace in the file /etc/dphys-swapfile where you change from 100MB to 2000MB here: CONF_SWAPSIZE=100. I love stackexchange for that… (after rebooting, the command free -h should show you 2.0 GB of swap space).

Under Raspbian Jessie Pixel, I was not able to install libvtk (sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev). Mono, QT and JDK seem quite heavy (like one GB of space) and I don’t know whether I really need these, I hope not, since I really want to code in python and don’t intend to use QT. I installed them anyways, just to get as close as the recipe would let me ( sudo apt-get install mono-complete and sudo apt-get install qt-sdk openjdk-8-jdk openjdk-8-jre).

sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl also didin’t work, you need to sudo apt-get install software-properties-common first (see stackexchange again), Then it starts to work, but finally I get “NoDistroTemplateException: Error could not find a distribution template for Raspbian/jessie”. Damn. For fun, I googled Jochen Sprickerhof and found his PCL site. As the URL says, it’s geared towards Ubuntu, so this might explain the error I got. When you google “installing PCL on raspian” you get a couple of descriptions how people did it. So I’ll stick to that should something go wrong…

So I skipped this launchpad part, just to  see how far I’ll get. My feeling was that I wasn’t apt-getting something afterwards (but actually git cloning), so maybe this has not an immediate effect, let’s see. git cloning of the PointCloudLib worked (after user and pwd for git).

Also I was able to run the cmake command and run make. The blog says, it will take about 7 hours to compile, so I go to bed now…

UPDATE: it worked! (sudo make install)

deconstructing the minoru 3d stereo webcam

i’m thinking about adding stereo vision to trashbot as the raspberry pi has enough oomph to do some kind of computer vision and it seems that open cv supports this camera.

there’s not too many “3d” cams out there that actually fullfill my requirements:

  • cheap (<100€), so i can buy more when killing one
  • 3d or at least two cameras
  • strippable
  • supported by raspbian et al.
  • small enough to fit a robot’s head and
  • light (as the higher up the hardware in the bot the more it will impact stability when walking)

Continue reading

3d scanning trashbot for later comparison

so, the last couple of days i invested more time into 3d scanning the first version of the trashbot before really going into improving it. turns out that scanning a 3d object using skanect is more complicated than i thought.

i’ll report three different methods here:

  1. build a rotating lego stand for the desktop
  2. walk around the object to scan
  3. build an arduino controlled stepper rotating stand

let’s see first what the scene to scan is:

1) i thought i build a little rotating stand using lego, so i stole some legos from my kids and build something like this:

lego stand decomposed

lego stand composed

next, i scanned it, letting the motor run and went into analysis:

2) next, i decided to actually put the robot on a stand that doesn’t move and move the camera around instead, also assuming that different heights may add information and get a more complete picture:

okay, cut the video to not bore you too much with it. i think the result is more interesting:

(yeah, that’s our garden plants in the background, we already had some snow in germany…)

finally, i found this skanect tutorial and thought, that obviously, the rotating stand is finally the way to go:

3) so i built  a little step-motor / arduino driven rotating stand so i could control the rotation speed (check out this blog entry on a MUCH better stepper library for arduino) much better than with the lego and isolated the object from nearby objects.

arduino stepper rotation

okay and here’s the result (sorry for the audio quality, don’t know what went wrong):

that’s currently my last attempt. i think for now, i got the best results by manually scanning the bot and not using the rotation / stepper.