More questions about Cartographer’s Lua configuration file

num_point_clouds
Is this for 3D Scanner?

landmarks_sampling_ratio

Tell more about this landmark. Is it the point which localization is known? How to publish the known place to cartographer?

Hello @bluebird,

num_point_clouds
Is this for 3D Scanner?

Cartographer supports multiple inputs on range data. This means that you could have one, two or three laser scanners on your robot and cartographer could use the data from all of them. Cartographer is flexible in the sense that you can use one of the following message types: sensor_msgs/LaserScan, sensor_msgs/MultiEchoLaserScan or sensor_msgs/PointCloud2 . However you have to pick one type of range data message and stick to it. You can’t mix them.

The ROS2 Navigation Course uses the Turtlebot3 Burger for simulation and the ranging data gets published on topic /scan. If you do a
ros2 topic info /scan -v
You will see that the type of message is sensor_msgs/msg/LaserScan.
This means that we use sensor_msgs/LaserScan messages. This is important because the parameter num_point_clouds is only relevant if you ranging device uses messages of type sensor_msgs/PointCloud2 messages which is not the case in the simulation of the course.

If, on a different project, you go the route of using sensor_msgs/PointCloud2 messages num_point_clouds is the parameter that sets the number of sources that you want to use (1,2,3 or more devices/topics).

landmarks_sampling_ratio

Tell more about this landmark. Is it the point which localization is known? How to publish the known place to cartographer?

Generally speaking landmarks are spatial features which, because of their structure, are easily noticed, quickly recognizable and stand out from the environment. landmarks_sampling_ratio is used to define the subset of landmark observations to be considered for loop closures. Of course this only applies if you configure cartographer to include landmark observations which is not the case in the ros2 navigation course (you can see that use_landmarks = false).

Up until know I haven’t worked with Cartographer and landmarks so unfortunately I am not able to help you further in this matter. However if you are interested into going deeper into the specifics of cartographer I can highly recommend to check the original documentation site (Cartographer ROS Integration — Cartographer ROS documentation). It goes into much greater detail on the wide range of options the cartographer has available.

I hope I could help you with my input.

Cheers,

Roberto