Skip to content

fix: increase costmap floor z_offset to avoid z-fighting#1073

Merged
leshy merged 1 commit intodevfrom
fix/costmap-z-offset
Jan 20, 2026
Merged

fix: increase costmap floor z_offset to avoid z-fighting#1073
leshy merged 1 commit intodevfrom
fix/costmap-z-offset

Conversation

@Nabla7
Copy link
Contributor

@Nabla7 Nabla7 commented Jan 20, 2026

No description provided.

@Nabla7 Nabla7 requested a review from a team January 20, 2026 11:34
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 20, 2026

Greptile Overview

Greptile Summary

Increased the z_offset parameter from 0.05 to 0.07 for the costmap floor mesh visualization to prevent z-fighting artifacts in the Rerun viewer.

  • The change affects only the 3D mesh visualization at world/nav/costmap/floor, not the 2D image view or the actual costmap data
  • Z-fighting occurs when two surfaces occupy nearly the same depth, causing flickering; increasing the offset lifts the costmap mesh further above the ground plane
  • The new value (0.07m = 7cm) is still much smaller than the path visualization offset (0.2m), maintaining proper visual layering
  • No functional or data processing changes; purely a visualization improvement

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Single-line change to a visualization parameter with no impact on functionality, data processing, or system behavior. The change addresses a well-known graphics rendering issue (z-fighting) with a sensible value adjustment.
  • No files require special attention.

Sequence Diagram

sequenceDiagram
    participant GM as global_map (In)
    participant CM as CostMapper
    participant Algo as Occupancy Algorithm
    participant Out as global_costmap (Out)
    participant RR as Rerun Viewer

    GM->>CM: PointCloud2 message
    CM->>CM: _calculate_and_time()
    CM->>Algo: _calculate_costmap()
    Algo-->>CM: OccupancyGrid
    CM->>Out: publish(OccupancyGrid)
    CM->>RR: log 2D image (world/nav/costmap/image)
    CM->>RR: log 3D floor mesh (world/nav/costmap/floor, z_offset=0.07)
    CM->>RR: log metrics (calc_ms, latency_ms)
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@leshy leshy merged commit 75f59f2 into dev Jan 20, 2026
14 checks passed
spomichter added a commit that referenced this pull request Jan 23, 2026
… Unitree Go2 Navigation & Exploration Beta

Pre-Release v0.0.8: Unitree Go2 Navigation & Exploration Beta, Transport Updates, Documentation updates, Rerun fixes, Person follow, Readme updates

## What's Changed
* Small docs clarification about stream getters by @leshy in #1043
* Fix split view on wide monitors by @jeff-hykin in #1048
* Docs: Install & Develop  by @jeff-hykin in #1022
* Add uv to nix and fix resulting problems by @jeff-hykin in #1021
* v0.0.8 by @paul-nechifor in #1050
* Style changes in docs by @paul-nechifor in #1051
* Revert "Add uv to nix and fix resulting problems" by @leshy in #1053
* Transport benchmarks + Raw ros transport by @leshy in #1038
* feat: default to rerun-web and auto-open browser on startup (browser … by @Nabla7 in #1019
* bbox detections visual check by @leshy in #1017
* fix: only auto-open browser for rerun-web viewer backend by @Nabla7 in #1066
* move slow tests to integration by @paul-nechifor in #1063
* Streamline transport start/stop methods by @Kaweees in #1062
* Person follow skill with EdgeTAM by @paul-nechifor in #1042
* fix: increase costmap floor z_offset to avoid z-fighting by @Nabla7 in #1073
* Fixed issue #1074 by @alexlin2 in #1075
* ROS transports initial by @leshy in #1057
* Fix System Config Values for LCM on MacOS and Refactor by @jeff-hykin in #1065
* SHM Transport basic fixes by @leshy in #1041
* commented out Mem Transport test case by @leshy in #1077
* Docs/advanced streams update 2 by @leshy in #1078
* Fix more tests by @paul-nechifor in #1071
* feat: navigation docker updates from bona_local_dev by @baishibona in #1081
* Fix missing dependencies by @Kaweees in #1085
* Release readme fixes by @spomichter in #1076

## New Contributors
* @baishibona made their first contribution in #1081

**Full Changelog**: v0.0.7...v0.0.8
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