Welcome to the EDEN project! This guide will help you get started with development.
The EDEN codebase is organized into independent layers that can be developed in parallel:
- Cognitive Layer Team (
cognitive_layer/) - Memory, personality, decision-making - Input Layer Team (
input_layer/) - Camera, vision, object detection - Context Gathering Team (
context_gathering/) - Importance analysis, VLM integration - Planning Layer Team (
planning_layer/) - Action planning, Cosmos integration - ROS Integration Team (
ros_integration/) - Robot control, navigation - Frontend Team (
electron-app/) - Visualization, UI
# Clone the repository
git clone <repo-url>
cd ShowcaseSoftware
# Copy environment template
cp .env.example .env
# Edit .env with your configuration
# At minimum, set SUPERMEMORY_API_KEY for cloud memory
nano .env
# Install dependencies
pip install -r requirements.txt --user
# Verify setup
python3 -c "from config import Config; Config.validate()"Each layer can be developed and tested independently:
# Start cognitive layer server
python3 brain_server.py
# Access web interface
open http://localhost:8000
# Test API
curl http://localhost:8000/api/graph/state# Terminal 1: Camera Server
python3 -m input_layer.camera_server
# Terminal 2: Frame Processor
python3 -m input_layer.frame_processor
# Test with webcam or video file# Start planning server
python3 -m planning_layer.planning_server
# Test planning API
curl -X POST http://localhost:8001/api/plan/generate \
-H "Content-Type: application/json" \
-d '{"goal": "Pick up the red cup", "scene_description": "Cup on table"}'# Source ROS 2
source /opt/ros/humble/setup.bash
# Start ROS bridge
python3 ros_integration/ros_cognitive_bridge.pyAll configuration is managed through environment variables in .env:
# Core Services
COGNITIVE_LAYER_URL=http://localhost:8000
PLANNING_LAYER_URL=http://localhost:8001
OLLAMA_BASE_URL=http://localhost:11434
# Supermemory (Cloud Memory)
SUPERMEMORY_API_KEY=sk-your-key-here
# Development
DEBUG=false
DEMO_MODE=false # Set to true for testing with fake dataImportant: Never commit .env files! Use .env.example as a template.
# Run all tests
pytest tests/
# Run specific layer tests
pytest tests/unit/test_cognitive_layer.py
pytest tests/unit/test_input_layer.py
pytest tests/unit/test_planning_layer.py
# Run integration tests
pytest tests/integration/
# Test with demo data
DEMO_MODE=true python3 brain_server.py- Python: Follow PEP 8
- Type Hints: Use type hints for function signatures
- Docstrings: Use Google-style docstrings
- Imports: Group imports (stdlib, third-party, local)
Example:
def process_event(event: EventFrame, threshold: float = 0.5) -> Dict[str, Any]:
"""
Process an event frame through cognitive analysis.
Args:
event: The event frame to process
threshold: Importance threshold for memory formation
Returns:
Dictionary containing processing results
"""
# Implementation
pass# Create feature branch
git checkout -b feature/your-feature-name
# Make changes and commit
git add .
git commit -m "feat: add new feature"
# Push to remote
git push origin feature/your-feature-name
# Create pull request on GitHubUse conventional commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
Before submitting a PR:
- β
All tests pass:
pytest tests/ - β Code follows style guidelines
- β Documentation updated (if needed)
- β No hardcoded values (use config)
- β
.envnot committed - β
Clear PR description with:
- What changed
- Why it changed
- How to test it
Test individual components in isolation:
# tests/unit/test_cognitive_layer.py
def test_event_processing():
from cognitive_layer import EgoGraph
ego_graph = EgoGraph()
event = {
"description": "Test event",
"user_name": "TestUser"
}
result = ego_graph.process_event_frame(event)
assert result["status"] == "processed"Test interactions between layers:
# tests/integration/test_full_pipeline.py
def test_camera_to_cognitive():
# Start services
# Send frame through pipeline
# Verify cognitive layer receives event
pass# Test with demo data
DEMO_MODE=true python3 brain_server.py
# Test with real camera
python3 -m input_layer.camera_server
# Test Supermemory integration
SUPERMEMORY_API_KEY=sk-your-key python3 scripts/test_supermemory.py "test memory"- Add to
requirements.txt - Document why it's needed
- Update
.env.exampleif new config needed - Test fresh install:
pip install -r requirements.txt
# In .env
DEBUG=true
LOG_LEVEL=DEBUG
# Or temporarily
DEBUG=true python3 brain_server.py# Cognitive Layer
curl http://localhost:8000/api/graph/state
# Planning Layer
curl http://localhost:8001/api/plan/status
# Ollama
curl http://localhost:11434/api/tagsIssue: ModuleNotFoundError: No module named 'config'
- Fix: Make sure you're running from the project root
Issue: SUPERMEMORY_API_KEY not set
- Fix: Add key to
.envor setDEMO_MODE=true
Issue: Connection refused to localhost:8000
- Fix: Start the cognitive layer server first
When adding new features:
- Update relevant README in layer directory
- Add docstrings to functions/classes
- Update API documentation if endpoints change
- Add examples to
EXAMPLE_PROMPTS.md
- Questions: Open a GitHub issue with
questionlabel - Bugs: Open a GitHub issue with
buglabel - Features: Open a GitHub issue with
enhancementlabel
- Test with
DEMO_MODE=truefor quick iteration - Use WebSocket to see real-time graph updates
- Check
chroma_db/for local memory storage
- Use video files for consistent testing
- Mock cognitive layer API for isolated testing
- Test with different lighting conditions
- Download Cosmos model before showcase:
huggingface-cli download nvidia/Cosmos-Reason1-7B - Test Ollama fallback: stop Cosmos and verify Ollama takes over
- Monitor GPU usage:
nvidia-smi -l 1
- Test in simulation first (Gazebo)
- Verify location mappings in
turtlebot3_house_map.json - Check ROS topics:
ros2 topic list
# Build and run all services
docker-compose up
# Build specific service
docker-compose build cognitive-layer
# View logs
docker-compose logs -f cognitive-layer# Production mode (no demo data)
DEMO_MODE=false python3 brain_server.py
# With Supermemory
SUPERMEMORY_API_KEY=sk-your-key python3 brain_server.py[Add license information]
- Texas A&M TURTLE Lab
- Ollama for LLM capabilities
- NVIDIA for Cosmos models
- Supermemory for cloud memory storage
Happy coding! π