Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
8e1f8d1
fix structure
Nov 3, 2025
9d9fd1f
fix imports
Nov 3, 2025
d0711be
fix other import
Nov 3, 2025
7f9aa0f
fix imports
Nov 3, 2025
89dc810
dataset dataloader
Nov 3, 2025
2226af2
script run
Nov 3, 2025
b9958f6
implementation du data cleaner
tomajaniko Nov 3, 2025
31a4c4d
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
tomajaniko Nov 3, 2025
17efc47
add datapreparation
solalbaudoincs Nov 3, 2025
1894e5b
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 3, 2025
77bbe72
fix bad model name
solalbaudoincs Nov 3, 2025
1caa1af
fix bug
solalbaudoincs Nov 3, 2025
4abbede
fix dimensions and cleaning
Nov 3, 2025
680640b
lstm rnn
Nov 3, 2025
a414669
AAAAAAAAAAAAAAAAAAAA
solalbaudoincs Nov 3, 2025
38ae535
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 3, 2025
c3c2635
fix problems in last merge
solalbaudoincs Nov 3, 2025
e96e1d1
aaa
solalbaudoincs Nov 3, 2025
222cfa8
commande
Nov 4, 2025
32a84f9
control runner
Nov 4, 2025
7311f05
fix trainnng, add scheduler
solalbaudoincs Nov 4, 2025
f6e5be4
fix gitignore
solalbaudoincs Nov 4, 2025
df77dfb
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 4, 2025
2e47ff8
update commande
Nov 4, 2025
f6298ed
python python to 3.11 to use matlab bindings
solalbaudoincs Nov 4, 2025
f6d9442
first matlab attemtp
solalbaudoincs Nov 4, 2025
8fd839b
add plots back
solalbaudoincs Nov 4, 2025
a9a81cb
miam
solalbaudoincs Nov 4, 2025
a813ac1
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 4, 2025
cb36995
make simulator work
solalbaudoincs Nov 4, 2025
13fa2e2
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 4, 2025
6dbe730
fix bug
solalbaudoincs Nov 4, 2025
12dc45e
first version optim control
Nov 4, 2025
6f297b9
addd state reset to dronesimulator
solalbaudoincs Nov 4, 2025
a753326
add csv saving for data generation
solalbaudoincs Nov 4, 2025
02b6e28
add simulator profiling to confirm that matlab is taking time
solalbaudoincs Nov 4, 2025
33bd873
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 4, 2025
a91f588
ignore profiling files
solalbaudoincs Nov 4, 2025
23dca50
faster matlab bindings
solalbaudoincs Nov 4, 2025
abba220
fix optiim not working yet
Nov 4, 2025
567bdc6
deux mpc cvpy et torch
Nov 4, 2025
9caa7dd
fix merge problem and remove batch from gru
solalbaudoincs Nov 5, 2025
8ca17eb
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 5, 2025
295aa89
add simulink import checking
solalbaudoincs Nov 5, 2025
648f01b
fix demo
solalbaudoincs Nov 5, 2025
226d878
fix typing
solalbaudoincs Nov 5, 2025
3291286
dll builder
solalbaudoincs Nov 5, 2025
4aa789a
add built dll
solalbaudoincs Nov 5, 2025
e7124d2
fixed torch mpc works great
Nov 5, 2025
6cf1ff9
fixed mpc again
Nov 5, 2025
382c17f
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 5, 2025
fa5a3cb
add new scenario
tomajaniko Nov 5, 2025
b511d7e
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
tomajaniko Nov 5, 2025
fc69835
integrate compiled matlab into dronesimulator
solalbaudoincs Nov 5, 2025
4e339c8
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 5, 2025
0bcf0b9
added return of x, v, a for graphs
Nov 5, 2025
90d5c4e
added the return of trjectories
Nov 5, 2025
e1def96
remove prints
solalbaudoincs Nov 5, 2025
7d8ffb6
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 5, 2025
76633c5
bug in mpc cvxpy last fix in mpc torch
Nov 5, 2025
6275ca6
cvpx py mcp work
Nov 5, 2025
2f260a2
remove log and fix u centering
solalbaudoincs Nov 5, 2025
8f35997
fix .gitignore
solalbaudoincs Nov 5, 2025
dbff250
add matlab lib code
solalbaudoincs Nov 5, 2025
59a81d0
update params
solalbaudoincs Nov 5, 2025
1bbad6d
add compiled shared object
solalbaudoincs Nov 5, 2025
cb3d5f9
fix gitignore for .so
solalbaudoincs Nov 5, 2025
1640313
run model on device for mpc
solalbaudoincs Nov 5, 2025
ad20692
importing drone simulator shouldnt raise error
solalbaudoincs Nov 5, 2025
eaef6bd
dont import
solalbaudoincs Nov 5, 2025
096341a
load compiled matlab depending on the platform
solalbaudoincs Nov 5, 2025
2aa6c41
cpu and gpu profiling
solalbaudoincs Nov 6, 2025
b20d070
fix tensor device assignement and log more valeus from the controller
solalbaudoincs Nov 6, 2025
64f5d04
add graph generation for showcasing our controller
solalbaudoincs Nov 6, 2025
10cd463
trajectories optimisations
Nov 6, 2025
da38f9e
working version, make runs for presentations
Nov 6, 2025
3cfb701
add gradient descent early stopping
solalbaudoincs Nov 6, 2025
f599b30
zadzjlkqjgkdqj
solalbaudoincs Nov 6, 2025
768e495
some fixes on the mpc and model
Nov 6, 2025
3c88a37
fix params
NzoCs Nov 6, 2025
f4ccb75
fix the MPC for multi layer and add the scale
Nov 6, 2025
6a6d14a
fix tensorss to device
solalbaudoincs Nov 6, 2025
cd7a3a9
Merge branch 'master' of https://github.com/solalbaudoincs/dronecontrol
solalbaudoincs Nov 6, 2025
96ba594
Initial plan
Copilot Nov 7, 2025
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
19 changes: 17 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
data/
logs/
models_checkpoints/
predictions_plots/



# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so
!matlabfiles/codegen/lib/quadcopter_model/libquadcopter_model.so

# Distribution / packaging
.Python
Expand All @@ -14,7 +22,6 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
Expand Down Expand Up @@ -213,4 +220,12 @@ marimo/_lsp/
__marimo__/

# Streamlit
.streamlit/secrets.toml
.streamlit/secrets.toml


**.ckpt
models/accel_vs_voltage
logs
reports

*.prof
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11.13
37 changes: 37 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "Python: run_optim.py",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/run_optim.py",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "Python: run_model.py",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/run_model.py",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "Python: main.py",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/main.py",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python-envs.pythonProjects": []
}
File renamed without changes.
91 changes: 86 additions & 5 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,71 @@
scenarios:
# - name: "control_4_motors"
# data:
# input_file: "data/control_4_motors/_inputs.csv"
# states_file: "data/control_4_motors/_states.csv"
# derivatives_file: "data/control_4_motors/_derivatives.csv"
# output_file: "data/control_4_motors/out.csv"

# #processed_file: "data/processed/accel_vs_voltage.npz"
# input_dim: 4
# states_dim: 12
# derivatives_dim : 12
# output_dim : 12
# #use_simulink: false
# #simulink_model: "UAV_model.slx"
# #extra_simulink_samples: 0
# preprocessing:
# outlier_method: "iqr" # options: iqr, zscore
# normalize: true
# normalization_scope: "per_feature" # options: per_feature, global
# fill_method: "linear" # options: linear, cubic, nearest
# augmentation:
# noise_std: 0.01
# window_size: 50
# window_stride: 10
# training:
# models: ["gru"]
# epochs: 1000
# batch_size: 128
# lr: 0.1
# val_split: 0.2
# test_split: 0.1
# seed: 42
# early_stopping_patience: 10
# model_params:
# gru:
# hidden_dim: 16
# num_layers: 2
# dropout: 0.0
# rnn:
# hidden_dim: 16
# num_layers: 1
# dropout: 0.0
# scheduler:
# type: "ReduceLROnPlateau"
# params:
# patience: 10
# factor: 0.5
# min_lr: 0.000001
# control:
# methods: ["mpc"]
# horizon: 10
# rl_algorithm: "ppo" # options: ppo, ddpg
# mpc_weight_tracking: 1.0
# mpc_weight_smoothness: 0.1
# mpc_weight_effort: 0.01
# reporting:
# generate_pdf: true
# include_plots: true
# metrics_file: "results/control_4_motors/metrics.json"

- name: "accel_vs_voltage"
data:
input_file: "data/accel_vs_voltage/in.csv"
output_file: "data/accel_vs_voltage/out.csv"
processed_file: "data/processed/accel_vs_voltage.npz"
input_dim: 1
output_dim: 1
use_simulink: false
simulink_model: "UAV_model.slx"
extra_simulink_samples: 0
Expand All @@ -16,15 +78,34 @@ scenarios:
noise_std: 0.01
window_size: 50
window_stride: 10
simulink_noise_samples: 0
training:
models: ["linear", "gru"]
epochs: 50
batch_size: 32
lr: 0.001
models: ["gru"]
epochs: 1000
batch_size: 128
lr: 0.01
val_split: 0.2
test_split: 0.1
seed: 42
early_stopping_patience: 10
model_params:
gru:
hidden_dim: 32
num_layers: 2
dropout: 0.0
lstm:
hidden_dim: 16
num_layers: 1
dropout: 0.0
rnn:
hidden_dim: 8
num_layers: 1
dropout: 0.0
scheduler:
type: "ReduceLROnPlateau"
params:
patience: 10
factor: 0.5
min_lr: 0.000001
control:
methods: ["mpc"]
horizon: 10
Expand Down
3 changes: 3 additions & 0 deletions logs/accel_vs_voltage/linear/version_0/hparams.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
input_dim: 2000
lr: 0.001
output_dim: 2000
6 changes: 6 additions & 0 deletions logs/accel_vs_voltage/version_0/hparams.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dropout: 0.2
hidden_dim: 64
input_dim: 2000
lr: 0.001
num_layers: 2
output_dim: 2000
Loading
Loading