ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Multiple Kinects - 2nd openni_node never publishes anything

asked 2011-08-12 06:00:51 -0600

bsatzinger gravatar image

updated 2016-10-24 08:59:18 -0600

ngrennan gravatar image

Hi,

I'm trying to run multiple Kinects on one computer (for now just two Kinects). I created a modified launch files to identify each kinect by its serial number, and launch it. I'm using remap in the launch file to remap the /camera/* topics to /cameraXXXX where XXXX are the last 4 digits of the serial number. I also have a launch file to launch a bunch of static transform broadcasters.

Here are my launch files. I originally had the two camera nodes in the same launch file, but I separated them to help with troubleshooting.

The problem I'm having is this: I can launch either camera node and everything works fine. When I try to run both camera nodes at the same time, only the first one to launch publishes any point clouds (as determined by trying to view the point clouds in rviz, and using the rostopic hz command). The other one never publishes any messages.

Any thoughts? Does anyone have some example launch files that are known to work with multiple kinects?

Here are my launch files:

<launch>
  <arg name="launch_prefix" value=""/>  
  <node pkg="openni_camera" type="openni_node" name="openni_node113A" output="screen" launch-prefix="$(arg launch_prefix)">
    <param name="device_id" value="A00364A14324113A"/> <!-- this line uses device with given serial number -->
    <rosparam command="load" file="$(find openni_camera)/info/openni_params.yaml" />
    <param name="rgb_frame_id" value="/openni_rgb_optical_frame113A" />
    <param name="depth_frame_id" value="/openni_depth_optical_frame113A" />
    <param name="use_indices" value="false" />
    <param name="depth_registration" value="true" />
    <param name="image_mode" value="2" />
    <param name="depth_mode" value="2" />
    <param name="debayering" value="2" />
    <param name="depth_time_offset" value="0" />
    <param name="image_time_offset" value="0" />
    <remap from="/camera" to="/camera113A"/>
  </node>
</launch>



<launch>
  <arg name="launch_prefix" value=""/>
  <node pkg="openni_camera" type="openni_node" name="openni_node045B" output="screen" launch-prefix="$(arg launch_prefix)">
    <param name="device_id" value="B00362709389045B"/> <!-- this line uses device with given serial number -->
    <rosparam command="load" file="$(find openni_camera)/info/openni_params.yaml" />
    <param name="rgb_frame_id" value="/openni_rgb_optical_frame045B" />
    <param name="depth_frame_id" value="/openni_depth_optical_frame045B" />
    <param name="use_indices" value="false" />
    <param name="depth_registration" value="true" />
    <param name="image_mode" value="2" />
    <param name="depth_mode" value="2" />
    <param name="debayering" value="2" />
    <param name="depth_time_offset" value="0" />
    <param name="image_time_offset" value="0" />
    <remap from="/camera" to="/camera045B"/>
  </node>
</launch>



<launch>
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link_113A" args="0 -0.02 0 0 0 0  /openni_camera113A /openni_depth_frame113A 100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link1_113A" args="0 -0.04 0 0 0 0  /openni_camera113A /openni_rgb_frame113A 100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link2_113A" args="0 0 0 -1.57 0 -1.57 /openni_depth_frame113A /openni_depth_optical_frame113A  100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link3_113A" args="0 0 0 -1.57 0 -1.57 /openni_rgb_frame113A /openni_rgb_optical_frame113A 100" />  

  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link_045B" args="0 -0.02 0 0 0 0  /openni_camera045B /openni_depth_frame045B 100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link1_045B" args="0 -0.04 0 0 0 0  /openni_camera045B /openni_rgb_frame045B 100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link2_045B" args="0 0 0 -1.57 0 -1.57 /openni_depth_frame045B /openni_depth_optical_frame045B  100" />  
  <node pkg="tf" type="static_transform_publisher ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-08-12 07:09:24 -0600

Patrick Mihelich gravatar image
edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-08-12 06:00:51 -0600

Seen: 457 times

Last updated: Aug 12 '11