0
$\begingroup$

Rosanswers logo

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 http://i65.tinypic.com/2430t9c.png

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 http://i64.tinypic.com/2eduix3.png


Originally posted by gijsje170 on ROS Answers with karma: 171 on 2016-10-27

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gijsje170 with karma: 171 on 2016-10-27

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by matlabbe on 2016-10-30:
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.

Comment by gijsje170 on 2016-10-31:
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

$\endgroup$

Your Answer

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