๐ Orchestrated Launch System - Complete!¶
Purpose¶
Preserve historical context while signaling that this page requires verification against the current workflow.
Prerequisites¶
- Review the legacy notes below to understand original assumptions and instructions.
- Cross-check commands and links with the latest tooling before execution.
Steps¶
- Read through the legacy notes captured under Legacy Notes and flag outdated guidance.
- Update or replace the content with validated procedures as time permits.
- Record verification outcomes in the validation checklist and mark follow-up tasks in the backlog.
Legacy Notes¶
What We Built¶
The start script is now a full system orchestrator that handles everything from git updates to verified robot initialization.
Three-Stage Launch Architecture¶
Stage 1: Robot Driver ๐ค¶
โ Pings robot (192.168.10.167)
โ Launches go2_ros2_sdk in background
โ Saves PID for cleanup
โ Waits for /go2_states topic (30s timeout)
โ Logs to /tmp/shadowhound_robot_driver.log
Stage 2: Topic Verification ๐¶
โ Runs scripts/check_topics.py diagnostic
โ Shows all robot-related topics
โ Verifies critical topics (go2_states, camera, imu, odom, costmap)
โ Checks Nav2 action servers (/spin)
โ Prompts before continuing
Stage 3: Mission Agent ๐ง ¶
โ Sources ROS2 and workspace
โ Sets PYTHONPATH for DIMOS
โ Launches mission agent
โ Agent runs built-in diagnostics (double-check)
โ Initializes DIMOS framework
Complete Feature Set¶
1. Git Auto-Update (Commit 8ab216f)¶
- โ Checks main repo + submodules for updates
- โ Shows commit counts and recent changes
- โ Safe stash/restore of uncommitted changes
- โ Automatic rebuild trigger
- โ
Standalone
scripts/update_repos.sh
2. Topic Diagnostics (Commit ad48e43)¶
- โ
Standalone
scripts/check_topics.py - โ Built into mission_agent
- โ Built into start.sh Stage 2
- โ Clear โ /โ status output
3. Orchestrated Launch (Commit e31506e)¶
- โ Three-stage validated launch
- โ Robot driver in background
- โ Topic verification before agent
- โ Clean shutdown of all processes
- โ Flexible modes (skip-driver, agent-only)
Usage Examples¶
Standard Launch (Recommended)¶
./start.sh --dev
Process: 1. Checks for git updates 2. Rebuilds if needed 3. Pings robot 4. Launches robot driver 5. Verifies topics 6. Launches mission agent
Daily Development¶
# Morning: Auto-update and launch
./start.sh --dev --auto-update
Rapid Agent Iteration¶
# Terminal 1: Launch driver once
ros2 launch launch/go2_sdk/robot.launch.py
# Terminal 2: Iterate on agent
./start.sh --dev --skip-driver
# Make changes, Ctrl+C, relaunch
./start.sh --dev --skip-driver
Agent-Only (Fastest)¶
# When driver already running and verified
./start.sh --dev --agent-only
Mock Development¶
# No hardware needed
./start.sh --dev --mock
Command-Line Options¶
| Flag | Description | Use Case |
|---|---|---|
--dev |
Development config | Local testing |
--prod |
Production config | Real robot deployment |
--mock |
Mock robot mode | No hardware available |
--skip-update |
Skip git check | Testing local changes |
--auto-update |
Auto-pull updates | CI/CD, morning sync |
--skip-driver |
Use existing driver | Driver already running |
--agent-only |
Skip all checks | Fast iteration on agent |
--no-web |
Disable web UI | Headless operation |
--web-port N |
Custom port | Port conflict |
What Problems This Solves¶
Before¶
# Terminal 1: Launch driver manually
ros2 launch launch/go2_sdk/robot.launch.py
# Wait... is it ready? Check manually:
ros2 topic list | grep go2_states
# Terminal 2: Launch agent
ros2 launch shadowhound_mission_agent mission_agent.launch.py
# Agent hangs... topics weren't ready yet
# Kill, wait longer, try again
After¶
# Single command
./start.sh --dev
# Automatically:
# โ Checks git updates
# โ Rebuilds if needed
# โ Pings robot
# โ Launches driver
# โ Waits for topics
# โ Verifies with diagnostics
# โ Launches agent when safe
# โ Clean shutdown on Ctrl+C
Debugging¶
Check Driver Logs¶
tail -f /tmp/shadowhound_robot_driver.log
Check Topics Manually¶
python3 scripts/check_topics.py
Update Repos Only¶
./scripts/update_repos.sh --auto
Full Status Check¶
# See git status + topics + packages
echo "=== GIT STATUS ===" && git status -s && \
echo "=== TOPICS ===" && ros2 topic list | grep -E "(go2|camera)" | head -5 && \
echo "=== PACKAGES ===" && ls install/ | grep shadowhound
File Structure¶
shadowhound/
โโโ start.sh # Main orchestrator (753 lines)
โโโ scripts/
โ โโโ check_topics.py # Standalone topic diagnostic
โ โโโ update_repos.sh # Standalone git updater
โโโ docs/
โ โโโ orchestrated_launch.md # This feature (comprehensive)
โ โโโ auto_update.md # Git auto-update guide
โ โโโ topic_diagnostics.md # Topic checking guide
โ โโโ qol_improvements.md # Summary of all features
โโโ quick_reference.md # Command cheat sheet
Cleanup on Exit¶
When you press Ctrl+C:
1. Trap signal caught
2. Mission agent terminated (SIGTERM โ SIGKILL)
3. Robot driver terminated using saved PID
4. Temp files cleaned (/tmp/shadowhound_*.pid)
5. Exit gracefully
Both processes fully cleaned up automatically!
Integration Examples¶
With Go2 SDK Development¶
# Make improvements to SDK
cd src/dimos-unitree/dimos/robot/unitree/external/go2_ros2_sdk
# ... edit files ...
# Test with existing driver
./start.sh --dev --skip-driver
# Or test driver changes
ros2 launch launch/go2_sdk/robot.launch.py
# In another terminal:
./start.sh --dev --skip-driver
With CI/CD¶
# Auto-update, build, launch in one command
./start.sh --prod --auto-update --no-web
With Multiple Robots¶
# Robot 1 (default IP)
./start.sh --prod
# Robot 2 (custom IP)
export GO2_IP=192.168.10.168
export ROS_DOMAIN_ID=1
./start.sh --prod --web-port 8081
Benefits Summary¶
Development Workflow¶
โ Single command to launch everything โ No more guessing if driver is ready โ Automatic validation between stages โ Fast iteration modes for different scenarios โ Clean shutdown of all processes
Debugging¶
โ Clear failure points (which stage failed?) โ Topic diagnostics built-in โ Log files for driver issues โ Interactive prompts to decide next action
Team Collaboration¶
โ Stay in sync with auto-update โ Consistent launch experience โ Self-documenting (clear stage output) โ Flexible for different workflows
Next Steps on Laptop¶
# 1. Pull the orchestrated launch system
cd ~/shadowhound
git pull origin feature/dimos-integration
# 2. Test the full orchestration
./start.sh --dev
# You should see:
# โโ Stage 1: Launching Robot Driver โโ
# โโ Stage 2: Verifying Robot Topics โโ
# โโ Stage 3: Launching Mission Agent โโ
Commits¶
- d5ae2ba - Format diagnostic code
- ad48e43 - Add topic visibility diagnostics
- 8ab216f - Add automatic git repository update checking
- 87a1ce7 - Add QoL improvements summary
- 91512a9 - Add quick reference card
- e31506e - Add orchestrated three-stage launch system โญ NEW
All pushed to origin/feature/dimos-integration โ
Documentation¶
- ๐ Orchestrated Launch:
docs/orchestrated_launch.md(comprehensive, 400+ lines) - ๐ Auto-Update:
docs/auto_update.md - ๐ Topic Diagnostics:
docs/topic_diagnostics.md - ๐ QoL Summary:
docs/qol_improvements.md - ๐ Quick Reference:
quick_reference.md
The Result¶
You now have a production-ready orchestrator that: - ๐ Keeps code in sync (auto-update) - ๐ค Launches robot driver automatically - ๐ Validates topics before proceeding - ๐ง Launches mission agent safely - ๐งน Cleans up everything on exit - ๐ Provides clear status at each stage - ๐ฏ Supports flexible workflows - ๐ Fully documented
No more manual coordination between driver and agent! ๐
Validation¶
- [ ] Legacy guidance reviewed for accuracy and converted to the new workflow where applicable.
- [ ] Links updated to use vault-friendly wikilinks or confirmed for external references.
- [ ] Outstanding migration work captured as tasks in the backlog.