Robotics StackExchange | Archived questions

How to publish a map frame?

I'm working on ardrone2.0. I'm trying to fuse odometry and imu through robotlocalisation. It works fine in simulation. I'm achieving tf tree like map>odom>baselink>imu. But when I want to try that on the real drone, I don't know how to publish a map frame like a coordinate system. In the simulation, the gazebo provides a map frame through map_server. But in the real world how to publish that frame? My tf tree looks like this:

image description

Thanks in advance :)

Asked by GLV on 2019-05-22 02:33:59 UTC

Comments

Could you also post your tf tree when you are running your simulation on Gazebo?

Asked by curi_ROS on 2019-05-22 03:23:42 UTC

Answers

Map server doesn't actually provide a map frame. It provides the data on the topic /map with a desired frame_id in the header. What you need is a node that provides the transform between map and odom frames.

Do you already have a map of the surroundings? If not, you can use SLAM algorithms to map + localise. There are many camera-based SLAM algorithms like OrbSLAM2 or RTABMap.

Since you are using a UAV, AMCL may not be the best solution, because you will first have to convert your camera data to laser scan data and that laser scan data will differ with changes in height.

Another option (though I have no experience with it) is Cartographer. It allows you to first create a map and then perform pure localization in a 3D environment.

Asked by curi_ROS on 2019-05-22 03:22:29 UTC

Comments

will I get odometry/filtered values like robot_localization by doing SLAM?

Asked by GLV on 2019-05-22 04:26:40 UTC

SLAM is not always a replacement for an odometry source. You are using robot_localization with visual odometry sources to get /odometry/filtered. It can help to improve the performance of a SLAM algorithm. It depends on the SLAM algorithm, some like RTABMap require odometry and some like Cartographer can be used also without odometry. SLAM will give you the transform between map->base_link, if your world frame is map. Depending on the SLAM algorithm you choose, make sure that the required transforms are provided by you, specifically odom->base_link. Read the REP105 for more clarity.

Asked by curi_ROS on 2019-05-22 04:56:15 UTC