Skip to content

Conversation

@paul-nechifor
Copy link
Contributor

Run:

uv run dimos run unitree-go2-agentic

...and ask "what do you see" in 'humancli'`.

@greptile-apps
Copy link

greptile-apps bot commented Jan 25, 2026

Greptile Overview

Greptile Summary

This PR adds an observe skill to the GO2Connection module, enabling AI agents to request the latest camera frame from the Unitree Go2 robot for vision-based queries.

Key changes:

  • Changed base class from Module to SkillModule to support skill registration
  • Added _latest_video_frame field to store the most recent camera frame
  • Updated onimage callback to cache frames in _latest_video_frame
  • Implemented observe() skill method decorated with @skill(output=Output.image)

Implementation details:

  • The pattern matches the existing drone module implementation
  • Frames are updated in the reactive video stream callback and stored for on-demand access
  • The skill returns None if no frame has been captured yet
  • No thread synchronization primitives are used, consistent with the drone module's approach

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation follows established patterns from the drone module, makes minimal focused changes, and adds useful functionality for agentic interactions. No breaking changes or risky modifications.
  • No files require special attention

Important Files Changed

Filename Overview
dimos/robot/unitree/connection/go2.py Added observe skill to return latest camera frame for vision-based agent queries. Changes follow existing patterns from drone module.

Sequence Diagram

sequenceDiagram
    participant Agent as AI Agent
    participant GO2 as GO2Connection
    participant VideoStream as Video Stream
    participant Camera as Robot Camera

    Note over VideoStream,Camera: Connection established & streaming started
    Camera->>VideoStream: Continuous video frames
    VideoStream->>GO2: onimage(image)
    GO2->>GO2: self._latest_video_frame = image
    GO2->>GO2: publish to color_image output

    Note over Agent,GO2: Agent asks "what do you see?"
    Agent->>GO2: observe() skill call
    GO2->>Agent: return self._latest_video_frame
    Agent->>Agent: Process image for visual query
Loading

Copy link

@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


def onimage(image: Image) -> None:
self.color_image.publish(image)
self._latest_video_frame = image
Copy link
Contributor

Choose a reason for hiding this comment

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

as long as we are familiar with this but choosing to do _latest_video_frame thing I'm ok. idk if this API is too obscuring

https://github.com/dimensionalOS/dimos/blob/main/docs/api/sensor_streams/advanced_streams.md#getting-values-synchronously

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did consider that (getter_hot), (since I reviewed the doc), but it seemed easier to just set the value (like the other skill does) since there already is a subscription for the image here.

Copy link
Contributor

@leshy leshy left a comment

Choose a reason for hiding this comment

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

just an API note

@paul-nechifor paul-nechifor merged commit 562ab0f into dev Jan 25, 2026
14 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.

3 participants