Robotics StackExchange | Archived questions

Visual SLAM and coordinate frames for a mobile robot

[ROS Kinetic, Ubuntu 16.04]

Hello again. I followed tf tutorials, read REP103, REP105 and still having trouble setting coordinate systems for my mapping robot properly.

I get map->camera_optical transform from ORB-SLAM2 (version with ROS publishers from https://gitlab.tubit.tu-berlin.de/breakdowncookie/ORB_SLAM2). I will use that information to navigate my mobile robot with navigation stack. The robot has Raspberry Pi camera used for visual SLAM (visual odometry and obstacle detection implemented in that package). Robot has wheel encoders and uses diffdrivecontroller that publishes/could publish odom->base_link transform.

move_base's localcostmap requires some local reference frame - /odom would be perfect for that purpose. By contrast, globalcostmap requires global reference - it would be good to use /map for that.

This is my tf_tree just for tests, I thought everything was OK until I tried to use ORB-SLAM.

image description

Then I had to change tftree to following form to allow map->cameraoptical transform (cameraoptical must not have 2 parents - map and basecamera). Nevermind a lack of correspondence in frame names between 2 pictures, it's just to illustrate the structure. Also in the screen there is no map->camera_optical transform because ORB-SLAM wasn't running at the moment.

image description

The problem is - how can I set coordinate frames to make use of /map and /odom at the same time, while having map->camera_optical and odom->base_link transforms? I have no idea how to "divide" map->camera_optical transform into map->base_link and base_link->camera_optical. Is there any possibility to do that?

I would appreciate any help.

Asked by rayvburn on 2018-04-28 04:31:47 UTC

Comments

Confused by the statement "Then I had to change tf_tree to the following form to allow map->camera_optical transform (camera_optical must not have 2 parents - map and base_camera)". Can you explain? To me, the first connected tree looks perfectly fine.

Asked by robotchicken on 2018-04-28 11:49:43 UTC

If map->camera_optical is published by ORBSLAM, then you can write a tf broadcaster from camera_optical->base_link. This way all three transforms are connected in the tree.

Asked by robotchicken on 2018-04-28 12:14:57 UTC

Answers