> For the complete documentation index, see [llms.txt](https://docs.openmind.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openmind.com/full-autonomy-guidelines/features/keepout-zones.md).

# Keep-out Zones

Mark no-go areas on a map that the robot's autonomy avoids.

A keep-out zone is an area of a map you want the robot to stay out of — a loading bay, a spill, a section under maintenance. You draw the zones as polygons on a map, and live consumers of the map (for example [person-following](/full-autonomy-guidelines/features/person-following.md)) avoid them. Zones are stored per map, so each space carries its own no-go areas.

Under the hood, a saved zone set is written next to the map as `<zone_name>.keepout.geojson`, and a publisher node watches that file and re-publishes it on `/keepout/zones` for anything that needs it — so an update takes effect without a restart.

### Saving a zone set

Zones are **GeoJSON polygons**. Save a named set for a map:

```bash
curl -X POST http://<robot>:5000/maps/keepout/save \
  -H 'Content-Type: application/json' \
  -d '{
    "map_name": "office",
    "zone_name": "loading_bay",
    "geojson": {
      "type": "FeatureCollection",
      "features": [
        {"type": "Feature",
         "geometry": {"type": "Polygon",
           "coordinates": [[[1.0, 1.0], [3.0, 1.0], [3.0, 2.5], [1.0, 2.5], [1.0, 1.0]]]},
         "properties": {"name": "loading_bay"}}
      ]
    }
  }'
```

### Managing zones

```bash
curl "http://<robot>:5000/maps/keepout/list?map_name=office"        # all zone sets on a map
curl "http://<robot>:5000/maps/keepout/get?map_name=office&zone_name=loading_bay"
curl -X POST http://<robot>:5000/maps/keepout/delete \
  -H 'Content-Type: application/json' -d '{"map_name": "office", "zone_name": "loading_bay"}'
```

### Parameters

`POST /maps/keepout/save`

| Parameter   | Type   | Required | Description                                           |
| ----------- | ------ | -------- | ----------------------------------------------------- |
| `map_name`  | string | yes      | The map the zones belong to (must already exist)      |
| `zone_name` | string | yes      | Name for this zone set — no `/`, `\`, `..`, or spaces |
| `geojson`   | object | yes      | A GeoJSON `FeatureCollection` of `Polygon` features   |

### If something goes wrong

* **`400` "required"** — `map_name`, `zone_name`, and `geojson` are all mandatory.
* **`400` "Invalid zone\_name"** — the name contains `/`, `\`, `..`, or a space.
* **`400` map missing** — the map directory doesn't exist; save the [map](/full-autonomy-guidelines/features/maps-routes-locations.md) first.

For system endpoints like `GET /status` and base control, see the [Autonomy API Overview](/full-autonomy-guidelines/api_endpoints.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openmind.com/full-autonomy-guidelines/features/keepout-zones.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
