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

Revision history [back]

Hi,

I found that all my observations were correct and I had my doubt in the right direction. AS suggested by @dornhege it is true that the topic /camera/rgb/points has to be replaced by /camera/depth_registered/points .

However, the key error is something to do with the namespace. This was the reason why the launch file was creating new topics in a new namespace which was a copy of the original topics that were already running.

The following is the edited launch file:

<launch>
 <arg name="robot_name" default="default"/>

 <group ns="clearpath">

 <group ns="robots/$(arg robot_name)">  

  <!-- HUSKY -->
  <include file="$(find husky_bringup)/minimal.launch" />

  <!-- KINECT -->
  <arg name="debug" default="false"/>
  <arg if="$(arg debug)" name="launch_prefix" value="xterm -rv -e gdb -ex run -args"/>
  <arg unless="$(arg debug)" name="launch_prefix" value=""/>
  <node pkg="openni_camera" type="openni_node" name="openni_node1" output="screen" launch-prefix="$(arg launch_prefix)">
    <param name="device_id" value="#1"/> <!-- this line uses first enumerated device -->
    <rosparam command="load" file="$(find openni_camera_deprecated)/info/openni_params.yaml" />
    <param name="rgb_frame_id" value="/openni_rgb_optical_frame" />
    <param name="depth_frame_id" value="/openni_depth_optical_frame" />
    <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" />
  </node>
  <include file="$(find openni_camera_deprecated)/launch/kinect_frames.launch"/>
 </group> <!-- end of robot group -->
 </group>

  <!-- SKIM CLOUD -->
  <node pkg="clearpath_tools" type="SkimImage" name="skim1" >
    <param name="in"                value="camera/depth_registered/points" />
    <param name="out"               value="camera/points/skim" />
    <param name="skim_factor"       value="2" />
  </node>

  <!-- PASSTHROUGH -->
  <node pkg="clearpath_tools" type="Passthrough" name="passthrough1" >
    <param name="in"                value="camera/points/skim" />
    <param name="out"               value="camera/points/passthrough" />
    <param name="dist"              value="4.0" />
  </node>

  <!-- EXPLORE DEMO -->
  <node pkg="clearpath_kinect_demo" type="ClearpathDemoExplore" name="ClearpathDemoExplore1" output="screen">
    <param name="in" value="camera/points/passthrough" />
    <param name="out" value="camera/points/visualization" />
    <param name="out_vel" value="husky/cmd_vel" />
    <param name="angular_vel_correction" value="2" />
    <param name="lin_speed" value="0.3" />
    <param name="ang_speed" value="0.3" />
    <param name="cam_height" value="0.55" />
    <param name="cam_z_trans" value="0.35" />
    <param name="wall_buffer" value="0.6" />
    <param name="random_walk" value="0" />
    <param name="publish_visualization" value="1" />
  </node>
 </launch>

As you can see above I have taken all the nodes except the openni node outside the group namespace and then it all works just fine. Because in this way it now starts publishing in the original topics that existed before rather than creating a whole new set of topics to publish.

Hope this helps someone else who may use these files from clearpath. I would also suggest Clearpath ( @Ryan ) to consider these modifications in the future updates including the ones mentioned in the question.

Regards.