Skip to content

bbox detections visual check#1017

Merged
leshy merged 1 commit intodevfrom
bbox_detector_visuals
Jan 20, 2026
Merged

bbox detections visual check#1017
leshy merged 1 commit intodevfrom
bbox_detector_visuals

Conversation

@leshy
Copy link
Contributor

@leshy leshy commented Jan 15, 2026

just renders detections test in fg

foxglove-bridge
foxglove-studio
pytest dimos/perception/detection/detectors/test_bbox_detectors.py
2026-01-15_12-11

@leshy leshy requested a review from a team January 15, 2026 04:22
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 15, 2026

Greptile Summary

Added visual debugging capability for bbox detectors by publishing test images and detection annotations to LCM topics for visualization in Foxglove Studio. The Resource base class now includes a dispose() method that enables integration with RxPY's CompositeDisposable for cleaner resource management.

  • Added dispose() method to Resource class that wraps stop() for compatibility with reactivex disposable pattern
  • Modified test fixtures to publish images and annotations to LCM topics (/color_image, /annotations_{detector_name})
  • Introduced CompositeDisposable for managing multiple LCM transport lifecycles in tests
  • Debug print statement on line 51 should be removed

Confidence Score: 4/5

  • This PR is safe to merge with minor style improvements recommended
  • The changes are well-contained and add useful debugging capabilities. The dispose() method is a simple wrapper that maintains backward compatibility. Minor style issues (debug print, inconsistent cleanup pattern) don't affect functionality.
  • No files require special attention - both changes are straightforward and low-risk

Important Files Changed

Filename Overview
dimos/core/resource.py Added dispose() method to enable Resource objects to work with CompositeDisposable from reactivex
dimos/perception/detection/detectors/test_bbox_detectors.py Enhanced test to publish detections and images to LCM for visual verification in Foxglove; includes debug print statement and minor cleanup opportunity

Sequence Diagram

sequenceDiagram
    participant Test as pytest test
    participant Detector as bbox/person/yoloe detector
    participant Fixtures as Test Fixtures
    participant LCM as LCM Topics
    participant Foxglove as Foxglove Studio
    
    Test->>Fixtures: Request test_image fixture
    Fixtures->>Test: Return Image
    
    Test->>Fixtures: Request topic_image fixture
    Fixtures->>LCM: Create LCMTransport("/color_image")
    
    Test->>Fixtures: Request get_topic_annotations fixture
    Note over Fixtures: Creates CompositeDisposable for cleanup
    
    Test->>Fixtures: Request detections fixture
    Fixtures->>LCM: Publish test_image to /color_image
    Fixtures->>Detector: process_image(test_image)
    Detector->>Fixtures: Return ImageDetections2D
    Fixtures->>Fixtures: Convert to_foxglove_annotations()
    Fixtures->>Fixtures: Create topic_annotations(detector_name)
    Fixtures->>LCM: Publish annotations to /annotations_{detector}
    Fixtures->>Test: Return detections
    
    LCM->>Foxglove: Stream image and annotations
    
    Test->>Test: Run test assertions
    
    Note over Fixtures: On teardown
    Fixtures->>Fixtures: CompositeDisposable.dispose()
    Fixtures->>LCM: Stop all annotation transports
    Fixtures->>LCM: Stop topic_image transport
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.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@leshy leshy merged commit e9d6cba 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