Skip to content

feat: differential pcd map for RViz#80

Draft
shmpwk wants to merge 1 commit intotier4:beta/v0.64from
shmpwk:feat/differential_pcd_topic
Draft

feat: differential pcd map for RViz#80
shmpwk wants to merge 1 commit intotier4:beta/v0.64from
shmpwk:feat/differential_pcd_topic

Conversation

@shmpwk
Copy link
Copy Markdown

@shmpwk shmpwk commented Mar 8, 2026

Description

WIP


Title

Add differential pointcloud map visualization for RViz


Body

### Checklist

- [ ] I've read the contribution guidelines.
- [ ] I've searched other issues and no duplicate issues were found.
- [ ] I've agreed with the maintainers that I can plan this task.

### Description

Currently, RViz displays the pointcloud map by subscribing to `/map/pointcloud_map`, which is published by the pointcloud map loader as a **whole** map (all PCDs loaded at once). The **differential** pointcloud map is only used internally via the `GetDifferentialPointCloudMap` service (e.g. by NDT scan matcher and compare_map_segmentation) and is not visible in RViz.

This issue proposes adding an optional node that calls the existing differential map service and publishes the result to a topic so that RViz can display the same differential-loaded map (e.g. for debugging or when using divided maps without whole-map load).

### Purpose

Allow users to visualize the differential pointcloud map in RViz, so they can verify which map cells are loaded by the differential API and debug map loading behavior without enabling whole-map load.

### Possible approaches

- Add a new node `differential_pointcloud_map_visualizer` in the `autoware_map_loader` package that:
  - Calls `/map/get_differential_pointcloud_map` (existing service) at a configurable interval or on demand.
  - Merges the returned `new_pointcloud_with_ids` into a single `sensor_msgs/PointCloud2` and publishes to a topic (e.g. `output/differential_pointcloud_map`).
- Support parameters: `center_x`, `center_y`, `radius` for the queried area; optionally follow the vehicle pose (`use_pose`) and `update_interval_sec` for periodic updates.
- Add a launch argument (e.g. `enable_differential_pointcloud_map_visualizer`) so the node is started only when needed.
- RViz continues to subscribe to a topic; users add a PointCloud2 display with the new topic (e.g. `/map/differential_pointcloud_map`) when the feature is enabled.
- Rely on the existing divided map and metadata; no changes to the differential service itself.

### Definition of done

- [ ] Implement `differential_pointcloud_map_visualizer` node that calls `GetDifferentialPointCloudMap` and publishes merged PointCloud2 (using async callback to avoid executor conflict).
- [ ] Add parameters: `center_x`, `center_y`, `radius`, `use_pose`, `update_interval_sec` and config file.
- [ ] Integrate into map launch files (e.g. `autoware_core_map.launch.xml` and tier4 `map.launch.xml`) behind an optional argument.
- [ ] Document in the map_loader README how to enable the visualizer and which RViz topic to use.

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 8, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant