Mapping
Match maps map2.yaml / map2.pbstream and the Cartographer mapping toolchain.
Match maps
| File | Role |
|---|---|
data/maps/map2.yaml | Occupancy grid for map_server |
data/maps/map2.pbstream | Cartographer pure localization |
Both files must come from the same mapping run. After replacing the map, remeasure the waypoints (nav_competition.yaml).
Toolchain
The mapper itself is the external workspace ~/cartographer_ws. This repository provides:
| Location | Contents |
|---|---|
config/cartographer/ | Lua configuration |
scripts/save_map.sh | Save yaml and pgm |
scripts/save_pbstream.sh | Save pbstream |
test/launch/cartographer_localization.launch | Debug pure localization |
Mapping steps
flowchart LR
A[robot laser+odom] --> B[cartographer_ros]
B --> C[map2.pbstream]
B --> D[map2.yaml]
D --> E[map_server]
C --> F[pure localization]- Map the field online with Cartographer
- Save pbstream and yaml
- Copy them into
raicom2026/data/maps/ - Mark waypoints with
mark_waypoint*.py
How the match launch uses the map
nav_competition_2026.launch defaults to:
map→map2.yamlpbstream→map2.pbstream- With
loc_mode:=cartographer,cartographer_nodeloads the pbstream