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

Create world frame

asked 2019-07-16 13:25:41 -0500

Dylan gravatar image

updated 2019-07-18 07:36:29 -0500

I need to use the SVO package for Visual Odometry, so I need the world frame because it gives me the pose relative to that frame, but I'm not using it so I need to create it.

This is a simplified tf_frame graph of my project:

image description

and I would like to create a broadcast between odom and world, or between any frame and world. What do you suggest?

Edit: with the help of PeteBlackerThe3rd, now the rqt_tf_tree is:

image description

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-07-17 04:17:53 -0500

You don't create individual frames in ROS you define the relationships between them. Looking at your tf_frame graph, the SVO package has already created by world frame by defining the relationship between the camera and the world.

Your problem here is that you have two unconnected TF trees, is the camera used by SVO either the bottom cam or front cam on your drone? If so then you simply need to update the name of the cam_pos frame used by SVO to match the appropriate camera on your drone. If it's a different camera then you need to create an additional static transform defining the position of that camera within your ardrone_base_link frame.

Hope this helps.

edit flag offensive delete link more


Thanks for your answer! The camera used by the SVO package is the bottom camera of my drone. I couldn’t find where to change the cam_pos for ardrone_bottom_camera, or where to change the world frame. Do you recommend to change the cam_pos for the bottom camera’s node? How can I do that? Thanks

Dylan gravatar image Dylan  ( 2019-07-17 08:07:52 -0500 )edit

looking at the source code of the visualiser node, the frame_id cam_pos is hard coded into SVO. If you edit this code so that the frame_id is ardrone_base_bottomcam instead then it should link up your TF tree. Let us know how you get on.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-07-17 09:56:37 -0500 )edit

I changed msg.header.frame_id = "/world"; for msg.header.frame_id = "/ardrone_base_bottomcam"; and the rqt_tf_tree is the same as the image I posted in the main post.

Dylan gravatar image Dylan  ( 2019-07-17 22:30:06 -0500 )edit

You want to change cam_pos to ardrone_base_bottomcam not world. Also where did you change this? Finally if you don't see any change it sounds like you didn't re-build the appropriate package.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-07-18 05:55:59 -0500 )edit

OK, now I understand perfectly. I pasted the new tf_tree in the main post. So, now the node svo makes the transformation between the bottom camera and another frame (it's called world, but I can change that name). But what does that mean?

Dylan gravatar image Dylan  ( 2019-07-18 07:38:37 -0500 )edit

Glad you've got these connected now. As for what it means, well. The SVO node will be updating the position of the world frame relative to your drone as it moves. Since this is odometry only it will be relative to the location of the drone when the SVO node was started.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-07-18 08:23:55 -0500 )edit

The output topic of the SVO is /svo/points or /svo/pose? both give me the 6-grade pose, but /svo/pose just publishes once in a while, and /svo/points at a much higher rate. Those positions are the displacement between the starting position and the actual position?

Dylan gravatar image Dylan  ( 2019-07-18 08:26:42 -0500 )edit

Question Tools



Asked: 2019-07-16 13:25:41 -0500

Seen: 1,412 times

Last updated: Jul 18 '19