Need a theoretical explanation about the Cartographer's file submap_painter.cc, especially the function CairoPaintSubmapSlices and the function PaintSubmapSlices. [closed]

asked 2023-05-07 09:49:02 -0500

BlueBird gravatar image

Need a theoretical explanation about the Cartographer's file submap_painter.cc, especially the function CairoPaintSubmapSlices and the function PaintSubmapSlices.

I understand that a big map contains a lot of sub-maps. The two functions mentioned above try to paste sub-maps together so we can get a complete map. There is a ROS message called submap_list that contains a field called pose. The pose seems like indicate the origin of the sub-map in the word coordinate. We can consider it as a transformation matrix T1. Additionally, there also has a field called the slice_pose of texture. We can get it by calling the service SumbapQuery. It seems can change the pixel coordinate of the submap to the local coordinate of the submap. Let's consider it T2.

But, what we want is the pixel coordinate of the complete map. By knowing this, we can paste the pixels of the sub-map into a big complete map. I know the function CairoPaintSubmapSlices and the function PaintSubmapSlices can do the job; however, I cannot understand exactly how.

By the way, there can be a lot of textures in the response of the service SumbapQuery. Why do we only want the first texture? What is the usage of the other textures?

There are two fields of submap_version. One is in the message of submap_list; the other is in the response of the service SumbapQuery. What is the difference between the two versions?

I try to read the code; however, it uses a lot of Cairo library. It will be much easier if I have a theoretical explanation about how the sub-maps are been merged.

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by gvdhoorn
close date 2023-05-08 02:04:14.406684

Comments

I can understand why you'd post this here, as Cartographer is used often with ROS, but it is not part of ROS, nor are the questions you post here ROS-specific. Even the fork of Cartographer in the ros2 organisation you link is just there to be able to use Cartographer with ROS. It's not the main place of development, nor do the (main) developers of Cartographer frequent that repository, nor this forum.

I'd suggest to repost your question(s) on something like Robotics Stack Exchange, or another, more suitable, venue.

gvdhoorn gravatar image gvdhoorn  ( 2023-05-08 02:05:17 -0500 )edit