How to filter robot from Microsoft Kinect v2 depth images for use with rtabmap?

asked 2017-09-19 09:33:29 -0500

budekatude gravatar image

Hi again,

I've been trying to create a collision map of the surroundings (with rtabmap) for a Universal Robot ur5 using a Microsoft Kinect v2 mounted to an elbow close to the end effector of the robot. I am using ROS Indigo and Ubuntu 14.04.

The mapping works fine thanks to the awesome help of this community. But the robot will still see itself from time to time, which will create artifacts within the created map. These I want to filter from the images with information from the URDF file.

Fortunately the filter module already exists here, and I think I've made some progress setting it up. I am calling the filter module in my .launch file:

<!--Filter robot from depth images with realtime urdf filter package-->
<node pkg="realtime_urdf_filter" type="realtime_urdf_filter" name="realtime_urdf_filter" output="screen">
    <remap from="~input_depth" to="/kinect2/qhd/image_depth_rect"/>
    <remap from="~output_depth" to="/realtime_urdf_filter/robot_filtered" />
    <remap from="~output_mask" to="/urdf_filtered_mask" />
    <rosparam command="load" file="$(find realtime_urdf_filter)/launch/filter_parameters.yaml"/>
</node>

I've set up the filter_parameters.yaml file accordingly:

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

However every time I start the filter, it crashes immediately creating the following error code:

[realtime_urdf_filter-13] process has died [pid 7618, exit code -6, cmd /home/matthias/catkin_ws/devel/lib/realtime_urdf_filter/realtime_urdf_filter ~input_depth:=/kinect2/qhd/image_depth_rect ~output_depth:=/realtime_urdf_filter/robot_filtered ~output_mask:=/urdf_filtered_mask __name:=realtime_urdf_filter __log:=/home/matthias/.ros/log/eb3857ca-9d56-11e7-998d-68f7289ab1c5/realtime_urdf_filter-13.log].
log file: /home/matthias/.ros/log/eb3857ca-9d56-11e7-998d-68f7289ab1c5/realtime_urdf_filter-13*.log

Any suggestions what it could be related to? ...or any hints how to set it up correctly or where to look would really make my day!

P.S.: Even an alternative way to get the robot out of the rtabmap would be a bonus!

edit retag flag offensive close merge delete

Comments

gvdhoorn gravatar image gvdhoorn  ( 2017-09-20 15:59:10 -0500 )edit