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

How to change parent in tf tree

asked 2019-02-04 10:08:34 -0500

wurschtel gravatar image

Hi, I am trying to evaluate a SLAM algorithm within gazebo 7.0, ROS Kinetic running on Ubuntu 16.04

This algorithm provides me a transform between the (estimated) camera and the resulting point cloud. The input source is a cam rigidly attached to a drone for which I gain a TF tree connected to the world frame.

My idea was to:

1) initially provide a fixed transform between the estimated camera link and the actual camera link when the drone is in the starting position. (with no/zero transform and rotation) resulting in the following (simplified) tree world->drone->camera/estimated camera->point cloud

2) getting the transform with a listener from world to the point cloud (world->point cloud)

3) inverse the transform between the estimated camera and the point cloud (point cloud->camera)

4) apply the transform (world->point cloud) instead of the one between the camera and estimated camera to get:

    |---->point cloud->estimated camera

unfortunately I could not find out how to remove the old parent (estimated camera) form the the point cloud and therefore get an circular tf dependency instead.

could somebody give me a hint how to or am I following a completely wrong/unsupported idea? (the final goal would be to compare the error/offset between the two frames of the cameras)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-04 10:45:33 -0500

You do not want to be changing the parent child order of the TF tree in any way, it's not designed to work that way and all sorts of things will go wrong.

In your section one you describe a transform from the world to the drone. This is the transformation your pose estimation algorithm needs to produce. If you have a system that can estimate the position of the world (point cloud) relative to the camera you will need to convert that pose so that it describes the pose of the drone in the world coordinate system, then publish that. That way the TF tree stays in the same order.

Hope this helps.

edit flag offensive delete link more

Question Tools



Asked: 2019-02-04 10:08:34 -0500

Seen: 915 times

Last updated: Feb 04 '19