Skip to content

feat:Add a very rudimentary way of loading maps#22

Merged
arjo129 merged 7 commits into
epic/next-gen-basefrom
arjoc/feat/map-occupancy-grid-rebased
Jul 6, 2026
Merged

feat:Add a very rudimentary way of loading maps#22
arjo129 merged 7 commits into
epic/next-gen-basefrom
arjoc/feat/map-occupancy-grid-rebased

Conversation

@arjo129

@arjo129 arjo129 commented Jun 25, 2026

Copy link
Copy Markdown
Member

New feature implementation

Related to #12

Implemented feature

Adds a very rudimentary way of loading environment maps. This is by no means a final approach to loading maps, but it provides a high level way of representing them for the time being.

Implementation description

We subscribe to the /map topic to listen for OccupancyGrids. It gets converted internally to a Map struct

Test it

Use the launch file provided by demo_map.launch.py . It spins up a ROS 2 map_server loaded with a custom 20x20 grid map (demo_grid.png) and activates it. The dashboard subscribes to /map and visualizes it as a background layer.

Run the launch file:

ros2 launch rmf_path_server_demo demo_map.launch.py
  • Open http://localhost:8080 in your web browser.
  • The canvas will automatically fit to the 20x20 grid map.
  • You can add robots and set goals as in the default mode, and see the map obstacles (a box in the center) drawn on the canvas.

GenAI Use

We follow OSRA's policy on GenAI tools

  • I used a GenAI tool in this PR.
  • I did not use GenAI

Generated-by: Gemini Pro 3.1

arjo129 added 2 commits June 25, 2026 04:25
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
@arjo129
arjo129 force-pushed the arjoc/feat/map-occupancy-grid-rebased branch from c5cfee4 to 51be638 Compare June 25, 2026 04:26
@arjo129 arjo129 changed the title Add a very rudimentary way of loading maps feat:Add a very rudimentary way of loading maps Jun 25, 2026
@mxgrey mxgrey moved this from Inbox to In Progress in PMC Board Jun 30, 2026
arjo129 added 2 commits July 3, 2026 08:38
…/feat/map-occupancy-grid-rebased

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
- Added demo_map.launch.py to launch map_server with a custom 20x20 grid map.
- Added python script to generate the map image (demo_grid.png) with a box in the center.
- Updated robot_spawner to subscribe to /map and serve it via HTTP.
- Updated web visualizer (app.js) to fetch and render the grid map.
- Merged upstream/epic/next-gen-base and resolved conflicts to keep reservation config features.

TAG=agy

CONV=e4b3007e-b76e-47c3-a222-643694470b82

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
@arjo129
arjo129 marked this pull request as ready for review July 6, 2026 01:35
@arjo129

arjo129 commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@SamuelFoo Feel free to review this.

@arjo129
arjo129 requested a review from xiyuoh July 6, 2026 05:25

@xiyuoh xiyuoh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works great for me! Just left some minor nit comments for formatting

Comment thread path_server/rmf_path_server/src/lib.rs Outdated
Comment thread path_server/rmf_path_server/src/lib.rs Outdated
pub current_planning_session: Option<u64>,
pub footprints: Arc<std::sync::Mutex<HashMap<String, f32>>>,
pub active_plan_ids: HashMap<String, PlanId>,
pub map: Arc<Map>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can explore other ways of storing/manipulating Map (and other PlanServer members). Understood that it's expensive to clone so wrapping it with Arc is a good strategy here. Perhaps if we integrate with Bevy in the future we could make use of Resource or something. But not a blocker for this PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Id be open to moving this to bevy_ros2 if it provides a better Developer Experience. We could put this as a future roadmap item. For now Im using the bare minimum to get an MVP out.

arjo129 and others added 3 commits July 6, 2026 15:06
Co-authored-by: Xiyu <ohxiyu@gmail.com>
Signed-off-by: Arjo Chakravarty <arjo129@gmail.com>
Co-authored-by: Xiyu <ohxiyu@gmail.com>
Signed-off-by: Arjo Chakravarty <arjo129@gmail.com>
Signed-off-by: Arjo Chakravarty <arjo129@gmail.com>
@arjo129
arjo129 merged commit cef7fc2 into epic/next-gen-base Jul 6, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in PMC Board Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants