Rosanswers logo

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;

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:

[email protected]

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.

Originally posted by Alireza on ROS Answers with karma: 717 on 2012-11-01

Post score: 7

Original comments

Comment by Pedro on 2012-11-01:
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 .


1 Answer 1


Rosanswers logo

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!

Originally posted by Alireza with karma: 717 on 2013-01-16

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by Pedro on 2013-01-18:
that is the solution which doesn't accept the other resolutions (VGA and QVGA) now, right?

Comment by Alireza on 2013-01-18:
Yes, you are totally right! I'll try to fix it later. but i don't know when:)

Comment by CHz on 2013-05-07:
Hi, I could not clearly understand what changes you have done. May I ask you to send those files to me ?

Comment by Pedro on 2013-05-16:
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.

Comment by CHz on 2013-05-23:
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.

Comment by Pedro on 2013-05-23:
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.

Comment by CHz on 2013-05-23:
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 [email protected]. The other thing you cannot subscribe to both camera at same time. Even without changes for resolution you cannot do that.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.