https://serboba.github.io/occupancy-editor/
A modern web-based occupancy grid editor for robotics. Create, edit, and export occupancy maps with support for ROS, CSV, JSON, and PNG formats. Features include start/goal placement, relative coordinate systems, and grid generation tools.
- Drawing Tools: Pencil, Rectangle, and Eraser for precise map creation
- Start/Goal Points: Set navigation start and goal positions with visual markers
- Interactive Resizing: Dynamically expand or crop your map in any direction
- Recenter View: Center the viewport on the start point
- Relative Coordinates: Display coordinates relative to the start point (0,0 at start)
Built-in tools to generate test environments:
- Maze Generator: Recursive Backtracker algorithm for perfect mazes
- Bugtrap Generator: Creates U-shaped local minima traps for testing
- Random Obstacles: Scatter geometric shapes with rejection sampling
- ROS: Standard
.pgmand.yamlfiles fornav2_map_server - CSV: Grid data with start/goal metadata
- JSON: Complete grid state with metadata
- PNG: Visual representation of the occupancy grid
- Start at (0,0): Option to export with origin shifted to start point
- Stack: React, TypeScript, Vite
- Performance: Canvas-based rendering optimized for large grids
- Zero-Install: Runs entirely in the browser
- No Backend: Fully client-side application
- Node.js (v18 or higher)
-
Clone the repository:
git clone git@github.com:serboba/occupancy-editor.git cd occupancy-editor -
Install dependencies:
npm install
Start the development server:
npm run devOpen http://localhost:5173 to view the editor.
npm run buildThe dist/ directory contains the static files ready for deployment.
- Draw Your Map: Use the pencil, rectangle, or eraser tools to create obstacles
- Set Start/Goal: Click the start/goal buttons and place points on the map
- Adjust View: Pan (right-click drag), zoom (mouse wheel), or use "Center on Start"
- Toggle Coordinates: Enable "Use (0,0) at Start" to see relative coordinates
- Export: Choose your format (ROS, CSV, JSON, or PNG) and download
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.


