Rosanswers logo

I've looked into modifying the launch file as in this example: http:// [Not enough karma for links] answers.ros.org/question/57938/multiple-kinects/

However, it appears that the launch file I have is different from what's listed. Is this a separate script to run multiple launch files and if so, how would I go about that from the default debian packages that I've downloaded? I'm working in ROSHydro (obviously) and Ubuntu 12.04. I'm relatively new to Linux, Kinect, and ROS and have been tasked with setting up a multiple-Kinect system in my lab. Since September is the first time I've used any of these, I'm a little lost. I've got a better idea of Linux structure but I have minimal coding experience before this so it's been a "trial by fire" type thing.

Currently I have no problem launching the OpenNI driver and accessing the normal camera, monochrome, and depth map camera images. The stream seems to be smooth and have no issues. I have three open buses (not USB ports but buses) for three Kinects, which is where I'd eventually like to go.

Any recent questions that I've missed involving multiple Kinects and ROSHydro specifically?

Originally posted by Athoesen on ROS Answers with karma: 429 on 2013-10-30

Post score: 1


1 Answer 1


Rosanswers logo

Here is a better way to do it : a launch file launching all you need :


  <!-- Parameters possible to change-->
    <arg name="camera1_id" default="1@0" /><!-- here you can change 1@0 by the serial number -->
    <arg name="camera2_id" default="2@0" /><!-- here you can change 2@0 by the serial number -->
    <arg name="camera3_id" default="3@0" /><!-- here you can change 3@0 by the serial number -->
    <arg name="depth_registration" default="true" />

  <!-- Default parameters-->
    <arg name="camera1_name" default="kinect1" />
    <arg name="camera2_name" default="kinect2" />
    <arg name="camera3_name" default="kinect3" />

 <!-- Putting the time back to real time-->
       /use_sim_time : false

<!-- Openning Rviz for visualization-->
<node name="rviz" pkg="rviz" type="rviz"/>

  <!-- Launching first kinect-->
    <include file="$(find openni_launch)/launch/openni.launch">
        <arg name="device_id" value="$(arg camera1_id)" />
        <arg name="camera" value="$(arg camera1_name)" />
        <arg name="depth_registration" value="$(arg depth_registration)" />

 <!-- Launching second kinect-->
    <include file="$(find openni_launch)/launch/openni.launch">
        <arg name="device_id" value="$(arg camera2_id)" />
        <arg name="camera" value="$(arg camera2_name)" />
        <arg name="depth_registration" value="$(arg depth_registration)" />

<!-- Launching third kinect-->
    <include file="$(find openni_launch)/launch/openni.launch">
    <arg name="device_id" value="$(arg camera3_id)" />
    <arg name="camera" value="$(arg camera3_name)" />
    <arg name="depth_registration" value="$(arg depth_registration)" />


I hope it'll help you :-)

Originally posted by Stephane.M with karma: 1304 on 2013-11-08

This answer was ACCEPTED on the original site

Post score: 3

Original comments

Comment by Athoesen on 2013-12-13:
I'm unsure why roslaunch refuses to recognize my launch file. I didn't want to modify the existing one so I've been trying to do the command "roslaunch openni_launch openni3.launch" with the openni3.launch file giving commands to launch all three. Is there something in the architecture I'm missing?

Comment by Athoesen on 2013-12-16:
I tried using this command: roslaunch example_launch example.launch

And got this: [example.launch] is neither a launch file in package [example_launch] nor is [example_launch] a launch file name

example.launch is embedded in a launch folder within example_launch, I am unsure what's wrong.

Comment by Stephane.M on 2013-12-17:
The error is that you didn't add the package "example_launch" to your ros path... try to do roscd example_launch to check that your package is added to you path correctly.

Comment by Athoesen on 2014-01-08:
Thank you for this, it is currently working to launch all of my Kinects at once.


Your Answer

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