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

Kinect explore.launch failed again in Husky A200

asked 2012-09-07 04:08:35 -0500

updated 2016-10-24 09:00:17 -0500

ngrennan gravatar image

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>

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

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

</group>

</launch>


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 ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-09-07 07:54:28 -0500

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.

edit flag offensive delete link more

Comments

Note that exactly the same modifications will have to be done on track_person.launch file as well.

SivamPillai gravatar image SivamPillai  ( 2012-09-07 07:55:05 -0500 )edit

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.

Ryan gravatar image Ryan  ( 2012-09-07 10:48:21 -0500 )edit
0

answered 2012-09-07 04:20:17 -0500

dornhege gravatar image

Judging from the error message it looks like there is a low-level problem on the device/robot. Is the device actually there and has sufficient permissions? Can you check dmesg output?

edit flag offensive delete link more

Comments

I have done a dmesg check and kinect is visible and has been allotted the required ports. I have also seen kiect working with other programs of mine.

SivamPillai gravatar image SivamPillai  ( 2012-09-07 04:47:31 -0500 )edit

It's not the kinect, the error states /dev/clearpath.

dornhege gravatar image dornhege  ( 2012-09-07 05:30:54 -0500 )edit

As far as the clearpath devices are concerned one of the key thing to be done is adding the clearpath.rules file to udev folder and this I have already done as well.

SivamPillai gravatar image SivamPillai  ( 2012-09-07 05:36:07 -0500 )edit

Did you check that it actually worked, i.e. there is a device with correct permissions? For later testing, you should first run the robot launch only.

dornhege gravatar image dornhege  ( 2012-09-07 05:38:41 -0500 )edit

Yes there is one. Because as I stated earlier other codes that I have built work perfectly normal. They use the sensors and actuate the motors and everything goes just fine except explore.launch and track_person.launch.

SivamPillai gravatar image SivamPillai  ( 2012-09-07 05:42:10 -0500 )edit

So, the error might actually be independent of your actual problem and "normal"? -- Another reason might be the kinect topic. If I read the launch correctly it uses /camera/rgb/points. It might now be /camera/depth_registered/points or something. You should check in rviz and update the launch file.

dornhege gravatar image dornhege  ( 2012-09-07 05:47:00 -0500 )edit

Hey I got the error succefully... Will post the answer shortly

SivamPillai gravatar image SivamPillai  ( 2012-09-07 07:31:05 -0500 )edit

@dornhege its true that /camera/rgb/points has to be changed as /camera/depth_registered/points. However, i had done this long back but forgot to update here. the error was about the namespace as I had observed in the beginning.

SivamPillai gravatar image SivamPillai  ( 2012-09-07 07:43:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-09-07 04:08:35 -0500

Seen: 299 times

Last updated: Sep 07 '12