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

Wierd TF tree when running RGB-D Slam

asked 2013-04-15 22:03:15 -0600

Karan gravatar image

updated 2014-01-28 17:16:12 -0600

ngrennan gravatar image

Hey, I have rgbdslam package installed which was released during end of February 2013.

I am running the Rgbdslam node using the following parameters for the frames.

<param name="config/fixed_frame_name"      value="/map"/>
<param name="config/base_frame_name"       value="/base_footprint"/>

Then i send the model from the GUI of the RGBDslam to the octomap server using the CTRL+M command. The Octomap server has the following params for the frames.

<param name="frame_id" type="string" value="/map" />
<param name="base_frame_id" value="/camera_rgb_optical_frame" />

Meanwhile in another terminal i use the command "rosrun tf view_frames".

The frame tree that is seen is displayed below.image description

As seen in the above screen shot there is a loop present in the tf tree which should not be there.

What could be a possible solution to the above problem.? Any help would be much appreciated.

--EDIT-- @tfoote I was able to write a tf broadcaster which would imitate the faulty tf tree. Here is a screenshot of the imitated faulty tree. image description

The three code snippets that were used were

      broadcaster.sendTransform(
        tf::StampedTransform(
          tf::Transform(odom_quat, tf::Vector3(0.0, 0.0, 0.0)),
          ros::Time::now(),"base_footprint", "map"));
      r.sleep();

      broadcaster.sendTransform(
        tf::StampedTransform(
          tf::Transform(odom_quat, tf::Vector3(0.0, 0.0, 0.0)),
          ros::Time::now(),"map", "base_footprint"));
      r.sleep();

      broadcaster.sendTransform(
        tf::StampedTransform(
          tf::Transform(odom_quat, tf::Vector3(0.0, 1.0, 2.0)),
          ros::Time::now(),"map", "where_mocap_should_be"));
      r.sleep();
edit retag flag offensive close merge delete

Comments

Looks like a bug. Does it cause any problems?

Felix Endres gravatar image Felix Endres  ( 2013-04-16 03:14:05 -0600 )edit

I tried to visualize the relative movements of frames in Rviz. The movement is not faulty which means that frames are moving the way the actual camera is moving. So no problem on that part. Is there some other problem which could bother later because of the faulty tf tree ..?

Karan gravatar image Karan  ( 2013-04-16 06:21:49 -0600 )edit

That is odd. Can you reproduce a graph like that using simple tf publisher examples?

tfoote gravatar image tfoote  ( 2013-04-16 09:22:50 -0600 )edit

@tfoote I have not really tried to imitate the tf tree using a self written tf publisher. How would this help.? I mean if i could write one how would it be useful in debugging the problem.?

Karan gravatar image Karan  ( 2013-04-16 20:20:44 -0600 )edit

I'd like to be able to isolate it and reproduce it for debugging/fixing as just a tf problem instead of needing to run the full rgbdslam system to test and debug. If you can reproduce it that way I'll turn it into a ticket.

tfoote gravatar image tfoote  ( 2013-04-16 20:28:29 -0600 )edit
tfoote gravatar image tfoote  ( 2013-04-17 08:29:59 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-04-17 02:04:29 -0600

I've checked it and it is a bug in rgbdslam. The periodic broadcaster sends a transform base->map, but when the clouds are sent (and with them the transforms) the transform goes map->base. I fixed that in the repository, so please update and rebuild.

To create octomaps, I would recommend using the internal function now. In the GUI use Data->Save octomap or use the service call: rosservice call /rgbdslam/ros_ui_s save_octomap filename.ot

edit flag offensive delete link more

Comments

The periodic broadcaster sends a transform base->map. But the frame map is parent of the frame base. Shouldn't the transform be map->base..? When i use fixed frame to be /map and base frame to be /base_footprint.

Karan gravatar image Karan  ( 2013-04-17 03:38:08 -0600 )edit

tf allows only one parent for each frame. I chose this direction, so that there can be another parent of the base frame, e.g. an odometry frame or a robot's base_link. While it might be unconventional, I am not aware of any disadvantages.

Felix Endres gravatar image Felix Endres  ( 2013-04-17 05:24:24 -0600 )edit

@Felix Endres Isn't the transformation published to be inverted if the nodes in the /tf tree are inverted ie. the parent becomes the child and the child the parent..? In rgbdslam is the /tf inverted..? Or should i listen to /map->/base tf and the tf library would do that for me.?

Karan gravatar image Karan  ( 2013-04-18 02:04:39 -0600 )edit

The tf library would do that. However, my "bugfix" actually introduced a problem. I am working on that and hope to update the repository later today.

Felix Endres gravatar image Felix Endres  ( 2013-04-18 04:59:01 -0600 )edit

Let me know when you update the repository so i would install the new one accordingly..

Karan gravatar image Karan  ( 2013-04-19 02:02:02 -0600 )edit

I just committed and hope it works now. Let me know.

Felix Endres gravatar image Felix Endres  ( 2013-04-19 02:15:18 -0600 )edit

@Felix Endres It works fine. There is no problem with tf tree now.

Karan gravatar image Karan  ( 2013-04-22 20:57:01 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-15 22:03:15 -0600

Seen: 711 times

Last updated: Apr 17 '13