Ask Your Question
2

Activating OpenNi depth registration by default

asked 2011-11-14 20:38:22 -0500

Per Lenander gravatar image

Hello!

My problem is the following: I use the openni_kinect package to get rgb/depth feeds from my kinect. I start the ROS nodes for this by using

roslaunch openni_launch openni.launch

My program needs depth registration to function properly (disabled by default), so far I have enabled this by running

rosrun dynamic_reconfigure reconfigure_gui

and setting the parameter manually, but it is quickly getting old. Is there a way to turn the depth registration on by default in my roslaunch?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2011-11-14 23:06:24 -0500

Andrew Gee gravatar image

A simple solution is to edit the openni_kinect/openni_launch/launch/includes/device.launch file and add the following param setting to the driver nodelet

<param name="depth_registration" value="true" />

An alternative solution which works for me is to use the dynparam command-line tool from inside your own launch script, e.g.

<node pkg="dynamic_reconfigure" type="dynparam" name="dynparam" args="set /camera/driver depth_registration true" />

which avoids the need to edit the launch files in the openni_kinect package.

edit flag offensive delete link more

Comments

Thanks! I picked the second alternative since I prefer not to change the ROS files (then my system can work on a clean ROS install)
Per Lenander gravatar image Per Lenander  ( 2011-11-15 19:32:47 -0500 )edit
2

answered 2013-02-11 07:36:46 -0500

paulbovbel gravatar image

updated 2013-02-11 07:41:58 -0500

Another way without using dynamic reconfigure is to use this in your top level launch file:

<include file="$(find openni_launch)/launch/openni.launch">
<arg name="depth_registration" default="true" />
</include>
edit flag offensive delete link more

Comments

Hello, I want to make sure what I did is right. In side the .launch file that I create, is it should be like followings? <launch> <include file="$(find openni_launch)/launch/openni.launch"> <arg name="depth_registration" default="true"/>

</include> </launch>

fei gravatar image fei  ( 2015-06-12 16:14:11 -0500 )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

Stats

Asked: 2011-11-14 20:38:22 -0500

Seen: 2,935 times

Last updated: Feb 11 '13