I need to know the detail of the frames of the Cartographer. Please check my understanding

I need to know the detail of the frames of the Cartographer. Please check my understanding.

I have read ‘REP 105 -- Coordinate Frames for Mobile Platforms (ROS.org)’, and ‘Setting Up Transformations — Navigation 2 1.0.0 documentation’, and ‘(new user link limit:discourse.ros.org/t/map-base-odom-as-alternative-for-rep-105-recommended-frame-order/25095/5.’

The basic relationship between ROS frames can be represented by the following figure.

map_frame

Since the SLAM can draw a map, using some number to represent the object of the world, the object shod be placed in the frame ‘map.’ Meanwhile, it can locate the robot, so the robot’s pose should be also represented in ‘map.’

tracking_frame

A robot is an object, rather than an ideal point in the world. So, if the SLAM wants to locate the robot, it should locate which part of the robot. Is it the robot’s head or its foot? The Cartographer algorithm suggests using the link where the IMU is installed. Good choice! This is usually the stable part of a robot.

This is strange!

Is it more direct if we use the same part that an odometry system is used to track the robot, e.g., the frame ‘base_link.’

published_frame

I do not fully understand this frame. I think the algorithm should publish TF information, which should be the relation between the frame ‘map’ to the frame ‘odom’. However, if the robot does not have an odometry system, the TF should directly connect ‘map’ to ‘base_link.’

This is strange!

Why not directly connect the frame ‘map’ to the ‘tracking_frame.’ Since this robot does not have an odometry system.

odom_frame

Is it the name of the odometry system’s frame?

provide_odom_frame = false, but use_odometry = true ???

The robot does not provide an odometry system because it can not provide an odometry frame. How can we use odometry? It cannot subscribe to the weel coder information, and it does not know the structure of the robot.

Other things:
The session is too short. I have to re-enter the lecture, again and again, each time I finish reading a part of the lecture.

Hello @bluebird,

I will try to answer your doubts piece by piece:

tracking_frame

Is it more direct if we use the same part that an odometry system is used to track the robot, e.g., the frame ‘base_link.’

If you are using an IMU cartographer suggest to use as tracking_frame the IMU frame. The reason for this is given by cartographer itself: “Transforming linear acceleration into the tracking frame will otherwise be imprecise”. It is not necessary to use the same frame as the odometry system (e.g. “base_link”) as everything gets transformed by the tf’s.

published_frame is the frame for the local map that cartographer is building. This is used during the process of building a map. The relation between the map and the odom frame that you mention is normally a task undertaken by a global localization system which at the point of building the map does not exist.

odom_frame

Is it the name of the odometry system’s frame?

The odom_frame is where cartographer publishes smooth (but drifitng) odometry-like localization in your tf tree. So what you set on odom_frame is relevant depending on how you configured the provide_odom_frame parameter. In the course example provide_odom_frame is set to false which means that Cartographer will NOT publish local, non closed loop localization.

The use_odometry refers to if cartographer should use the odom topic to fuse those values with it’s own calculations. As explained above provide_odom_frame just defines if cartographer should publish a local localization tf frame. So both parameters are unrelated.

Many of these subjects are related to SLAM theory which is not covered by the course. The aim of the Nav2 Course is to cover how to setup and run ros2 navigtion so there is not much room left for going into the details of SLAM which is why this part can be confusing. Nevertheless, I hope I could clarify your doubts a bit.

Cheers,

Roberto