-
Notifications
You must be signed in to change notification settings - Fork 666
[DO NOT MERGE] dimensional os hackathon project - team golden state warriors #2292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
samlee815
wants to merge
1
commit into
dimensionalOS:main
Choose a base branch
from
samlee815:hackathon-gswarriors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
dimos/robot/unitree/go2/blueprints/agentic/greeter_agentic.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| """Version-controlled copy of the `greeter-agentic` `dimos run` blueprint. | ||
|
|
||
| The greeter dog: wander (DimOS patrol) until a person sitting on a chair is | ||
| found, pick a random not-yet-greeted one, walk over, circle to face them, and | ||
| wave hello -- then resume the patrol. The autonomous loop lives in | ||
| ``GreeterSkillContainer``; start/stop it via MCP. | ||
|
|
||
| Install it next to the stock agentic blueprints in the DimOS source tree and | ||
| regenerate the registry: | ||
|
|
||
| cp integration/greeter_agentic.py \\ | ||
| "$DIMOS_HOME/dimos/robot/unitree/go2/blueprints/agentic/" | ||
| pytest -o addopts="" \\ | ||
| "$DIMOS_HOME/dimos/robot/test_all_blueprints_generation.py" | ||
|
|
||
| Then (with the `pawtrack` package importable): | ||
|
|
||
| PYTHONPATH=src PAWTRACK_MODEL=openai:deepseek-chat \ | ||
| dimos run greeter-agentic --robot-ip <dog_ip> | ||
| dimos mcp call start_greeting # or tell the agent: "go greet people" | ||
| dimos mcp call stop_greeting # halt | ||
|
|
||
| This is the stock ``unitree-go2-agentic`` general agent **plus** the greeter | ||
| skill container -- i.e. a normal Go2 agent that can navigate, speak, run sport | ||
| commands, etc., and *also* knows how to greet. It uses the agent's default | ||
| general system prompt (no narrow greeter prompt); the agent discovers the | ||
| greeting from the skill docstrings (``start_greeting`` / ``stop_greeting`` / | ||
| ``greeter_status`` / ``wave_hello``) and calls it when asked, like any other | ||
| skill. The wander/greet loop itself is autonomous once started. Model defaults | ||
| to the agent's default; override with ``PAWTRACK_MODEL``. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import os | ||
|
|
||
| from dimos.agents.mcp.mcp_client import McpClient | ||
| from dimos.agents.mcp.mcp_server import McpServer | ||
| from dimos.core.coordination.blueprints import autoconnect | ||
| from dimos.robot.unitree.go2.blueprints.agentic._common_agentic import ( | ||
| _common_agentic, | ||
| ) | ||
| from dimos.robot.unitree.go2.blueprints.smart.unitree_go2_spatial import ( | ||
| unitree_go2_spatial, | ||
| ) | ||
|
|
||
| from pawtrack.greeter_container import GreeterSkillContainer | ||
|
|
||
| _MODEL = os.environ.get("PAWTRACK_MODEL") | ||
|
|
||
| # Stock unitree-go2-agentic (general agent, default prompt) + the greeter skill. | ||
| _agent = ( | ||
| McpClient.blueprint(model=_MODEL) if _MODEL else McpClient.blueprint() | ||
| ) | ||
|
|
||
| greeter_agentic = autoconnect( | ||
| unitree_go2_spatial, | ||
| McpServer.blueprint(), | ||
| _agent, | ||
| _common_agentic, | ||
| GreeterSkillContainer.blueprint(), | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # PawTrack Greeter Hackathon Demo | ||
|
|
||
| ## Overview | ||
|
|
||
| PawTrack adds a DimOS / Unitree Go2 autonomous greeter demo. The robot patrols, detects a target such as a person sitting on a chair, tracks it, approaches to a safe standoff, waves, records the visited location, and resumes patrol. The DimOS blueprint is registered as `greeter-agentic`. | ||
|
|
||
| Source lives in `hackathon/pawtrack/src/pawtrack`. The runnable DimOS blueprint is placed at `dimos/robot/unitree/go2/blueprints/agentic/greeter_agentic.py` and registered in `dimos/robot/all_blueprints.py`. | ||
|
|
||
| ## Run | ||
|
|
||
| From this DimOS checkout: | ||
|
|
||
| ```bash | ||
| export DIMOS_HOME="${DIMOS_HOME:-$HOME/sam/dimos}" | ||
| export DIMOS_VENV="${DIMOS_VENV:-$HOME/dimos-env}" | ||
| export PYTHONPATH="$DIMOS_HOME/hackathon/pawtrack/src:$DIMOS_HOME:${PYTHONPATH:-}" | ||
| source "$DIMOS_VENV/bin/activate" | ||
| cd "$DIMOS_HOME" | ||
| ``` | ||
|
|
||
| Simulation: | ||
|
|
||
| ```bash | ||
| hackathon/pawtrack/scripts/run_greeter_sim.sh | ||
| ``` | ||
|
|
||
| Then in another shell: | ||
|
|
||
| ```bash | ||
| dimos mcp call start_greeting --arg target="a person" | ||
| dimos mcp call greeter_status | ||
| dimos mcp call stop_greeting | ||
| ``` | ||
|
|
||
| Real Go2: | ||
|
|
||
| ```bash | ||
| dimos run greeter-agentic --robot-ip <robot_ip> | ||
| dimos mcp call start_greeting --arg target="a person sitting on a chair" | ||
| dimos mcp call stop_greeting | ||
| ``` | ||
|
|
||
| ## Test | ||
|
|
||
| ```bash | ||
| export DIMOS_HOME="${DIMOS_HOME:-$HOME/sam/dimos}" | ||
| export DIMOS_VENV="${DIMOS_VENV:-$HOME/dimos-env}" | ||
| source "$DIMOS_VENV/bin/activate" | ||
| cd "$DIMOS_HOME" | ||
| PYTHONPATH="$DIMOS_HOME/hackathon/pawtrack/src:$DIMOS_HOME" pytest -o addopts= \ | ||
| hackathon/pawtrack/tests/test_identify.py \ | ||
| hackathon/pawtrack/tests/test_greeter_state.py \ | ||
| hackathon/pawtrack/tests/test_greeter_container.py \ | ||
| hackathon/pawtrack/tests/test_occupancy.py | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| """Version-controlled copy of the `greeter-agentic` `dimos run` blueprint. | ||
|
|
||
| The greeter dog: wander (DimOS patrol) until a person sitting on a chair is | ||
| found, pick a random not-yet-greeted one, walk over, circle to face them, and | ||
| wave hello -- then resume the patrol. The autonomous loop lives in | ||
| ``GreeterSkillContainer``; start/stop it via MCP. | ||
|
|
||
| Install it next to the stock agentic blueprints in the DimOS source tree and | ||
| regenerate the registry: | ||
|
|
||
| cp integration/greeter_agentic.py \\ | ||
| "$DIMOS_HOME/dimos/robot/unitree/go2/blueprints/agentic/" | ||
| pytest -o addopts="" \\ | ||
| "$DIMOS_HOME/dimos/robot/test_all_blueprints_generation.py" | ||
|
|
||
| Then (with the `pawtrack` package importable): | ||
|
|
||
| PYTHONPATH=src PAWTRACK_MODEL=openai:deepseek-chat \ | ||
| dimos run greeter-agentic --robot-ip <dog_ip> | ||
| dimos mcp call start_greeting # or tell the agent: "go greet people" | ||
| dimos mcp call stop_greeting # halt | ||
|
|
||
| This is the stock ``unitree-go2-agentic`` general agent **plus** the greeter | ||
| skill container -- i.e. a normal Go2 agent that can navigate, speak, run sport | ||
| commands, etc., and *also* knows how to greet. It uses the agent's default | ||
| general system prompt (no narrow greeter prompt); the agent discovers the | ||
| greeting from the skill docstrings (``start_greeting`` / ``stop_greeting`` / | ||
| ``greeter_status`` / ``wave_hello``) and calls it when asked, like any other | ||
| skill. The wander/greet loop itself is autonomous once started. Model defaults | ||
| to the agent's default; override with ``PAWTRACK_MODEL``. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import os | ||
|
|
||
| from dimos.agents.mcp.mcp_client import McpClient | ||
| from dimos.agents.mcp.mcp_server import McpServer | ||
| from dimos.core.coordination.blueprints import autoconnect | ||
| from dimos.robot.unitree.go2.blueprints.agentic._common_agentic import ( | ||
| _common_agentic, | ||
| ) | ||
| from dimos.robot.unitree.go2.blueprints.smart.unitree_go2_spatial import ( | ||
| unitree_go2_spatial, | ||
| ) | ||
|
|
||
| from pawtrack.greeter_container import GreeterSkillContainer | ||
|
|
||
| _MODEL = os.environ.get("PAWTRACK_MODEL") | ||
|
|
||
| # Stock unitree-go2-agentic (general agent, default prompt) + the greeter skill. | ||
| _agent = ( | ||
| McpClient.blueprint(model=_MODEL) if _MODEL else McpClient.blueprint() | ||
| ) | ||
|
|
||
| greeter_agentic = autoconnect( | ||
| unitree_go2_spatial, | ||
| McpServer.blueprint(), | ||
| _agent, | ||
| _common_agentic, | ||
| GreeterSkillContainer.blueprint(), | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| """Version-controlled copy of the PawTrack `dimos run` blueprint. | ||
|
|
||
| `dimos run <name>` resolves names from a registry that the generator builds by | ||
| scanning only the dimos source tree, so the blueprint object has to live inside | ||
| that tree. This file is the canonical copy; install it with: | ||
|
|
||
| cp integration/pawtrack_agentic.py \\ | ||
| "$DIMOS_HOME/dimos/robot/unitree/go2/blueprints/agentic/" | ||
| pytest "$DIMOS_HOME/dimos/robot/test_all_blueprints_generation.py" # regen | ||
|
|
||
| Then (with the `pawtrack` package importable): | ||
|
|
||
| PYTHONPATH=src dimos run pawtrack-agentic --robot-ip <dog_ip> | ||
|
|
||
| It rebuilds the four parts of the stock ``unitree-go2-agentic`` blueprint but | ||
| swaps in an ``McpClient`` with the PawTrack prompt and adds the PawTrack | ||
| subject-tracking skill container -- reusing the stock stack, no duplicate | ||
| agent. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import os | ||
|
|
||
| from dimos.agents.mcp.mcp_client import McpClient | ||
| from dimos.agents.mcp.mcp_server import McpServer | ||
| from dimos.core.coordination.blueprints import autoconnect | ||
| from dimos.robot.unitree.go2.blueprints.agentic._common_agentic import ( | ||
| _common_agentic, | ||
| ) | ||
| from dimos.robot.unitree.go2.blueprints.smart.unitree_go2_spatial import ( | ||
| unitree_go2_spatial, | ||
| ) | ||
|
|
||
| from pawtrack.skill_container import PawTrackSkillContainer | ||
| from pawtrack.system_prompt import PAWTRACK_PROMPT | ||
|
|
||
| _MODEL = os.environ.get("PAWTRACK_MODEL", "openai:gpt-5.1") | ||
|
|
||
| pawtrack_agentic = autoconnect( | ||
| unitree_go2_spatial, | ||
| McpServer.blueprint(), | ||
| McpClient.blueprint(model=_MODEL, system_prompt=PAWTRACK_PROMPT), | ||
| _common_agentic, | ||
| PawTrackSkillContainer.blueprint(), | ||
| ) |
50 changes: 50 additions & 0 deletions
50
hackathon/pawtrack/integration/pawtrack_agentic_relocalization.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| """PawTrack agentic blueprint with optional prebuilt-map relocalization. | ||
|
|
||
| Install this next to ``pawtrack_agentic.py`` in the DimOS source tree, then | ||
| regenerate ``all_blueprints``: | ||
|
|
||
| cp integration/pawtrack_agentic_relocalization.py \ | ||
| "$DIMOS_HOME/dimos/robot/unitree/go2/blueprints/agentic/" | ||
| pytest -o addopts="" \ | ||
| "$DIMOS_HOME/dimos/robot/test_all_blueprints_generation.py" | ||
|
|
||
| Run with a prebuilt map: | ||
|
|
||
| PYTHONPATH=src dimos run pawtrack-agentic-relocalization \ | ||
| --robot-ip <dog_ip> \ | ||
| -o relocalizationmodule.map_file=<premap_name> | ||
|
|
||
| This intentionally keeps the existing ``pawtrack-agentic`` blueprint | ||
| unchanged. | ||
| Use this blueprint only when you want ``subject_map_pose`` in addition to the | ||
| always-on ``subject_world_pose``. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import os | ||
|
|
||
| from dimos.agents.mcp.mcp_client import McpClient | ||
| from dimos.agents.mcp.mcp_server import McpServer | ||
| from dimos.core.coordination.blueprints import autoconnect | ||
| from dimos.mapping.relocalization.module import RelocalizationModule | ||
| from dimos.robot.unitree.go2.blueprints.agentic._common_agentic import ( | ||
| _common_agentic, | ||
| ) | ||
| from dimos.robot.unitree.go2.blueprints.smart.unitree_go2_spatial import ( | ||
| unitree_go2_spatial, | ||
| ) | ||
|
|
||
| from pawtrack.skill_container import PawTrackSkillContainer | ||
| from pawtrack.system_prompt import PAWTRACK_PROMPT | ||
|
|
||
| _MODEL = os.environ.get("PAWTRACK_MODEL", "openai:gpt-5.1") | ||
|
|
||
| pawtrack_agentic_relocalization = autoconnect( | ||
| unitree_go2_spatial, | ||
| RelocalizationModule.blueprint(), | ||
| McpServer.blueprint(), | ||
| McpClient.blueprint(model=_MODEL, system_prompt=PAWTRACK_PROMPT), | ||
| _common_agentic, | ||
| PawTrackSkillContainer.blueprint(), | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| [build-system] | ||
| requires = ["setuptools>=70", "wheel"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "pawtrack" | ||
| version = "0.1.0" | ||
| description = "PawTrack: a Unitree Go2 that finds and tracks a described subject." | ||
| requires-python = ">=3.10" | ||
| dependencies = [] | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| where = ["src"] | ||
|
|
||
| [tool.pytest.ini_options] | ||
| testpaths = ["tests"] | ||
| pythonpath = ["src"] | ||
| addopts = "-q" | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value
$HOME/sam/dimosreferences a developer's personal directory. Anyone cloning the repo and following this README verbatim will resolve to/home/$USER/sam/dimos, which almost certainly does not exist and will cause a confusing failure. The same path also appears inscripts/run_greeter_sim.shline 22 and in the "Test" block on line 46. The correct default should use the repo root (e.g.,$(pwd)or$REPO_ROOT) or leave it as a required export with no silent fallback.