View Single Post
  #3   Spotlight this post!  
Unread 04-01-2013, 18:48
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Axis Cam transport layer?

We had the Kinect on our robot last year, and tried to do something similar. We did all of the vision processing on the coprocessor though, so the Axis emulation wasn't as important. We just included it so that the dashboard could get the image for debugging. We never did get it to be 100% reliable though, and the dashboard stream often fail as soon as the cRIO enabled (we sent results over a second channel to the cRIO which didn't fail), but I think that may have been a result of our choice of HTTP libraries.

If you need a starting place and are working in C(++), you can find our primary code for the coprocessor here. That's the file with most of the kinect interface stuff and parts of the vision algorithm, the rest are mainly for other parts of the vision processing. You can also see beagleSender.cpp for the code that sent the results to the cRIO. Our axis implementation isn't in there yet, but I'll see about getting it up.

With our system, we used a BeagleBoard-xM with Angstrom Linux, but that choice shouldn't matter too much. You'll need to install OpenCV if you want to do processing on the board, and libfreenect (which requires libusb) to get images from the Kinect. We didn't use the depth stream from the Kinect (it drops in accuracy significantly after ~2 meters), but you can see how we grab the raw IR images (which work wonders with the retroreflective tape). Note that you can't have both IR and color video enabled simultaneously. You can also get a hi-res (1208x1024) image from one of the two cameras if you disable the depth data.

Good luck, and feel free to ask if you have any more questions.
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"