Skip to content

Conversation

@Idate96
Copy link
Contributor

@Idate96 Idate96 commented Dec 1, 2025

Summary

Extracts useful non-conflicting enhancements from dev/ros2/update_map_rebase while keeping our column-major standardization approach.

Changes:

  1. _map_extent_from_mask() in elevation_mapping.py - Computes actual footprint based on valid mask for more accurate coordinate logging
  2. Full-length map support in masked_replace_tool.py - New CLI arguments to send full-size maps with embedded patches

New CLI arguments for masked_replace_tool.py:

  • --full-length-x: Total GridMap length in X (meters)
  • --full-length-y: Total GridMap length in Y (meters)
  • --full-center-x: GridMap center X for full-size map
  • --full-center-y: GridMap center Y for full-size map

Test plan

  • Unit tests pass (16/16)
  • Integration tests pass (5/5)

The _map_extent_from_mask() method computes the actual footprint of
cells modified by masked_replace based on the valid mask, providing
more accurate coordinate reporting in logs.

- Returns None if mask is empty, falling back to slice-based extent
- Adds flush=True to ensure log output appears immediately
When --full-length-x or --full-length-y is specified, the tool sends
a full-size GridMap with the patch embedded at the specified position.
This allows testing masked_replace with maps that match the node's
full grid dimensions.

New arguments:
- --full-length-x: Total GridMap length in X
- --full-length-y: Total GridMap length in Y
- --full-center-x: GridMap center X for full-size map
- --full-center-y: GridMap center Y for full-size map
@Idate96 Idate96 merged commit c1637f7 into ros2 Dec 1, 2025
2 of 4 checks passed
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.

2 participants