1st kinect for laserscan&2nd kinect for skeleton tracking on one PC-possible?

asked 2016-09-23 22:54:15 -0500

FrankYou gravatar image

updated 2016-09-24 01:45:24 -0500

Hi! My aim is to use 2 kinects on one PC, one used to get laserscan for SLAM and another used for skeleton tracking.

Right now, I can use 2 kinects on one PC to get color image from one kinect and realize skeleton tracking on the other kinect.

But if I get laserscan from 1st kinect and simultaneously realize skeleton tracking on the other, the skeleton tracking works well while I can't get laserscan data in rviz.

The fact that I failed to get laserscan makes me suspect that whether it is possible that 1st kinect for laserscan&2nd kinect for skeleton tracking on one PC. Or whether my approach is wrong.The following is my approach:

roslaunch openni_launch test.launch(run 2 kinects in test.launch)
rosrun openni_tracker openni_tracker
rosrun rviz rviz(to see the skeleton tracking)
rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/kinect1/depth/image_raw
rosrun rviz rviz(to see the laserscan data)

and test.launch:

<launch>  
<!-- Parameters possible to change-->  
<arg name="camera1_id" default="#1" />
<arg name="camera2_id" default="#2" />
<arg name="depth_registration" default="true"/>  

<!-- Default parameters-->  
<arg name="camera1_name" default="kinect1" />  
<arg name="camera2_name" default="openni" />  

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

<!-- 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>  

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

any idea or suggestion is appreciated! And thanks in advance!

edit retag flag offensive close merge delete