Skip to content

๐Ÿš€ 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

  1. Read through the legacy notes captured under Legacy Notes and flag outdated guidance.
  2. Update or replace the content with validated procedures as time permits.
  3. 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

./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

  1. d5ae2ba - Format diagnostic code
  2. ad48e43 - Add topic visibility diagnostics
  3. 8ab216f - Add automatic git repository update checking
  4. 87a1ce7 - Add QoL improvements summary
  5. 91512a9 - Add quick reference card
  6. 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.

References