0
$\begingroup$

Rosanswers logo

I'm trying to change the resolution of my Asus Xtion Pro Live. I'm currently running ROS Groovy on Ubuntu 12.04.

I am aware that there is a graphical method to do this, using rosrun rqt_reconfigure rqt_reconfigure, but is there a command line way of doing this? Or even better, is there some way such that when I use roslaunch openni_launch openni.launch, the resolution is lowered by default? The default right now is VGA 640x480 @ 30fps. I want to change it to QVGA 320x240 @ 30fps.

I tried adding <arg name="image_node" value="5" /> to my openni.launch file, but it didn't do anything. I set the value to 5 because using the graphical method, QVGA 320x240 @ 30fps is labelled as (5).

Can someone help me out here?


Originally posted by Andrew.A on ROS Answers with karma: 324 on 2014-04-07

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

As seen on the dynamic_reconfigure documentation, there is a node called dynparam that is part of the package that can be used to set reconfigurable parameters via the commandline. So for your situation a command like

rosrun dynamic_reconfigure dynparam set /camera/driver depth_mode 5

Would do what you want. In a launch file:

<launch>
<include file="$(find openni_launch)/launch/openni.launch"/>
<node pkg="dynamic_reconfigure" type="dynparam" name="reconfig"
  output="screen" args="set /camera/driver depth_mode 5" />
</launch>

Originally posted by jarvisschultz with karma: 9031 on 2014-04-08

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Andrew.A on 2014-04-08:
The command line works great! But I'm having trouble with editing the launch file. I'm trying to edit the openni.launch file directly, at /opt/ros/groovy/share/openni_launch/launch/openni.launch. I got the error maximum recursion depth exceeded while calling a Python object.

Comment by Andrew.A on 2014-04-08:
When I removed the <node> element completely, it worked! I just had to restart my mjpeg_server. Thank you!

$\endgroup$

Your Answer

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