{"id":31802045,"url":"https://github.com/ar90n/ros-gridmap-gen","last_synced_at":"2026-05-17T00:06:01.212Z","repository":{"id":312748049,"uuid":"1048348587","full_name":"ar90n/ros-gridmap-gen","owner":"ar90n","description":"SImple grid base ROS map generator","archived":false,"fork":false,"pushed_at":"2025-09-09T23:02:53.000Z","size":146,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-10T02:25:30.125Z","etag":null,"topics":["my-projects","occupancy-grid-map","ros","ros2-humble"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ar90n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-01T09:58:51.000Z","updated_at":"2025-09-09T23:02:57.000Z","dependencies_parsed_at":"2025-09-01T19:43:29.377Z","dependency_job_id":"9ba058ee-872c-4cee-80cb-22862028d81c","html_url":"https://github.com/ar90n/ros-gridmap-gen","commit_stats":null,"previous_names":["ar90n/ros-gridmap-gen"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ar90n/ros-gridmap-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar90n%2Fros-gridmap-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar90n%2Fros-gridmap-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar90n%2Fros-gridmap-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar90n%2Fros-gridmap-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ar90n","download_url":"https://codeload.github.com/ar90n/ros-gridmap-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar90n%2Fros-gridmap-gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005657,"owners_count":26083941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["my-projects","occupancy-grid-map","ros","ros2-humble"],"created_at":"2025-10-11T00:16:19.632Z","updated_at":"2025-10-11T00:16:24.964Z","avatar_url":"https://github.com/ar90n.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROS GridMap Generator\n\n[![CI](https://github.com/ar90n/ros-gridmap-gen/actions/workflows/ci.yml/badge.svg)](https://github.com/ar90n/ros-gridmap-gen/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n![Built with vibe coding](https://img.shields.io/badge/built%20with-vibe%20coding-ff69b4)\n\nA browser-based tool for creating and editing ROS occupancy grid maps (PGM + YAML) and Gazebo SDF world files.\n\n## 🚀 Demo\n\n[Live Demo](https://ar90n.github.io/ros-gridmap-gen/)\n\n## ✨ Features\n\n- **Grid Editing**: Create maps on 2×2 to 10×10 grids with intuitive wall placement\n- **Origin Setting**: Shift+click to set origin position and orientation (0°→90°→180°→270°)\n- **Cost Palette System**: 4 customizable cost values (0-254) with smooth color gradients\n- **Cell Cost Assignment**: Click cells to apply cost values, with visual feedback\n- **Configurable Parameters**: Adjustable resolution (m/px) and wall thickness (m)\n- **Multi-format Export**: PGM, ROS1/ROS2 YAML, and Gazebo SDF world files\n- **ZIP Download**: Download selected file formats bundled together\n- **URL Sharing**: Save and share complete map state via compressed URL\n\n## 🛠️ Tech Stack\n\n- **Framework**: Svelte 4\n- **Build Tool**: Vite\n- **Styling**: Tailwind CSS\n- **Language**: TypeScript\n- **Testing**: Vitest\n- **Deployment**: GitHub Pages\n\n## 📦 Development\n\n### Prerequisites\n- Node.js 18+\n- npm\n\n### Setup\n```bash\n# Install dependencies\nnpm install\n\n# Start development server\nnpm run dev\n\n# Run tests\nnpm run test\n\n# Build for production\nnpm run build\n```\n\n### Project Structure\n```\nsrc/\n├── core.ts              # Business logic (Pure functions)\n├── state.ts             # State management (Svelte Store + URL persistence)\n├── export.ts            # File export functionality (ZIP generation)\n├── App.svelte           # Main UI component with cost palette\n├── main.ts              # Entry point\n├── main.css             # Enhanced styles with animations\n└── types/               # Type definitions\n    └── jsoncrush.d.ts   # JSONCrush type declarations\n```\n\n## 🧪 Testing with Simulators\n\nDocker-based examples are provided to test exported maps with various simulators:\n\n```bash\ncd examples\nnode generate_sample_maps.cjs  # Generate sample maps\ndocker-compose run --rm gazebo-classic  # Test with Gazebo Classic\ndocker-compose run --rm gazebo-ignition  # Test with Gazebo Fortress\ndocker-compose run --rm mvsim  # Test with MVSim\ndocker-compose run --rm flatland  # Test with Flatland\n```\n\nSee [examples/README.md](examples/README.md) for detailed instructions.\n\n## 🚀 Deployment\n\n### GitHub Pages\nThis project automatically deploys to GitHub Pages using GitHub Actions.\n\n1. Enable Pages in your GitHub repository\n2. Go to Settings \u003e Pages \u003e Source: \"GitHub Actions\"\n3. Push to `main` branch to trigger automatic deployment\n\n### Manual Deployment\n```bash\nnpm run build\n# Upload the contents of the dist folder to any static file hosting\n```\n\n## 📋 Usage\n\n1. **Configure Grid**: Choose size (2×2 to 10×10), cell size, resolution, and wall parameters\n2. **Place Walls**: Click on grid edges to toggle walls ON/OFF with visual feedback\n3. **Set Origin**: Shift+click on cells to set origin, click same cell again to rotate (0°→90°→180°→270°)\n4. **Assign Cell Costs**: \n   - Select cost palette (0-254 range) in right panel\n   - Click cells to apply cost values\n   - Visual color gradient shows cost levels (white=free, red=high cost)\n   - Click same cell multiple times to cycle through palette\n5. **Export Maps**: Select desired formats (ROS1/ROS2 YAML, SDF) and download as ZIP\n\n## 🎯 Output File Formats\n\n### PGM (Portable Gray Map)\n- **Cost-based values**: 0-254 range (inverted: cost 0 → PGM 254, cost 254 → PGM 0)\n- **Free Space**: High PGM values (white-ish)\n- **Occupied**: Low PGM values (black)\n- **Unknown**: 205 (gray, boundary areas)\n- **Configurable wall thickness**: Converted from meters to pixels with ceiling expansion\n\n### YAML (ROS Map Server)\n- **ROS1 \u0026 ROS2 formats**: Compatible with map_server and nav2_map_server\n- **Configurable resolution**: Direct meters-per-pixel specification\n- **Origin coordinates**: Computed based on selected origin cell and rotation\n- **Occupancy thresholds**: Standard values for navigation\n\n### SDF (Gazebo World)\n- **Merged wall segments**: Continuous walls combined for efficiency\n- **Box models**: Each wall as static collision geometry\n- **Configurable parameters**: Wall height (m) and thickness (m)\n- **Coordinate alignment**: Matches top-down view input\n\n## 📜 License\n\nMIT License\n\n## 🤝 Contributing\n\nPull requests and issues are welcome!\n\n## 🔧 Technical Details\n\n### Coordinate Systems\n- **State**: Bottom-up (row=0 is bottom) with version migration support\n- **DOM**: Top-down (standard web coordinates)\n- **PGM**: Bottom-left origin with Y-axis inversion\n- **SDF**: Y-axis inverted to match top-down view input\n\n### Cost System\n- **4-value palette**: Customizable cost values (0-254)\n- **Index-based storage**: Cells reference palette indices for memory efficiency\n- **Color interpolation**: Smooth gradient between cost levels\n- **ROS compatibility**: Direct mapping to navigation cost values\n\n### URL Persistence\n- **JSONCrush compression**: Stores complete state in URL fragment (#s=)\n- **Auto-updates**: 150ms debounce for smooth editing\n- **Backward compatibility**: Migration system for state versions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Far90n%2Fros-gridmap-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Far90n%2Fros-gridmap-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Far90n%2Fros-gridmap-gen/lists"}