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

How to publish a map frame?

asked 2019-05-22 02:33:59 -0500

GLV gravatar image

I'm working on ardrone2.0. I'm trying to fuse odometry and imu through robot_localisation. It works fine in simulation. I'm achieving tf tree like map>odom>base_link>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 :)

edit retag flag offensive close merge delete

Comments

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

curi_ROS gravatar image curi_ROS  ( 2019-05-22 03:23:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-05-22 03:22:29 -0500

curi_ROS gravatar image

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.

edit flag offensive delete link more

Comments

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

GLV gravatar image GLV  ( 2019-05-22 04:26:40 -0500 )edit
1

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.

curi_ROS gravatar image curi_ROS  ( 2019-05-22 04:56:15 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-05-22 02:33:59 -0500

Seen: 3,966 times

Last updated: May 22 '19