Humanoider Roboter mit Smartphone als "Augen und Ohren" - komplett simuliert, später Hardware-ready.
┌─────────────────────────────────────────────────────────────────┐
│ USER INTERFACE │
│ ┌─────────────┐ ┌──────────────┐ ┌─────────────────────┐ │
│ │ Smartphone │ │ Claude Code │ │ Terminal/Web UI │ │
│ │ (Zukunft) │ │ (via MCP) │ │ │ │
│ └──────┬──────┘ └──────┬───────┘ └──────────┬──────────┘ │
└─────────┼────────────────┼──────────────────────┼───────────────┘
│ │ │
│ HTTP/WebSocket │ MCP Protocol │ ROS2 CLI
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ CONTROL LAYER │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ ROS2 MCP Server (Yutarop/ros-mcp) │ │
│ │ - Natural Language → ROS2 Commands │ │
│ │ - Topic/Service/Action Management │ │
│ │ - Gazebo GUI Launch │ │
│ └────────────────────┬─────────────────────────────────────┘ │
│ │ │
│ ┌────────────────────┴─────────────────────────────────────┐ │
│ │ BehaviorTree.CPP (High-Level Logic) - PHASE 3 │ │
│ │ - Task Planning (pick, place, walk, etc.) │ │
│ │ - State Management │ │
│ └────────────────────┬─────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼ ROS2 Topics/Actions
┌─────────────────────────────────────────────────────────────────┐
│ MIDDLEWARE LAYER (ROS2) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ ros2_control │ │ MoveIt2 │ │ Navigation2 │ │
│ │ (Joints) │ │ (Kinematics) │ │ (Locomotion - LATER) │ │
│ └──────┬───────┘ └──────┬───────┘ └──────────┬───────────┘ │
└─────────┼──────────────────┼──────────────────────┼──────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ SIMULATION / HARDWARE INTERFACE │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Gazebo Harmonic (or Classic for low RAM) │ │
│ │ - Physics Simulation │ │
│ │ - Sensor Simulation (Camera, IMU, Lidar) │ │
│ │ - ros_gz_bridge │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ RViz2 (Visualization) │ │
│ │ - 3D Model Display │ │
│ │ - Sensor Data Visualization │ │
│ └──────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
Ziel: 1-DOF Joint mit ROS2 Control testen
Components:
- Single revolute joint (test_joint)
- ROS2 Control (Hardware Interface Mock)
- Gazebo Classic (leichter für 4GB RAM)
- RViz2 für Visualisierung
Deliverables:
- URDF mit ros2_control tags
- Controller Config (joint_state_broadcaster + position_controller)
- Launch file: Gazebo + ROS2 Control + RViz2
- Test:
ros2 topic pub /test_joint_position_controller/commands std_msgs/msg/Float64MultiArray "{data: [1.57]}"bewegt Joint
Duration: 1-2 Stunden
Ziel: 4-DOF Arm vollständig steuerbar
Components:
- 4 Joints: waist, shoulder, elbow, gripper
- ROS2 Control (mock_components)
- Joint Trajectory Controller
- Simple Command Interface (CLI oder Python Script)
Deliverables:
- MeArm URDF mit ros2_control
- Multi-joint trajectory execution
- Gazebo + RViz2 Launch
- Python Script:
send_arm_pose(shoulder=30, elbow=45, ...)
Duration: 2-3 Stunden
Ziel: Sprachbefehle (via Terminal erstmal, später Smartphone)
Components:
- ROS2 MCP Server (ros-mcp) für Claude Desktop
- HTTP ↔ ROS2 Bridge (z.B. rosbridge_suite oder custom FastAPI)
- BehaviorTree.CPP (optional, für komplexe Tasks)
Architecture für Smartphone:
Smartphone App
└─> HTTP POST /command {"text": "greife den Block"}
└─> FastAPI Server (Python)
└─> LLM (OpenRouter API)
└─> JSON: {"action": "pick", "target": "block", "position": [x,y,z]}
└─> ROS2 Action Client
└─> MoveIt2 (Inverse Kinematics)
└─> ros2_control → Gazebo
Deliverables:
- ros-mcp Server konfiguriert für Claude Desktop
- FastAPI Server mit /command Endpoint
- Test:
curl -X POST http://localhost:8000/command -d '{"text":"move arm up"}' - Smartphone Mock Interface (HTML/JavaScript)
Duration: 3-4 Stunden
Ziel: Upper Body (Kopf mit Kamera-Mount für Smartphone)
Components:
- Torso (1-2 DOF für Rotation/Neigung)
- Kopf/Hals (2 DOF: pan, tilt)
- Smartphone-Mount am Kopf (fixed oder gimbal)
- Kamera-Simulation in Gazebo → ROS2 Image Topics
Deliverables:
- Upper-body URDF (Torso + Kopf + 2x Arms)
- Camera Plugin in Gazebo (simulated phone camera)
- Image Processing Node (object detection - später)
Duration: 4-5 Stunden
Ziel: Vollständiger Humanoid mit Gehfähigkeit
Components:
- 2x Beine (6 DOF pro Bein: hip, knee, ankle)
- Navigation2 für Path Planning
- Balance Controller (ZMP oder ähnlich)
- Footstep Planning
Deliverables:
- Full humanoid URDF (15+ DOF)
- Walking Gait Controller
- Navigation in Gazebo World
Duration: 10+ Stunden (komplex!)
Wahl: ROS2 Jazzy (bereits installiert)
- Neueste Features
- Gute Gazebo Harmonic Integration
- Aber: Gazebo Classic Option für RAM-Limit
Option 1 (Aktuell): Gazebo Harmonic
- ✅ Beste Integration mit ROS2 Jazzy
- ❌ Hoher RAM-Verbrauch (problematisch bei 4GB)
Option 2 (Fallback): Gazebo Classic 11
- ✅ Leichter, läuft auf 4GB RAM
- ✅ Gut dokumentiert
- ❌ Weniger moderne Features
Option 3 (Ultraleicht): Nur RViz2 (kein Physics)
- ✅ Minimaler RAM
- ✅ Schnelles Debugging
- ❌ Keine Physik-Simulation
- Empfehlung: Für Development nutzen, Gazebo nur für Tests
Wahl: ros2_control
- Industry Standard
- Hardware-ready (später echte Servos anschließen)
- Plugin-basiert (einfach Mock → Real Hardware wechseln)
Wahl: MoveIt2
- Standard für Manipulation
- Inverse Kinematics
- Collision Avoidance
- Phase 3+ (erstmal manuelles Joint-Control)
Wahl: BehaviorTree.CPP
- Visuelles Behavior Design
- Wiederverwendbare Subtrees
- Gut für komplexe Tasks
- Phase 3+
Wahl: FastAPI + WebSocket/HTTP
# server.py
from fastapi import FastAPI
import rclpy
from std_msgs.msg import String
app = FastAPI()
ros_node = None # init in startup
@app.post("/command")
async def handle_command(cmd: dict):
# cmd = {"text": "pick up red block"}
# → LLM (OpenRouter) → {"action": "pick", "target": "red_block"}
# → ROS2 Action
return {"status": "processing"}
@app.websocket("/camera")
async def stream_camera(websocket):
# Stream ROS2 Image Topic → Smartphone Display
passWahl: OpenRouter API (wegen 4GB RAM)
- Kein lokales Mistral-7B (braucht >16GB RAM)
- Cloud-basiert, günstig
- Später: Feintuning für Roboter-Kommandos
- Gazebo Harmonic: ~2GB RAM
- ROS2 Nodes: ~500MB
- OS + Browser: ~1GB
- Total: >3.5GB → System wird swappen
-
Gazebo Classic statt Harmonic
sudo apt install gazebo11 ros-jazzy-gazebo-ros-pkgs
RAM-Ersparnis: ~800MB
-
Headless Gazebo (kein GUI)
gz sim -s world.sdf # Server-only mode # RViz2 für Visualisierung nutzen
RAM-Ersparnis: ~1.2GB
-
Swap Space erhöhen
sudo fallocate -l 8G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile
-
Minimale World Files
- Keine komplexen Meshes
- Einfache Primitives (Box, Cylinder)
- Weniger Plugins
- ros-mcp Server einrichten (damit Claude Code besser mit ROS/Gazebo interagieren kann)
- Phase 1 starten: Minimal 1-DOF Test
- Entscheidung: Gazebo Classic vs. Harmonic (RAM-Test)
- Phase 2: MeArm mit ros2_control
- Hardware Integration: Echte Servos (z.B. Dynamixel)
- Smartphone App: React Native (iOS/Android)
- Vision: YOLOv8 für Object Detection
- Voice: Whisper für Speech-to-Text (auf Smartphone)
- Cloud Sim: AWS RoboMaker oder NVIDIA Isaac Sim (für Heavy Workloads)
- Reinforcement Learning: Policies trainieren (Walking, Manipulation)
Antwort: Inkrementelles Development verhindert Komplexitäts-Explosion
- Arm: 4 DOF → testbar in 1 Tag
- Humanoid: 20+ DOF → Wochen Debug-Zeit
- Jede Phase baut auf vorheriger auf → solides Fundament
Antwort: Industry Standard, Hardware-ready
- ros2_control → egal ob Gazebo oder echte Motoren
- Plugin-System → Mock → Real ohne Code-Change
- Community Support + Dokumentation
Antwort: Kostengünstig, powerful, bereits vorhanden
- Smartphone = 12MP Camera + Mikrofon + IMU + GPS
- Kein Raspberry Pi + separate Kamera nötig
- ROS2 ↔ Smartphone über WiFi/HTTP sehr einfach