Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ logs
*.log
__pycache__
*.pyc
.vscode
.vscode
.DS_Store
60 changes: 35 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ cd crazyflie_benchmark
python main.py --list-tests

# Run a benchmark in simulation
python main.py --config config/simulator_config.yaml --test-plan step_tests.yaml
python main.py --config config/simulator_config.yaml --plan step_tests.yaml

# Run a benchmark on real hardware
python main.py --config config/hardware_config.yaml --test-plan step_tests.yaml
python main.py --config config/hardware_config.yaml --plan step_tests.yaml
```

## Test Plans
Expand All @@ -151,33 +151,43 @@ tests:
duration: 1.5 # seconds

- type: "step"
channel: "pitch"
amplitude: 5.0 # degrees
duration: 1.5 # seconds
```

## Analyzing Results

Test results are automatically logged in the `logs/` directory, with separate folders for simulation and real hardware tests. The framework provides tools for analyzing and visualizing test results:

```bash
# Analyze a specific test run
python main.py --analyze logs/20250513_001722-step-real/

# Generate plots and metrics
python main.py --analyze logs/20250513_001722-step-real/ --plots --metrics
```

## Sim-to-Real Comparison

The framework enables direct comparison between simulation and real hardware performance:

```bash
# Compare sim and real tests
python main.py --compare logs/sim/20250513_005534-step-sim/ logs/real/20250513_001722-step-real/
```

This will generate comparative metrics and plots showing the differences between simulation and reality.
Test results are automatically logged as CSV files in the `crazyflie_benchmark/logs/` directory.

### Single Log Analysis
Use the provided tool to generate plots and statistics:
```bash
# Interactive mode (shows plots in window)
python crazyflie_benchmark/main.py --analyze crazyflie_benchmark/logs/flight_log_YYYYMMDD_HHMMSS.csv

# Save plots to file
python crazyflie_benchmark/main.py --analyze crazyflie_benchmark/logs/flight_log_YYYYMMDD_HHMMSS.csv --save
```
When using `--save`, plots will be saved in a new directory named after the log file.

## Sim-to-Real Comparison

To compare simulation and real hardware performance:

1. Run the same test plan on both simulator and real hardware.
2. Use the comparison tool:
```bash
# Interactive mode
python crazyflie_benchmark/main.py --compare \
crazyflie_benchmark/logs/sim_log.csv \
crazyflie_benchmark/logs/real_log.csv \
--label1 "Simulation" --label2 "Real Hardware"

# Save comparison plots
python crazyflie_benchmark/main.py --compare \
crazyflie_benchmark/logs/sim_log.csv \
crazyflie_benchmark/logs/real_log.csv \
--label1 "Simulation" --label2 "Real Hardware" \
--save
```

## Configuration

Expand Down
8 changes: 0 additions & 8 deletions crazyflie_benchmark/__init__.py

This file was deleted.

7 changes: 0 additions & 7 deletions crazyflie_benchmark/analyze/__init__.py

This file was deleted.

247 changes: 0 additions & 247 deletions crazyflie_benchmark/analyze/analyze.py

This file was deleted.

Loading