Ask Your Question
0

roslaunch openni_camera openni_node.launch on multiple client

asked 2013-03-14 17:24:54 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi,

Greetings.

I am using ROS Electric. I have three ROS station, one is master and other two are client machines. Each client machine has its own Kinect. Master's IP is configured as ROS_MASTER_URI on both clients. I also want to use /camera/rgb/image_color and /camera/depth/image_raw topics on both clients, published from their own kinect. Now the problem is, whenever I launch kinect using 'roslaunch openni_camera openni_node.launch', it stops the execution of the same launch file on the other client. Means, suppose I launch the kinect on client1, now if I try to launch the kinect of client2 on client2 by using the previous command, it stops the kinect of the first client, client1. I am stuck with this for awhile. Your help to solve this problem will be highly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2013-03-15 01:39:35 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Have you tried :

  • naming the différents nodes ?
  • giving the topics differents names ?

Here is an example of what I do, with two kinects, on the same computer :

Parameters :

<arg name="camera1_id" default="#1" />
<arg name="camera2_id" default="#2" />
<arg name="depth_registration" default="true" />
<arg name="camera1_name" default="kinect1" />
<arg name="camera2_name" default="kinect2" />

Launching :

 <!-- 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)" />
 </include>

<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)"/> </include>

By doing so, all the topics will appear in the namespace kinect1 and kinect2, for example topics : "kinect1/rgb/image_color", "kinect2/depth/image_raw", etc...

Have a nice day,

Bests regards,

Steph

edit flag offensive delete link more

Comments

Pay attention to the fact that my previous answer is using the new names in ROS Groovy. Thus, don't forget to change the name "openni_launch"' to "openni_camera" if you use Electric.

Stephane.M gravatar image Stephane.M  ( 2013-03-15 01:41:20 -0500 )edit

Thank you very much Stephane. It works :). I really appreciate it.

Tariq gravatar image Tariq  ( 2013-03-15 05:48:57 -0500 )edit

Cool, happy to help :-) Don't forget to put my answer as correct then :-)

Stephane.M gravatar image Stephane.M  ( 2013-03-15 05:59:08 -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: 2013-03-14 17:24:54 -0500

Seen: 374 times

Last updated: Mar 15 '13