blodow / realtime_urdf_filter

ROS package that can filter geometry defined in URDF models from Kinect depth images. Can also preprocess data for the OpenNI tracker, to remove backgrounds, robots etc.
Other
89 stars 46 forks source link

How can I use realtime_urdf_filter.launch in PR2? #4

Closed aginika closed 9 years ago

aginika commented 9 years ago

I changed original launch file and wrote as below, but the /openni/depth_registered_filtered/image_rect wasn't published as we expected.(We expected the arm pointclouds are removed.)

We also changed the filter parameters sometimes, but it didn't make a difference. How should change the setting or is there anything we need to do other than this?

realtime_urdf_filter.launch

<launch>
  <node
    pkg="realtime_urdf_filter" type="realtime_urdf_filter" name="$(anon realtime_urdf_filter)" output="screen">
    <remap from="~input_depth" to="/openni/depth_registered/image_raw"/>
    <remap from="~output_depth" to="/openni/depth_registered_filtered/image_rect" />
    <remap from="~output_mask" to="/urdf_filtered_mask" />

    <rosparam command="load" file="$(find realtime_urdf_filter)/launch/filter_parameters.yaml"/>
  </node>                 

  <!-- Load an example URDF -->
  <!-- <param name="robot_description" command="$(find xacro)/xacro.py '$(find realtime_urdf_filter)/urdf/example.urdf.xml'"/> -->

  <!-- <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"> -->
  <!--   <param name="tf_prefix" value="EXAMPLE"/> -->
  <!-- </node> -->
</launch>

fillter_paramters.xml

fixed_frame: /world
camera_frame: /openni_rgb_optical_frame
camera_offset:
  translation: [0.0, 0.0, 0.0]
  rotation:    [0.0, 0.0, 0.0, 1.0]
# There is one entry for each URDIF that should be filtered
models: 
- model: "robot_description"
  tf_prefix: ""
# how far in front of the robot model is still deleted? (e.g. 0.05 = 5cm)
depth_distance_threshold: 0.05
show_gui: true
filter_replace_value: 5.0

The output image is below. Top windows is show_gui's view and bottom window shows /openni/depth_registered_filtered/image_rect. screenshot_from_2015-01-20 20 54 53

Thanks.