ZERO Notificatons

NO Feedback yet!!

okay

xparo
X.P.A.R.O



ROS Map Editor

Open a ROS occupancy grid (.pgm + .yaml), erase stray LiDAR points, paint walls and keep-out zones, then export both files for Nav2.

Open a map

Or start a blank map

Paint

Metadata (.yaml)

Origin [x, y, yaw]

Standard ROS colours (negate: 0): white = free (254), black = occupied (0), grey = unknown (205). Every stroke writes exactly one of these values, so no grey fringes end up in the map. Everything runs in your browser; nothing is uploaded.

How to edit a ROS map

  1. Open both files. Choose the .pgm image first, then the .yaml file saved next to it by map_saver_cli or slam_toolbox. The metadata panel fills in from the YAML.
  2. Zoom in and pick a brush. Use Free to erase stray LiDAR returns, people who walked through the scan and noise in open areas. Use Occupied to close gaps in walls, such as glass doors the laser saw through.
  3. Mark areas the robot must avoid. The keep-out rectangle paints a solid occupied block. Use it for stairs, drop-offs and areas the robot must never plan through.
  4. Check the metadata. Leave resolution and origin alone unless you know they are wrong: they decide where the map sits in the world, and changing them shifts every saved goal.
  5. Export both files. Download the .pgm and .yaml, copy them over the originals (keep a backup), and restart map_server or reload the map in Nav2.

How the colours become a costmap

In the default trinary mode, map_server converts every pixel to an occupancy probability and then to one of three states, using the thresholds in the YAML file:

p = (255 − pixel) ÷ 255 (negate: 0) p > occupied_thresh → occupied (100) p < free_thresh → free (0) otherwise → unknown (−1)

A pixel of 0 gives p = 1.0 (occupied) and 254 gives p ≈ 0.004 (free). The grey 205 gives p ≈ 0.19608, just above 0.196, so whether it means unknown depends on free_thresh. We loaded the maps that ship with Nav2 on ROS 2 Jazzy into its map_server and counted the result: with free_thresh 0.196 or 0.1, grey pixels came out unknown; with 0.25, as in the shipped depot map, every grey pixel came out free. Maps saved with Nav2's map_saver_cli are written with 0.196, which is safe; hand-written or edited YAML files are where 0.25 creeps in. If you want unexplored space to stay unknown, keep free_thresh at 0.196 or lower; the editor warns you and can fix it.

That is also why the editor paints exactly 0, 254 and 205, and why a soft-edged brush from an ordinary image editor causes trouble: its in-between grey edge pixels land in whichever band the thresholds put them, leaving a ring of speckles around every stroke.

What to fix, and what to leave alone

Keep the original files. Map edits are easy to make and hard to undo once a fleet has been running on them for a while.

Frequently asked questions

Which colour means what in a ROS map?

With negate: 0, white (254) is free space and black (0) is occupied. Mid grey (205) is unknown only while free_thresh is 0.196 or lower; with a higher value, such as the 0.25 in some example maps, map_server loads it as free. The editor paints exactly these values and tells you how your thresholds will read them.

Will editing the map change its position?

No. Painting changes pixels only. The origin and resolution in the YAML decide where the map sits in the world, and the editor keeps them unless you change them.

How do I make a keep-out zone?

For a hard ban, paint the area occupied in the map itself. For a zone you can switch on and off, paint it in a separate mask map and load it with Nav2's keepout costmap filter, as the guide explains.

Why does my map look flipped or inverted?

A map saved with negate: 1 stores free and occupied the other way round. Tick negate in the metadata panel so the YAML matches the image.

Guides for this tool

In-depth articles that explain the ideas behind the ROS Map Editor, with worked examples.

ROS Map Editor has its own project page with the story behind the tool, a gallery and every guide in one place.

Visit the project page →

More free tools

Every tool runs in your browser. Nothing you enter is uploaded.