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

Rtabmap transform error with kinect

asked 2016-10-27 04:07:49 -0600

gijsje170 gravatar image

updated 2016-11-01 08:23:20 -0600

So I want to use rtabmap in order to map my environment. I am using Freenect to extract the data from the kinect using roslaunch freenect_launch freenect-registered-xyzrgb.launch Then i want to run roslaunch rtabmap_ros kinectlaser.launch where kinectlaser consists of the following link : kinectlaser.launch

Unfortunately I am encountering an TF error which says

[ WARN] [1477558055.097346892]: rtabmap: Could not get transform from base_link to camera_rgb_optical_frame after 0.200000 seconds (for stamp=1477558054.541588)!

[ERROR] [1477558055.097900220]: TF of received depth image 0 at time 1477558054.541588s is not set, aborting rtabmap update.

[ WARN] [1477558056.855120061]: rtabmap: Could not get transform from base_link to camera_rgb_optical_frame after 0.200000 seconds (for stamp=1477558056.609746)!

[ERROR] [1477558056.855669588]: TF of received depth image 0 at time 1477558056.609746s is not set, aborting rtabmap update.

Also when looking into my tf_view I can only see odom, base_footprint, base_link and specific topics for my roomba.

As can be seen in the tf tree this is because camera_rgb_optical_frame is not present in the tf tree image description

This is the same when using freenect.launch and freenect-registered-xyzrgb.launch. Probably the problem is within the freenect package. The best way to solve this is to add the following lines to /opt/ros/kinetic/share/freenect_launch/launch/freenect.launch:

<node pkg=" tf"  type=" static_transform_publisher" name="depth_frame" args="0 0 0 0 0 0 /base_link /camera_depth_frame 100"/>
<node pkg=" tf"  type=" static_transform_publisher" name="rgb_frame" args="0 0 0 0 0 0 /base_link /camera_rgb_optical_frame 100"/>

To see what the numbers mean please visit this link static-transform-publisher And finally you will also see the /camera_depth_frame and /camera_optical_rgb_frame in the tf tree.

In my image i attached them to the odom to make it easily visible but it is best to connect it to the base_link. image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-10-27 04:42:19 -0600

gijsje170 gravatar image

updated 2016-10-27 04:43:02 -0600

So after adding: <node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 1 link1_parent link1 100" /> To my launch file it finally works. Although I am not sure if this is the best solution it is atleast a solution that works. I did this for the camera_rgb_optical_frame and the camera_depth_frame.

edit flag offensive delete link more

Comments

1

Yeah it looks to be a TF problem. To help better people answering your question, add your TF tree generated by "$ rosrun tf view_frames" in the question.

matlabbe gravatar image matlabbe  ( 2016-10-30 15:25:02 -0600 )edit
1

Strangely enough it now works even without the lines so guess it is fixed? edit: Now I have the same error I will add the screens and try to explain why this is happening

gijsje170 gravatar image gijsje170  ( 2016-10-31 07:16:40 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-27 04:07:49 -0600

Seen: 1,109 times

Last updated: Nov 01 '16