Skip to content

Mapping

Match maps map2.yaml / map2.pbstream and the Cartographer mapping toolchain.

Match maps

FileRole
data/maps/map2.yamlOccupancy grid for map_server
data/maps/map2.pbstreamCartographer 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:

LocationContents
config/cartographer/Lua configuration
scripts/save_map.shSave yaml and pgm
scripts/save_pbstream.shSave pbstream
test/launch/cartographer_localization.launchDebug 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]
  1. Map the field online with Cartographer
  2. Save pbstream and yaml
  3. Copy them into raicom2026/data/maps/
  4. Mark waypoints with mark_waypoint*.py

How the match launch uses the map

nav_competition_2026.launch defaults to:

  • map → map2.yaml
  • pbstream → map2.pbstream
  • With loc_mode:=cartographer, cartographer_node loads the pbstream