Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL) X2

Moderators: mdrjr, odroid

Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL) X2

Unread postby murrman » Tue Sep 03, 2013 9:23 am

It's finally ready: Ubuntu 12.11 Robotics Edition 2 for ODROID-X2! This version adds OpenNI 2.2, PCL 1.7, custom code samples, and a few OpenCV packages by request (calib3D and libdc1394). I have also developed a few code samples to demonstrate data acquisition and interoperability between OpenCV, OpenNI2, and PCL (see ~/odroid-development). The code samples will be updated separately from the OS image, so check the github repository frequently.

Features:
Linaro 12.11, Kernel 3.0.75
Mali enabled (checked with glmark2-es2)
Lubuntu Desktop (stripped down)
OpenCV 2.4.6.1 with TBB
ROS Groovy (Bare Bones)
OpenNI 2.2 (Including Primesense drivers for Asus Xtion)
Point Cloud Library 1.7

Download the image here:
http://oph.mdrjr.net/murrman/linaro_ubu ... _x2.img.xz

MD5 checksum:
http://oph.mdrjr.net/murrman/linaro_ubu ... .xz.md5sum

Sample code repository:
https://github.com/cmcmurrough/odroid-development

Login:
Username: linaro
Password: linaro

Update History:
09/02/2013 - Initial release

Planned Updates:
Update Kernel to 3.8
Add working Microsoft Kinect OpenNI2 driver
Improve OpenNI/PCL sample code

Acknowledgements:
Base OS image provided by Robroyhall
File hosting provided by mdrjr
Installation tips provided by swkim01 and lyptik

I hope you find this image useful, and as always, suggestions and feedback are appreciated!

screenshot_v2.jpg
Last edited by murrman on Thu Sep 12, 2013 6:22 am, edited 2 times in total.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition V2 (ROS+OpenCV+OpenNI+PCL)

Unread postby mbonamusa » Tue Sep 03, 2013 10:21 pm

Congratulations! Good job!

I'm not a linux expert so perhaps I ask something very silly: Once started can I execute and apply the 3.8 kernel update from mdrjr?
mbonamusa
 
Posts: 147
Joined: Mon Feb 25, 2013 9:08 pm
languages_spoken: catalan, spanish, english
ODROIDs: ODROID-X2, U2, U3

Re: Ubuntu 12.11 Robotics Edition V2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Tue Sep 03, 2013 11:58 pm

Maybe. When I was working on the v1 image, I had some problems with the new kernel. I don't remember what the issue was, but it likely has been fixed since then. Give it a shot and let me know what happens!
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition V2 (ROS+OpenCV+OpenNI+PCL)

Unread postby mbonamusa » Wed Sep 04, 2013 1:07 am

I've done kernel update and everything seems right.
mbonamusa
 
Posts: 147
Joined: Mon Feb 25, 2013 9:08 pm
languages_spoken: catalan, spanish, english
ODROIDs: ODROID-X2, U2, U3

Re: Ubuntu 12.11 Robotics Edition V2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Wed Sep 04, 2013 1:18 am

Will you try running glmark2-es2? That would tell us if the Mali drivers are OK.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby mbonamusa » Wed Sep 04, 2013 5:24 am

Oh, now I've seen I applied kernel update to Robotics Edition v1. Tomorrow I'll update kernel on Edition v2 and try glmark-es2.
mbonamusa
 
Posts: 147
Joined: Mon Feb 25, 2013 9:08 pm
languages_spoken: catalan, spanish, english
ODROIDs: ODROID-X2, U2, U3

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Wed Sep 04, 2013 5:48 am

I just updated the kernel on a fresh v2 image. It ran fine, but I can't get the HDMI display to work (I think it is a boot.scr issue). Let me know how things work for you.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby mbonamusa » Wed Sep 04, 2013 9:00 pm

I always work remotelly by ssh so yestereday I didn't test HDMI in V1 image. Now I've connected hdmi display and it does not work either. So, it seems we have to continue with kernel 3.0.75.

I'm here if you need I do some other test.
mbonamusa
 
Posts: 147
Joined: Mon Feb 25, 2013 9:08 pm
languages_spoken: catalan, spanish, english
ODROIDs: ODROID-X2, U2, U3

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Wed Sep 04, 2013 11:34 pm

I ran some more experiments, it's not the boot.scr. For some reason after the kernel update, the lightdm login screen doesn't start automatically. If you run "startx" on the serial terminal, it will boot into LXDE (not ubuntu) as root where everything seems to work. I tried a few things to fix the login screen, but no luck yet. I'm pretty sure there is an easy fix to this...
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby jqq » Thu Sep 05, 2013 9:51 am

Thanks for contributing your OS image and sample!
jqq
 
Posts: 11
Joined: Fri Aug 30, 2013 8:23 am
languages_spoken: english
ODROIDs: ODROID-X2

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby charrington » Fri Sep 06, 2013 1:31 pm

I've ordered an odroid-xu. Do you have plans to have a version of your Robotics image for that card?
charrington
 
Posts: 14
Joined: Fri Sep 06, 2013 1:23 pm
languages_spoken: english
ODROIDs: odroid-xu

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Fri Sep 06, 2013 2:06 pm

charrington wrote:I've ordered an odroid-xu. Do you have plans to have a version of your Robotics image for that card?


You bet! Once I get an XU, I'll port everything over and release it ASAP.

I plan on having all of the features of the X2 and U2 images, but the base OS image will be a little different (probably not Linaro 12.11). I build my images on top of what the other forum members have contributed, so it depends on what is available.

I am currently experimenting with a Debain Wheezy based robotics image for the X2/U2. If this works out, I may use the XU Debian image as a base. Ubuntu 13.04 is also a possibility.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Thu Sep 12, 2013 7:25 am

mbonamusa, I figured out how to update the kernel and keep the graphics working. I'm not sure why this works, but here goes...

1. Run the update script as usual. Once the kernel is updated, BEFORE you reboot...

- sudo apt-get install nodm
- sudo dpkg-reconfigure nodm

2. In the reconfigure menu, allow nodm to start on bootup, and enter "linaro" as the username. Everything else just use default values.

3. Restart and login as usual.

In theory, nodm SHOULD automatically log in as linaro, skipping the login screen altogether. For some reason it doesn't work, but it brings up the lightdm login screen like before. I don't know why this "works", but I guess the ends justify the means...
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby mbonamusa » Thu Sep 12, 2013 6:36 pm

murrman wrote:mbonamusa, I figured out how to update the kernel and keep the graphics working. I'm not sure why this works, but here goes...

1. Run the update script as usual. Once the kernel is updated, BEFORE you reboot...

- sudo apt-get install nodm
- sudo dpkg-reconfigure nodm

2. In the reconfigure menu, allow nodm to start on bootup, and enter "linaro" as the username. Everything else just use default values.

3. Restart and login as usual.

In theory, nodm SHOULD automatically log in as linaro, skipping the login screen altogether. For some reason it doesn't work, but it brings up the lightdm login screen like before. I don't know why this "works", but I guess the ends justify the means...


I'll try this! I supose nodm configure some file than enables lightdm.
Thank you!
mbonamusa
 
Posts: 147
Joined: Mon Feb 25, 2013 9:08 pm
languages_spoken: catalan, spanish, english
ODROIDs: ODROID-X2, U2, U3

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby charrington » Tue Sep 17, 2013 1:30 pm

murrman wrote:
charrington wrote:I've ordered an odroid-xu. Do you have plans to have a version of your Robotics image for that card?


You bet! Once I get an XU, I'll port everything over and release it ASAP.

I plan on having all of the features of the X2 and U2 images, but the base OS image will be a little different (probably not Linaro 12.11). I build my images on top of what the other forum members have contributed, so it depends on what is available.

I am currently experimenting with a Debain Wheezy based robotics image for the X2/U2. If this works out, I may use the XU Debian image as a base. Ubuntu 13.04 is also a possibility.


That's great to hear! I am trying to gain an understanding of GPU acceleration for OpenCV. I see that Odroid has OpenCV, but is it only for Android? What GPU optimization for OpenCV is possible with "Robotics Edition"?
charrington
 
Posts: 14
Joined: Fri Sep 06, 2013 1:23 pm
languages_spoken: english
ODROIDs: odroid-xu

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Wed Sep 18, 2013 12:42 am

Neon support is enabled (ARM CPU optimization), also TBB for multithreading. There is nothing specific to the Mali in OpenCV at the moment (at least, I don't know of anything that explicitly benefits from OpenGL-ES).

As for the XU, mine arrives later this week. It uses a PowerVR GPU instead of a Mali, so things might be different. I'll post updates as soon as I can.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby charrington » Fri Sep 20, 2013 2:44 pm

murrman wrote:Neon support is enabled (ARM CPU optimization), also TBB for multithreading. There is nothing specific to the Mali in OpenCV at the moment (at least, I don't know of anything that explicitly benefits from OpenGL-ES).

As for the XU, mine arrives later this week. It uses a PowerVR GPU instead of a Mali, so things might be different. I'll post updates as soon as I can.

Hi Murrman,
I saw from the other thread that your XU arrived (congratulations for the award).
I had meant to say "odroid-xu supports OpenCL". I know that OpenCV can be compiled to use OpenCL so my assumption is that that gives a path for GPU optimization. I just did some more Googling and I see here:
http://withimagination.imgtec.com/index ... 544mp3-gpu
they say
"he good news for developers is that we’ve worked closely with Hardkernel, enabling them to deliver a complete and fully capable graphics and compute platform by providing our latest PowerVR SGX OpenGL 2.1 and OpenCL 1.1 EP drivers for Linux as well as OpenGL ES 1.0/2.0 and Renderscript drivers for Android."
Let me know if I can contribute to the effort to leverage the GPU.
charrington
 
Posts: 14
Joined: Fri Sep 06, 2013 1:23 pm
languages_spoken: english
ODROIDs: odroid-xu

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Sun Sep 22, 2013 12:49 pm

Awesome, I'll check out the OpenCL optimization for OpenCV.

What I'm unsure of is whether or not OpenCV will benefit from OpenCL EP or OpenGL ES. My understanding is that they are different versions of the full OpenCL / OpenGL libraries optimized specifically for embedded ARM platforms. I'm guessing it is either completely different, or whatever subset of optimizations that they have included from the full OpenCL / OpenGL will be used when you set the appropriate build flags.

If you can find some OpenCV code to use as a benchmark (something that we know should be accelerated by OpenCL EP), I can build it with and without and see if we notice a performance increase...
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby jqq » Thu Oct 03, 2013 4:04 pm

Is it possible to just use PCL straight-up? Without wrapping between OpenNI2, and OpenCV first? Even if it means using old OpenNI. If so, do you have any recommendations?
Thanks!
jqq
 
Posts: 11
Joined: Fri Aug 30, 2013 8:23 am
languages_spoken: english
ODROIDs: ODROID-X2

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Sat Oct 05, 2013 1:17 am

jqq wrote:Is it possible to just use PCL straight-up? Without wrapping between OpenNI2, and OpenCV first? Even if it means using old OpenNI. If so, do you have any recommendations?
Thanks!


Yes, you can use PCL by itself, but the OpenNI grabber will not work. This is because PCL depends on a modified version of OpenNI 1.x which doesn't work well on ARM.

PCL is moving to OpenNI 2 soon, so once that happens this should no longer be an issue.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby chris87muc » Sat Oct 12, 2013 2:59 am

Hello murrman,

thanks in advance for your image. Unfortunately, i`m not able to get it work. I downloaded your image, checked the md5sum and followed the instructions in the FAQ for flashing the SD-card. (http://odroid.us/mediawiki/index.php?ti ... Card_Setup).

When i insert the card (64gb emmc) into the x2 device and power on, nothing happens. It just shows the Tux Logos from the Bootloader. The device is working, i checked it with the Odroid delivered Android on a 16gb emmc card.

I would be glad if somebody could help.

Greetings,
Christian
chris87muc
 
Posts: 3
Joined: Sat Oct 12, 2013 2:02 am
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Sun Oct 13, 2013 5:35 am

Is the SD / EMMC jumper set correctly? On mine you have to remove it to boot from EMMC...
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby chris87muc » Sun Oct 13, 2013 8:14 pm

The jumper is set correctly, andoid emmc boots...
chris87muc
 
Posts: 3
Joined: Sat Oct 12, 2013 2:02 am
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Mon Oct 14, 2013 12:42 pm

chris87muc wrote:The jumper is set correctly, andoid emmc boots...


Do you have the serial debug cable? If so, does it give you any info when you boot?

Are you using an HDMI monitor (not a DVI-HDMI adapter)? I have had issues before while using adapters...
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby chris87muc » Wed Oct 16, 2013 3:38 am

Thanks for your help, i figured out that i had to edit the Xorg.conf for the odroid LCD ..
chris87muc
 
Posts: 3
Joined: Sat Oct 12, 2013 2:02 am
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby davidgitz » Sun Oct 27, 2013 1:40 pm

Hi, first thanks for all the work you've done so far! I am trying to get this working using my MS Kinect. I am able to use glview and glpclview (have to do sudo) ok but I can't figure out how to do a roslaunch openni_launch openni.launch. I am doing the following from the previous version of your code:
$ sudo apt-get install python-wstool
# Create a workspace directory tree somewhere in you file system
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
# Clone catkin repository
$ git clone https://github.com/ros/catkin.git
$ cp catkin/cmake/toplevel.cmake CMakeLists.txt
$ wstool init
$ wstool set openni_camera --git https://github.com/ros-drivers/openni_camera.git
$ wstool set openni_launch --git https://github.com/ros-drivers/openni_launch.git
============================
$ wstool set openni2_launch --git git://github.com/ros-drivers/openni2_launch.git
$ wstool set openni2_camera --git https://github.com/kalectro/openni2_camera.git
( git://github.com/ros-drivers/openni2_camera.git would make errors.)
$ wstool set perception_pcl --git -v groovy-unstable-devel https://github.com/ros-perception/perception_pcl.git
$ wstool update
$ cd ..
$ source /opt/ros/groovy/setup.bash
$ catkin_make_isolated --install
============================


but only using openni2* (not openni_*). When I try do catkin_make_isolated I get errors regarding openni2_camera.
Also, I'm not sure how to run your example code. If I try to do roslaunch openni2_launch I get [openni2_launch] does not exist.
Any pointers? Thanks!
davidgitz
 
Posts: 4
Joined: Thu Sep 05, 2013 11:28 am
languages_spoken: english
ODROIDs: ODroid-X2

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Mon Oct 28, 2013 7:58 am

Hi davidgitz,

I'm not sure about openni2_camera and ROS. I had to do a few config tweaks and build OpenNI2 from source, so probably if you install the ROS openni2 stuff it is not referring to the included installation, but rather to the ROS version that has not been compiled for the ODROID properly. Also, this image includes only the ROS barebones installation (communication libraries only). It could be that you don't have the openni2 ROS stacks in the first place...

Generally I work with OpenNI and PCL in a single node using the system wide installation (NOT the ROS stacks), and pass the "result" as a more simple ROS message. There is a known issue with PCL and ROS that makes it difficult to have a customized PCL version and the ROS-PCL libraries installed on the same system, but this is supposedly fixed in Hydro. I'm working on 13.04 images with ROS Hydro, but there currently is a missing dependency that is keeping me from finishing the new release (I am guessing that this will be fixed soon by the ROS community).

To run my examples, just cd to the directory where the cmakelists.txt lives, then run...

cmake .
make

And they should compile. Those examples are not made for ROS, they are stand-alone applications using OpenNI2, OpenCV, and PCL.

Another thing you can try is to pass the depth and RGB images from OpenNI as ROS messages using cv_bridge. I think there are some ways to convert those to point clouds in ROS, but I don't know for sure.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby davidgitz » Tue Oct 29, 2013 2:47 am

Sorry to be so needy. When I try to run any of your example code I get Unable to initialize OpenNI device!
Unable to initialize OpenNI2Grabber, program terminating! An output of lsusb gives:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0424:3503 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 012: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 005: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter
Bus 001 Device 006: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 007: ID 046d:c05a Logitech, Inc. Optical Mouse M90
Bus 001 Device 008: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 013: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
Bus 001 Device 014: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
Bus 001 Device 015: ID 045e:02ae Microsoft Corp. Xbox NUI Camera

I can run sudo glview.
davidgitz
 
Posts: 4
Joined: Thu Sep 05, 2013 11:28 am
languages_spoken: english
ODROIDs: ODroid-X2

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby DancesWithRobots » Tue Oct 29, 2013 3:43 am

It's my intention to purchase an Odroid for precisely this sort of thing, and in the very near future--Probably this week. At this point murrman, which model would you reccomend for best compatibility with your setup?
DancesWithRobots
 
Posts: 3
Joined: Tue Oct 29, 2013 3:38 am
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Tue Oct 29, 2013 11:03 am

davidgitz wrote:Sorry to be so needy. When I try to run any of your example code I get Unable to initialize OpenNI device!
Unable to initialize OpenNI2Grabber, program terminating! An output of lsusb gives:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0424:3503 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 012: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 005: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter
Bus 001 Device 006: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 007: ID 046d:c05a Logitech, Inc. Optical Mouse M90
Bus 001 Device 008: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 013: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
Bus 001 Device 014: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
Bus 001 Device 015: ID 045e:02ae Microsoft Corp. Xbox NUI Camera

I can run sudo glview.


Are you using a Kinect or an Asus Xtion Pro?
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Tue Oct 29, 2013 11:06 am

DancesWithRobots wrote:It's my intention to purchase an Odroid for precisely this sort of thing, and in the very near future--Probably this week. At this point murrman, which model would you reccomend for best compatibility with your setup?


At this point, everything works on the X2 and U2. Personally, I recommend the extra USB ports and standard SD card size (not micro).

I'm working on an XU image, but I'm tied up until late November at the moment with work stuff. The XU is definitely more powerful, but as far as my "support" goes, I can really only help with X2 and U2 currently.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby davidgitz » Tue Oct 29, 2013 12:17 pm

murrman wrote:
davidgitz wrote:Sorry to be so needy. When I try to run any of your example code I get Unable to initialize OpenNI device!
Unable to initialize OpenNI2Grabber, program terminating! An output of lsusb gives:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0424:3503 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 012: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 005: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter
Bus 001 Device 006: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 007: ID 046d:c05a Logitech, Inc. Optical Mouse M90
Bus 001 Device 008: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 013: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
Bus 001 Device 014: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
Bus 001 Device 015: ID 045e:02ae Microsoft Corp. Xbox NUI Camera

I can run sudo glview.


Are you using a Kinect or an Asus Xtion Pro?


A Kinect.
davidgitz
 
Posts: 4
Joined: Thu Sep 05, 2013 11:28 am
languages_spoken: english
ODROIDs: ODroid-X2

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Wed Oct 30, 2013 1:09 am

davidgitz wrote:
A Kinect.


OpenNI2 doesn't include the Kinect driver anymore, so that is your problem. The easiest solution is to get an Xtion, but you might be able to get it work with this...

https://github.com/piedar/OpenNI2-FreenectDriver
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby DancesWithRobots » Thu Oct 31, 2013 3:08 am

murrman wrote:
DancesWithRobots wrote:It's my intention to purchase an Odroid for precisely this sort of thing, and in the very near future--Probably this week. At this point murrman, which model would you reccomend for best compatibility with your setup?


At this point, everything works on the X2 and U2. Personally, I recommend the extra USB ports and standard SD card size (not micro).

I'm working on an XU image, but I'm tied up until late November at the moment with work stuff. The XU is definitely more powerful, but as far as my "support" goes, I can really only help with X2 and U2 currently.


Just the sort of answer I needed to see. X2 it is then.
DancesWithRobots
 
Posts: 3
Joined: Tue Oct 29, 2013 3:38 am
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby jqq » Wed Nov 13, 2013 11:48 am

I was using your PCL example, and had weird results with the Carmine 1.09 when I did the following:
grabber.depthToMeters(depthImage,depthImageMeters);
grabber.makeCloud(depthImageMeters, colorImage, cloud);

The cloud becomes distorted. Have you found this at all as well?

EDIT:
It seems to be because the cloud is already in meters
jqq
 
Posts: 11
Joined: Fri Aug 30, 2013 8:23 am
languages_spoken: english
ODROIDs: ODROID-X2

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Thu Nov 14, 2013 8:43 am

jqq wrote:I was using your PCL example, and had weird results with the Carmine 1.09 when I did the following:
grabber.depthToMeters(depthImage,depthImageMeters);
grabber.makeCloud(depthImageMeters, colorImage, cloud);

The cloud becomes distorted. Have you found this at all as well?

EDIT:
It seems to be because the cloud is already in meters


Does it work when you comment out the call to depthToMeters?
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby jqq » Thu Nov 14, 2013 12:14 pm

Yes it does work. The problem is certain filters like Euclidean Cluster Extraction freeze on the cloud. If I first pass it through a Voxel Grid though, they work. I'm pretty sure this is because the grid makes a completely new cloud, and the generated cloud has some bad points. As per your grabber, there is a TODO regarding NaN points. Have you tried this method mentioned here:
http://www.pcl-users.org/Conversion-fro ... l#a4023943
i.e. this test: if (depthValue == depthValue) // if depthValue is not NaN
I tried it but still got the filters freezing unless I voxelised the cloud first.

Also, where did you get your constants for the cloud generation:
#define DEPTH_CX 319.5
#define DEPTH_CY 239.5
#define DEPTH_FX 525.0
#define DEPTH_FY 525.0
Are these always valid? Do you know if they are valid for Carmine 1.09? Are they valid for all OpenNI devices? Is there a more robust way? (sorry for all the questions!)

Thanks
jqq
 
Posts: 11
Joined: Fri Aug 30, 2013 8:23 am
languages_spoken: english
ODROIDs: ODROID-X2

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Fri Nov 15, 2013 1:44 pm

jqq wrote:Yes it does work. The problem is certain filters like Euclidean Cluster Extraction freeze on the cloud. If I first pass it through a Voxel Grid though, they work. I'm pretty sure this is because the grid makes a completely new cloud, and the generated cloud has some bad points. As per your grabber, there is a TODO regarding NaN points. Have you tried this method mentioned here:
http://www.pcl-users.org/Conversion-fro ... l#a4023943
i.e. this test: if (depthValue == depthValue) // if depthValue is not NaN
I tried it but still got the filters freezing unless I voxelised the cloud first.

Also, where did you get your constants for the cloud generation:
#define DEPTH_CX 319.5
#define DEPTH_CY 239.5
#define DEPTH_FX 525.0
#define DEPTH_FY 525.0
Are these always valid? Do you know if they are valid for Carmine 1.09? Are they valid for all OpenNI devices? Is there a more robust way? (sorry for all the questions!)

Thanks


You are probably right about the NaN points. Generally I always downsample (even on a desktop) for speed anyways. There is a function in PCL that does this automatically...

pcl::removeNaNFromPointCloud(*cloudIn, *cloudIn, index);

I don't remember why I added the TODO, oh well :)

The constants CX and CY are the center points of 640 x 480, respectively (639/2 and 479/2 to be exact, because of the 0 number base). FX and FY are the focal length parameters. The carmine is for close range, right? If so, FX and FY may be different.

Those numbers are technically not optimal, but it is what OpenNI uses as the default. You can optimize the parameters using the OpenCV camera calibration or MATLAB calibration toolboxes. CX and CY are where the optical center of the camera/lens assembly passes through the CMOS sensor. In practice, this is never perfectly centered.

An example of this is when you look at edges in a point cloud. Often you will get some colors bleeding across different depths. This is because the calibration parameters are not optimal, and the registration between the color and depth images is somewhat misaligned (or the transformation between the RGB and D cameras is not accurate, which you can solve with stereo camera calibration).

If you want to calibrate the intrinsic parameters of the D camera yourself (CX,CY,FX,FY), you need to get the raw IR image (the IR image itself, not the depth) of a checkerboard with known dimensions from several orientations in an environment flooded with IR light (to override the IR projector, I just use a halogen lamp). You then use a camera calibration toolbox of choice, and it will give you the "more optimal" solution for your particular device. There is a slight deviation between each device due to manufacturing tolerances, but you only need to do it once for your device and it can be performed on any computer.

This link talks about it a little...

http://wiki.ros.org/kinect_calibration/technical
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Fri Nov 15, 2013 1:50 pm

Here is how to calibrate the intrinsic parameters of a single camera in OpenCV. If you mostly care about the point data and not so much the color, this is the easiest way to do it...

http://docs.opencv.org/doc/tutorials/ca ... ation.html

Print off a checkerboard, get a halogen light, take several raw IR images, then run this example. It will give you as output the camera matrix, which has CX, CY, FX, FY.

This is for the basic pinhole camera model with little or no radial distortion. If you are using a fisheye lens or something, it wont work so well. For a kinect, it works great :)
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby jqq » Sat Nov 16, 2013 7:38 am

Thanks for the info!
jqq
 
Posts: 11
Joined: Fri Aug 30, 2013 8:23 am
languages_spoken: english
ODROIDs: ODROID-X2

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby thedinuka » Thu Nov 28, 2013 8:08 am

Great stuff murrman. Thanks heaps for sharing.

Hope you have time for a few questions which are a bit abstract at this point. I'm currently finalizing a Matlab implementation of a SLAM algorithm which makes use of feature detectors (FAST features) and tracking (KLT) in openCV. What I want to do next is to port my code to C/C++ on an suitably powered embedded platform. My search for the perfect embedded hardware for that project is what made me take a look at ODROID. I would ideally like to gather as much info about the capabilities of the different ODROIDs (and other similar dev boards out there) before making my choice. I'm hoping you can help me out a bit here.

1) Have you had time to run any of the OpenCV feature detector and/or feature tracking algorithms on the ODROID using this image? If so, what were the specs about number of features and frame rate?

2) I know that OpenCV is optimized for x86 SIMD instruction set. Does neon help you much in optimizing OpenCV code?

3.) Have you had some time to play around with OpenCL using your XU? Is there potential for significant performance gains using this for OpenCV?

Thanks
thedinuka
 
Posts: 18
Joined: Wed Nov 27, 2013 3:33 pm
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Thu Nov 28, 2013 8:29 am

Hi thedinuka,

1. No, I haven't run either of those yet. If you give me some more specifics about the examples you would like to run, I can run them for you and let you know what I get.
2. I don't know if neon helps or not, someone on the forums just requested that I add it. It didn't speed up my own applications, but I did nothing to take advantage of it.
3. I haven't played around with OpenCL yet. The only paralellization libs I have experience with at the moment are TBB and CUDA (neither of which are very applicable here, though my distros do include TBB at least for compatibility). I am interested in OpenCL, I just haven't had time to mess with it. I suspect that it would boost OpenCV quite a bit, and there are several examples to support this.

Sorry I can't give too many specifics, I had to focus on some other projects over the last month and haven't been able to do much, though I have resumed work on the XU image. What I can say is that I used to work with Intel Atom x86 boards (both single and dual core), and for my own OpenCV applications the X2/U2 both outperform the Atom (not the new Atoms, I haven't used them yet) when no graphics hardware is present (in other words, using the integrated Intel graphics instead of an NVIDIA or ATI GPU). This is also without explicitly using any GPU or paralellization libs on the ODroid. I really think there is room to squeeze out more performance, but even without it, I am very impressed by the overall processing power of these boards.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby thedinuka » Thu Nov 28, 2013 10:27 am

wow, that was quick. Thank you for taking the time to help.

My main concern is the rate at which I can do feature detection. I don't have any C++ code in hand yet but since feature extraction and tracking is straightforward to code, something like the below example from the opencv tutorials should give me a good insight into the capabilities of the platform.

http://docs.opencv.org/trunk/doc/tutori ... xeles.html

I'm looking at an image size of 640x480 and to detect roughly around 40 -50 features in each image. It'd be great if you can let me know how the U2 or the X2 fares with this sort of a code. (It doesn't necessarily has to be the same image size if you don't have anything of that size around)
Thanks again
thedinuka
 
Posts: 18
Joined: Wed Nov 27, 2013 3:33 pm
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby mgoon » Fri Nov 29, 2013 9:45 pm

How to use odroid X2 - LCD Module?
I hope that I can use my LCD module
Let me know....
mgoon
 
Posts: 2
Joined: Tue Nov 19, 2013 3:11 pm
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Sat Nov 30, 2013 8:44 am

mgoon wrote:How to use odroid X2 - LCD Module?
I hope that I can use my LCD module
Let me know....


I don't see why it wouldn't work. You may need to mess with the boot.scr files to get the display to work correctly.

These images are based on Robroyhall's Dream Machine distributions, try searching those threads.
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby mgoon » Sat Nov 30, 2013 6:27 pm

murrman wrote:
mgoon wrote:How to use odroid X2 - LCD Module?
I hope that I can use my LCD module
Let me know....


I don't see why it wouldn't work. You may need to mess with the boot.scr files to get the display to work correctly.

These images are based on Robroyhall's Dream Machine distributions, try searching those threads.



Thanks.
Edit /etc/X11/xorg.conf modified.
mgoon
 
Posts: 2
Joined: Tue Nov 19, 2013 3:11 pm
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby g.cubed » Fri Dec 27, 2013 9:02 am

Murrman,

I'm trying to get OpenNI installed on another board and have been following the steps robroyhall detailed from the korean translation in another thread. In that thread it is referring to the Kinect. I have an Xtion Pro Live and was wondering if I should use a different git repo than this?:

$ Cd ~ / openni
$ Git clone git :/ / github.com/avin2/SensorKinect.git
$ Cd SensorKinect / Platform / Linux / CreateRedist
...

When using the above repo I went through the steps of building the driver and running the install script - I'm pretty sure my flags are correct. However when I build NIViewer and try to test it, it says the device is not found. When I do lsusb, I see which bus and device it is, but I have no "description...it is blank.

Can I ask first if this repo is still what you would use for the XtionPro driver? https://github.com/avin2/SensorKinect. I'm pretty sure my flags are correct for the board in question, RedistMaker is completing. That other thread is a year old so I thought maybe something has changed.
g.cubed
 
Posts: 43
Joined: Fri Jul 12, 2013 1:26 pm
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby murrman » Fri Dec 27, 2013 12:48 pm

Ehh I think the SensorKinect repo is for the Kinect. OpenNI2 should already support the Xtion, but I had to do some stuff to get it to compile. Below are the steps I followed (this is not a script, just notes).

Code: Select all
sudo apt-get install gcc-multilib libudev-dev

#Install dependencies
sudo apt-get install -y g++ python libusb-1.0-0-dev freeglut3-dev doxygen graphviz

#Clone OpenNI2 git and enter the folder
git clone https://github.com/OpenNI/OpenNI2 && cd OpenNI2

# Find Platform.Arm
find . -iname platform.arm
./ThirdParty/PSCommon/BuildSystem/Platform.Arm

#In the Platform.Arm file change (We configure OpenNI2 for the ODROID ARM architecture)
CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-mcpu=cortex-a8
#to
CFLAGS += -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard

# Run
PLATFORM=Arm make

#When make is done, run
cd Packaging && python ReleaseVersion.py Arm

#We know have a tar archive of the OpenNI2 installer, it is located in
#./Redist/Final/
#You can store it for later use !

#Move the archive to your home folder
mv /Redist/Final/OpenNI-Linux-Arm-2.1.0.tar.bz2 ~

#Extract the archive and install OpenNI2
tar -xvf OpenNI-Linux-Arm-2.1.0.tar.bz2 && cd OpenNI-2.1.0-arm && sudo sh install.sh

#Connect the Xtion Live Pro and check it is recognized
demsg | tail

#You should see something talking about PrimeSense, the manufacturer ;)

#Make an example :
cd Samples/SimpleRead && make

#Start the example :
cd ../Bin && ./SimpleRead
User avatar
murrman
 
Posts: 240
Joined: Mon Jul 08, 2013 8:53 am
Location: Texas
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby ayu016 » Mon Dec 30, 2013 8:03 am

Is OpenCV hardware accelerated for this OS image?
ayu016
 
Posts: 9
Joined: Fri Dec 13, 2013 10:56 am
languages_spoken: english

Re: Ubuntu 12.11 Robotics Edition v2 (ROS+OpenCV+OpenNI+PCL)

Unread postby DJUltis » Mon Dec 30, 2013 12:32 pm

Thank you Murman for this great image, DancesWithRobots and I are using this distro with the help of GroG from MyRobotLab.org to explore some capabilities and experiments that we can use with hardware.

I can confirm using a kinect successfully with several of the provided examples by installing the OpenKinect drivers and following instructions available on http://openkinect.org/wiki/Main_Page

Cheers and happy robot building to all!
DJUltis
 
Posts: 1
Joined: Thu Nov 28, 2013 3:01 am
languages_spoken: english
ODROIDs: X2

Next

Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 2 guests