AI Agent Quick Reference Guide¶
This guide provides a concise reference for AI agents working with AirStack. For comprehensive documentation, see AGENTS.md.
Quick Start¶
- Understand the architecture: Review System Architecture
- Choose a workflow: Select appropriate skill from .agents/skills/
- Follow the skill: Execute step-by-step instructions
- Test and document: Verify functionality and update docs
Common Tasks¶
| Task | Skill | Time Estimate |
|---|---|---|
| Add new planner | add-ros2-package → integrate-module-into-layer | 2-4 hours |
| Debug module | debug-module | 30 min - 2 hours |
| Create test scenario | write-isaac-sim-scene | 1-2 hours |
| Add behavior tree node | add-behavior-tree-node | 1-3 hours |
| Update documentation | update-documentation | 30 min - 1 hour |
Development Workflow¶
graph LR
Study[Study Reference<br/>Implementation] --> Create[Create Package<br/>add-ros2-package]
Create --> Implement[Implement<br/>Algorithm]
Implement --> Integrate[Integrate to Layer<br/>integrate-module-into-layer]
Integrate --> Document[Document<br/>update-documentation]
Document --> Test[Test in Sim<br/>test-in-simulation]
Test --> Debug{Works?}
Debug -->|No| Fix[Debug & Fix<br/>debug-module]
Fix --> Test
Debug -->|Yes| Done[Complete]
Essential Commands¶
Container Management¶
# Start robot container (no autolaunch)
AUTOLAUNCH=false airstack up robot-desktop
# Build specific package
docker exec airstack-robot-desktop-1 bash -c "bws --packages-select <package>"
# Source workspace
docker exec airstack-robot-desktop-1 bash -c "sws"
# Run launch file
docker exec airstack-robot-desktop-1 bash -c "sws && ros2 launch <package> <launch_file>"
Debugging¶
# Check if node is running
docker exec airstack-robot-desktop-1 bash -c "ros2 node list | grep <node>"
# Check topic connections
docker exec airstack-robot-desktop-1 bash -c "ros2 topic hz <topic>"
docker exec airstack-robot-desktop-1 bash -c "ros2 topic echo <topic> --once"
# View logs
docker logs airstack-robot-desktop-1 2>&1 | grep -i <module>
Testing¶
# Launch full stack with simulation
airstack up isaac-sim robot
# Record test data
docker exec airstack-robot-desktop-1 bash -c "ros2 bag record -a -o /tmp/test"
Key Concepts¶
Layered Architecture¶
- Interface: Hardware abstraction
- Sensors: Sensor processing
- Perception: State estimation
- Local: Reactive planning & control
- Global: Strategic planning & mapping
- Behavior: Mission execution
Topic Naming Convention¶
Example: /drone1/local_planner/droan/trajectory
Standard Topics¶
/[robot]/odometry- State estimate/[robot]/global_plan- Path from global planner/[robot]/trajectory_controller/trajectory_segment_to_add- Local trajectory/[robot]/trajectory_controller/look_ahead- Tracking reference
See Integration Checklist for complete list.
Integration Checklist¶
Quick checklist when adding a module:
- Package in correct layer directory
-
package.xmlwith all dependencies - CMakeLists.txt / setup.py configured
- Launch file with topic remapping
- Config file with parameters
- README.md with documentation
- Added to layer bringup
- Added to mkdocs.yml navigation
- Tested standalone
- Tested in full stack
- Tested in simulation
Full details: Integration Checklist
Reference Implementations¶
Study these before implementing similar modules:
| Module Type | Reference | Location |
|---|---|---|
| Local Planner | DROAN | robot/ros_ws/src/local/planners/droan_local_planner |
| Controller | Trajectory Controller | robot/ros_ws/src/local/c_controls/trajectory_controller |
| World Model | Disparity Expansion | robot/ros_ws/src/local/world_models/disparity_expansion |
| Global Planner | Random Walk | robot/ros_ws/src/global/planners/random_walk |
| Behavior Node | Example Actions | robot/ros_ws/src/behavior/behavior_tree_example |
Autonomous Debugging Strategy¶
When a module doesn't work:
- Verify node is running:
ros2 node list - Check topic connections:
ros2 topic info <topic> - Check data flow:
ros2 topic hz <topic> - Inspect data quality:
ros2 topic echo <topic> --once - Check parameters:
ros2 param list <node> - Review logs:
docker logs airstack-robot-desktop-1 - Compare with reference: Study working similar module
- Add instrumentation: Debug publishers/logging
- Create minimal test: Isolate the problem
Full strategy: debug-module skill
Package Template¶
Use the template when creating new packages:
Location: ../../.agents/skills/add-ros2-package/assets/package_template/
Includes:
package.xml- Dependency templateCMakeLists.txt- C++ build templatesetup.py- Python build templateconfig/template.yaml- Parameter templatelaunch/template.launch.xml- Launch templateREADME.md- Documentation template- Example C++ and Python nodes
Documentation Standards¶
Module README Structure¶
- Overview
- Algorithm description
- Architecture diagram (mermaid)
- Dependencies
- Interfaces (topics, services, parameters)
- Configuration
- Usage
- Testing
- Known issues
Update mkdocs.yml¶
Add module README to navigation:
nav:
- Robot:
- Autonomy Modules:
- <Layer>:
- Your Module:
- robot/ros_ws/src/<layer>/<module>/README.md
Full documentation workflow: update-documentation skill
Common Pitfalls¶
Build Issues¶
- ❌ Missing dependencies in
package.xml - ❌ Not installing launch/config in
CMakeLists.txt - ✅ Check
colcon buildoutput for errors
Runtime Issues¶
- ❌ Hardcoded topic names
- ❌ Missing
$(env ROBOT_NAME)in launch files - ❌ Parameters not loading (missing
allow_substs="true") - ✅ Use launch arguments for all topics
Integration Issues¶
- ❌ Not adding module to bringup package
- ❌ Not updating bringup
package.xmldependencies - ✅ Follow integrate-module-into-layer
Documentation Issues¶
- ❌ Not updating
mkdocs.yml - ❌ Broken links in README
- ✅ Test docs with
airstack docs
Performance Guidelines¶
Update Rates¶
- Interface: 50 Hz
- Sensors: 15-30 Hz
- Perception: 20-30 Hz
- Local Planning: 10 Hz
- Controllers: 50 Hz
- Global Planning: 1 Hz
- Behavior: 10 Hz
Resource Targets¶
- CPU: <20% per module (desktop)
- Memory: <500 MB per module
- Latency: <100 ms (local), <500 ms (global)
Links¶
Primary References¶
- AGENTS.md - Main agent guide
- System Architecture - Architecture diagrams
- Integration Checklist - Integration requirements
Skills¶
- add-ros2-package
- integrate-module-into-layer
- write-isaac-sim-scene
- debug-module
- update-documentation
- test-in-simulation
- add-behavior-tree-node