0
$\begingroup$

Rosanswers logo

Hi,

I had previously made explore and human tracking work well with Husky A200. However, recently when I tried to do the same again today it did not work. I tried several things to repair this but none of them worked.

Here are some more details:

  1. I am using Ubuntu 12.04 with fuerte
  2. I am using the openni_camera_deprecated package in the launch file.
  3. I have also remapped the vel topic to /husky/cmd_vel

Here's the Launch file:

<launch>
<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"/>

  <!-- SKIM CLOUD -->
  <node pkg="clearpath_tools" type="SkimImage" name="skim1" >
    <param name="in"                value="camera/rgb/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>

</group> <!-- end of robot group -->


I used rxgraph to verify the topic links and I found a strange thing. It is that I already have a topic


/husky/cmd_vel sending data to /husky/clearpath_base node

running from clearpath services. However after I launch explore.launch file I see that a completely new topic is initiated

/clearpath/robots/default/husky/cmd_vel sending data to /clearpath/robots/default/husky/clearpath_base

I believe this is an issue that has got something to do with the namespaces provided in the launch file.


Here are some of the unwanted topics listed in rostopic list which already exists outside the namespace /clearpath/robots/default


/clearpath/robots/default/camera/points/passthrough

/clearpath/robots/default/camera/points/skim /clearpath/robots/default/camera/points/visualization /clearpath/robots/default/camera/rgb/points /clearpath/robots/default/depth/camera_info /clearpath/robots/default/depth/image_raw /clearpath/robots/default/depth/image_raw/compressed /clearpath/robots/default/depth/image_raw/compressed/parameter_descriptions /clearpath/robots/default/depth/image_raw/compressed/parameter_updates /clearpath/robots/default/depth/image_raw/theora /clearpath/robots/default/depth/image_raw/theora/parameter_descriptions /clearpath/robots/default/depth/image_raw/theora/parameter_updates /clearpath/robots/default/depth_registered/camera_info /clearpath/robots/default/depth_registered/image_raw /clearpath/robots/default/depth_registered/image_raw/compressed /clearpath/robots/default/depth_registered/image_raw/compressed/parameter_descriptions /clearpath/robots/default/depth_registered/image_raw/compressed/parameter_updates /clearpath/robots/default/depth_registered/image_raw/theora /clearpath/robots/default/depth_registered/image_raw/theora/parameter_descriptions /clearpath/robots/default/depth_registered/image_raw/theora/parameter_updates /clearpath/robots/default/husky/cmd_freq /clearpath/robots/default/husky/cmd_vel /clearpath/robots/default/ir/camera_info /clearpath/robots/default/ir/image_raw /clearpath/robots/default/ir/image_raw/compressed /clearpath/robots/default/ir/image_raw/compressed/parameter_descriptions /clearpath/robots/default/ir/image_raw/compressed/parameter_updates /clearpath/robots/default/ir/image_raw/theora /clearpath/robots/default/ir/image_raw/theora/parameter_descriptions /clearpath/robots/default/ir/image_raw/theora/parameter_updates /clearpath/robots/default/openni_node1/parameter_descriptions /clearpath/robots/default/openni_node1/parameter_updates /clearpath/robots/default/projector/camera_info /clearpath/robots/default/rgb/camera_info /clearpath/robots/default/rgb/image_raw /clearpath/robots/default/rgb/image_raw/compressed /clearpath/robots/default/rgb/image_raw/compressed/parameter_descriptions /clearpath/robots/default/rgb/image_raw/compressed/parameter_updates /clearpath/robots/default/rgb/image_raw/theora /clearpath/robots/default/rgb/image_raw/theora/parameter_descriptions /clearpath/robots/default/rgb/image_raw/theora/parameter_updates


Here's the final output where the robot halts forever with no further action. I would like to point out here that even when it was working earlier it would always stop here but would still be working.


[ERROR] [WallTime: 1347026489.687828] Connection error on /dev/clearpath. Will retry every second.


Lastly, I also checked through rviz, however none of the topics like skim, passthrough or visualization had any output and they showed 0 messages received. Here it was interesting to note that skim was taking as input /camera/rgb/points as written in the launch file however, in rxgraph I found that the skim node had no input connection.

Looking for some good help. Thanks.

Would like to tag @Ryan , @Mark and @Eric .

Regards,


Originally posted by SivamPillai on ROS Answers with karma: 612 on 2012-09-07

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by SivamPillai with karma: 612 on 2012-09-07

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by SivamPillai on 2012-09-07:
Note that exactly the same modifications will have to be done on track_person.launch file as well.

Comment by Ryan on 2012-09-07:
Thanks for the feedback! For some background, this was originally developed for the Turtlebot, hence the namespace confusion. I'll pass these points on to some of our devs for incorporation.

$\endgroup$

Your Answer

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