Ask Your Question
7

asus xtion pro live 1280x1024 resolution?

asked 2012-11-01 10:10:55 -0600

Alireza gravatar image

updated 2013-01-16 08:48:37 -0600

Hi all,

Is there any way to set the rgb image resolution of the Asus Xtion Pro live to 1280x1024? According to the Xtion pro live specifications i'm sure that it supports the 1280x1024 resolution for rgb data, but when i want to change the quality of rgb data from QVGA(640x480) to SXGA(1280x1024), openni module gives me the following error:

"[ WARN] [1348568266.991212994]: Could not find any compatible image output mode for 1280 x 1024 @ 15. Falling back to default image output mode 640 x 480 @ 30"

Any suggestions? Thanks in advance.

EDIT: I have checked openni_camera and noticed that when openni_camera runs with a xtion pro live plugged in to the computer,the openni module uses "openni_device_primesense.cpp" in order to drive the device. So i have read it's code and these are my results: in method DevicePrimesense::enumAvailableModes different output modes for the device have been set except SXGA so i have added following codes to this method:


  //The only acceptable FPS for this mode is 30!
  output_mode.nFPS = 30;
  output_mode.nXRes = XN_SXGA_X_RES;
  output_mode.nYRes = XN_SXGA_Y_RES;
  available_image_modes_.push_back (output_mode);

And also in file nodelets/driver.cpp and in method "DriverNodelet::updateModeMaps" we should change line


output_mode.nFPS  = 15;

to


output_mode.nFPS  = 30;

now if you run openni_camera using "roslaunch openni_launch openni.launch" and reconfigure the RGB mode to SXGA you can see that it accepts new configs, now the problem is as soon as you listen to /camera/rgb/image_color the openni_camera crashes!!

So i think we can solve this problem by our own,if anyone is willing to help me out to solve this problem here is my email:

alireza.mixedreality@gmail.com

EDIT: I have contacted with one of the openni_camera developers, he have edited the code to specifically work with SXGA RGB image of ASUS Xtion Pro live, So Other image formats like VGA and QVGA will not work any more. You can see the filed issue in the openni_camera github here.

And here is the Changes to openni_camera needed for SXGA resolution with xtion.

Before testing the new code, i recommend you to install OpenNI-Bin-Dev-Linux-x64-v1.5.2.23 and Sensor-Bin-Linux-x64-v5.1.0.41.

edit retag flag offensive close merge delete

Comments

1

Same problem here. SXGA is not supported by openni_camera for the Asus Xtion, even though the device supports it. I don't know if someone has a workaround for this though, I tried it myself and failed. I added a ticket here https://kforge.ros.org/openni/trac/ticket/58 .

Pedro gravatar imagePedro ( 2012-11-01 22:41:18 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-01-16 08:52:31 -0600

Alireza gravatar image

So, i had asked a question and answered and solved it on my own, you can see the solution at the end of my own question!

edit flag offensive delete link more

Comments

that is the solution which doesn't accept the other resolutions (VGA and QVGA) now, right?

Pedro gravatar imagePedro ( 2013-01-18 02:14:41 -0600 )edit

Yes, you are totally right! I'll try to fix it later. but i don't know when:)

Alireza gravatar imageAlireza ( 2013-01-18 07:50:34 -0600 )edit

Hi, I could not clearly understand what changes you have done. May I ask you to send those files to me ?

CHz gravatar imageCHz ( 2013-05-07 05:23:51 -0600 )edit

I just noticed that in SXGA, if I subscribe to the rgb image topic and depth image topic at the same time, it freezes. Do you have the same issue? CHz, download gistfile1.txt from gist.github.com/jonbinney/4508201, apply it in the openni_camera package with the 'patch' command and then compile it.

Pedro gravatar imagePedro ( 2013-05-16 05:00:52 -0600 )edit

Hi Pedro, but what is the exact command patch filename ? Because it is hanging and not doing anything. If I use git to apply patch I get corruption in the last line. Would be really nice if you can help me. I need it urgently.

CHz gravatar imageCHz ( 2013-05-23 03:32:50 -0600 )edit

checkout openni_camera to a folder in your ROS_PACKAGE_PATH; download the patch file; cd to your new openni_camera directory; apply patch ($patch -b -p1 -i <path to your patch file>); compile openni_camera ($rosmake openni_camera); if you give me your email it's easier.

Pedro gravatar imagePedro ( 2013-05-23 22:37:36 -0600 )edit

Hi, I did but nothing has changed after rosmake and roslaunch openni_launch. I dont know why but I will stick to current size of image. My e-mail is canerhazirbas@gmail.com. The other thing you cannot subscribe to both camera at same time. Even without changes for resolution you cannot do that.

CHz gravatar imageCHz ( 2013-05-23 23:46:10 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-11-01 10:10:55 -0600

Seen: 5,141 times

Last updated: Jan 16 '13