Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding updates for Quadrotor #166

Open
wants to merge 262 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
262 commits
Select commit Hold shift + click to select a range
84830df
edit bash file with correct arg name
middleyuan Jul 10, 2023
e69e048
add another host in gpmpc_hpo.sh
middleyuan Jul 10, 2023
097e1c2
change to new dir in gpmpc_hpo.sh
middleyuan Jul 10, 2023
405dcea
1. fix a small bug 2. add test_train_gpmpc_cartpole
middleyuan Jul 11, 2023
549ff3e
add a hpo parallelism test
middleyuan Jul 11, 2023
81b5602
saving before runing hpo
middleyuan Jul 11, 2023
a5ad5f2
I think the bug is that it reaches thee goal in the first step.
middleyuan Jul 11, 2023
ce4d75e
1. PPO configs. 2. Make cartpole init states harder. 3. First version…
middleyuan Jul 18, 2023
b40566c
Re-organize a bit (file name, remove __init__.py in test folders).
middleyuan Jul 18, 2023
23f571d
1. HPO strategies. 2. test on hpo for ppo. 3. another way to save che…
middleyuan Jul 22, 2023
802edb6
update gitignore
middleyuan Jul 24, 2023
02d1c33
change configs
middleyuan Jul 24, 2023
20d3a7f
update bash for hpo on gpmpc
middleyuan Jul 24, 2023
ad96f6f
add prior arg in gpmpc_sampler
middleyuan Jul 24, 2023
5318c25
1. HPO effort evaluations. 2. Bash file for hpo strategy evalution.
middleyuan Jul 24, 2023
924d3b3
update dependencies
middleyuan Jul 25, 2023
14ae2aa
add the freedom to choose between random sampler and TPE sampler.
middleyuan Jul 26, 2023
c0b1b34
1. add strategy 5. 2. add unit test accordingly.
middleyuan Aug 3, 2023
f5c3a5a
1. prior configs. 2. update eval.py, sen.sh, and .gitifonore.
middleyuan Aug 3, 2023
0e1248a
gpmpc hpo strategy study
middleyuan Aug 4, 2023
a0feec7
refactor the code
middleyuan Aug 7, 2023
bd39347
1. hpo on sac. 2. add activation arg in sac and fix a small bug.
middleyuan Aug 8, 2023
4342b2a
fix typos
middleyuan Aug 8, 2023
1e1f7cf
change to two jobs
middleyuan Aug 9, 2023
b087c87
change num of repetitions to make sure it at least has same num of sa…
middleyuan Aug 9, 2023
59b4220
Merge branch 'hpo-on-ppo' into hpo-on-sac
middleyuan Aug 9, 2023
4c22c86
reduce the budget
middleyuan Aug 9, 2023
fe02a65
toy example
middleyuan Aug 10, 2023
3d33487
consider 4 version of noisy functions.
middleyuan Aug 11, 2023
714a76d
include var study
middleyuan Aug 13, 2023
2663cde
improve visualization in toy examples
middleyuan Aug 14, 2023
249a284
updated visualization improvement in toy examples.
middleyuan Aug 14, 2023
e03cb33
change naming
middleyuan Aug 14, 2023
ee29967
final experiment setup
middleyuan Aug 30, 2023
3a6448d
Merge branch 'hpo-on-ppo' into hpo-on-sac
middleyuan Aug 30, 2023
831e186
final experiment setup
middleyuan Aug 30, 2023
452937d
modify seeding
middleyuan Aug 30, 2023
7b4a844
Ignore runtime error for hpo
middleyuan Aug 31, 2023
bfd6f21
Merge branch 'hpo-on-ppo' into hpo-on-gpmpc
middleyuan Aug 31, 2023
e310829
Merge branch 'hpo-on-sac' into hpo-on-gpmpc
middleyuan Aug 31, 2023
c45e3e4
merge from sac
middleyuan Aug 31, 2023
8596fc8
fix a bug in hpo_sampler.py
middleyuan Aug 31, 2023
df01b80
final design to show possible lower compute time.
middleyuan Aug 31, 2023
9faae33
1. hpo on ddpg. 2. fix a small bug in ddpg_utils.
middleyuan Aug 31, 2023
de90501
relax the threshold
middleyuan Aug 31, 2023
4322f67
relax the threshold
middleyuan Sep 1, 2023
038f046
make rl_hpo_strategy_eval.sh automatic.
middleyuan Sep 4, 2023
4703d8b
Merge branch 'hpo-on-ppo' into hpo-on-sac
middleyuan Sep 4, 2023
807e358
Merge branch 'hpo-on-ppo' into hpo-on-ddpg
middleyuan Sep 4, 2023
6590134
fix a bug in rl_hpo_strategy_eval.sh
middleyuan Sep 4, 2023
8c594c3
Merge branch 'hpo-on-ppo' into hpo-on-sac
middleyuan Sep 4, 2023
87cbd1e
Merge branch 'hpo-on-ppo' into hpo-on-ddpg
middleyuan Sep 4, 2023
8211c52
add gpmpc_hpo_strategy_eval.sh
middleyuan Sep 4, 2023
26536e9
fix a small bug
middleyuan Sep 4, 2023
5bca27a
fix the budget (trial) bug in configs.
middleyuan Sep 5, 2023
f083b64
prepare comparing hpo strategy on gpmpc
middleyuan Sep 5, 2023
bed32ce
fix a bug in gpmpc_hpo_strategy.sh
middleyuan Sep 5, 2023
9503398
fix bugs in bash files
middleyuan Sep 5, 2023
6cd934f
fix the trial bug in config
middleyuan Sep 5, 2023
ecb27b1
fix a function bug in eval.py
middleyuan Sep 5, 2023
69d416b
Merge branch 'hpo-on-ppo' into hpo-on-ddpg
middleyuan Sep 5, 2023
a1b0756
1. add hpo resume functionality. 2. make eval function more general.
middleyuan Sep 6, 2023
c88e7e7
Merge branch 'hpo-on-ppo' into hpo-on-sac
middleyuan Sep 6, 2023
a9aa83b
update configs
middleyuan Sep 6, 2023
7f791aa
make main.sh general
middleyuan Sep 6, 2023
d8d047b
Merge branch 'hpo-on-ppo' into hpo-on-sac
middleyuan Sep 6, 2023
1e16f06
Merge branch 'hpo-on-ppo' into hpo-on-ddpg
middleyuan Sep 6, 2023
c4a8ded
resume previous config with trial increasd.
middleyuan Sep 6, 2023
80e59ec
fix the sorting bug.
middleyuan Sep 11, 2023
1a3a98a
Merge branch 'hpo-on-ppo' into hpo-on-ddpg
middleyuan Sep 11, 2023
43387d5
Merge branch 'hpo-on-ppo' into hpo-on-sac
middleyuan Sep 11, 2023
952b267
fix sorting bug
middleyuan Sep 11, 2023
7f62195
a small bug fixed
middleyuan Sep 12, 2023
d5109f4
fix a bug on computing reward
middleyuan Sep 12, 2023
1618395
Merge branch 'hpo-on-ppo' into hpo-on-gpmpc
middleyuan Sep 14, 2023
778128b
adsd resume functionality
middleyuan Sep 14, 2023
61ea053
edit main bash file and fix some typos
middleyuan Sep 14, 2023
1caae68
simply assign zero if numerical issues happen during HPO
middleyuan Sep 14, 2023
8583978
Merge branch 'hpo-on-ppo' into hpo-on-gpmpc
middleyuan Sep 14, 2023
f9f701d
adjust eval
middleyuan Sep 16, 2023
5caf0c6
change to boxenplot
middleyuan Sep 19, 2023
eea138a
fix typo
middleyuan Sep 21, 2023
362ea75
add reliable_stats
middleyuan Sep 24, 2023
3649c44
Merge branch 'hpo-on-gpmpc' into hpo-on-ppo
middleyuan Sep 24, 2023
d6e0b08
Merge branch 'hpo-on-ddpg' into hpo-on-ppo
middleyuan Sep 24, 2023
55624cd
update outdated configs
middleyuan Sep 24, 2023
6e9bbc9
Merge remote-tracking branch 'origin/hpo-on-sac' into hpo-on-ppo
middleyuan Sep 24, 2023
02d75ad
update jupyter notebooks
middleyuan Oct 5, 2023
00f6608
update jupyter notebooks.
middleyuan Oct 23, 2023
b5749d0
final update for appendix
middleyuan Oct 24, 2023
e4d616d
update readme
middleyuan Oct 24, 2023
ef29146
fix typo
middleyuan Oct 25, 2023
7a191a5
add training test on 2D quadrotor
middleyuan Mar 21, 2024
47f1598
1. clean up code for ppo controller, hyperparameter module. 2. Test o…
middleyuan Apr 10, 2024
83ec989
test training with given optimized hp files.
middleyuan Apr 10, 2024
e890c04
1. test hpo with and without MySQL. 2. update README.
middleyuan Apr 10, 2024
e9499cd
remove discrepancy of readme.
middleyuan Apr 10, 2024
c45a975
update readme
middleyuan Apr 10, 2024
8350b63
1. remove 'pandas' and 'seaborn' in package dependencies. 2. move tes…
middleyuan Apr 15, 2024
ee9ec34
-
middleyuan Apr 15, 2024
a260695
update config_overrides in examples of rl
middleyuan Apr 15, 2024
13ef164
run pre-commit hooks to improve linting
middleyuan Apr 16, 2024
3bbd0ba
1. ignore W503 and W504 as they conflict in pre-commit-config. 2. run…
middleyuan Apr 16, 2024
56f2738
add activation config to the examples that use RL.
middleyuan Apr 16, 2024
ba837c5
1. standardize hpo template in the examples. 2. remove _learn(). 3. a…
middleyuan Apr 17, 2024
51c601e
run pre-commit hooks.
middleyuan Apr 17, 2024
fb572f2
add gpmpc hpo test without using mysql
middleyuan Apr 17, 2024
c5fbeed
1. update config of cartpole task. 2. add max_steps and exponentiated…
middleyuan Apr 19, 2024
f8e3d0c
1. add bash files to automate hpo pipeline for gpmpc. 2. update gpmpc…
middleyuan Apr 22, 2024
1f62d3b
Merge remote-tracking branch 'upstream/main' into hpo
middleyuan Apr 22, 2024
ffb29de
match .gitignore to upstram/main.
middleyuan Apr 22, 2024
5cf3247
update .gitignore
middleyuan Apr 22, 2024
e395dc1
1. update rl config. 2. add rl hpo bash script.
middleyuan Apr 22, 2024
3bbe225
add main.sh for rl hpo.
middleyuan Apr 22, 2024
764fae5
fix typo
middleyuan Apr 22, 2024
2d3c644
fix relative path.
middleyuan Apr 22, 2024
60f934f
fix typo
middleyuan Apr 22, 2024
54c9ded
add rl hpo bash scripts
middleyuan Apr 24, 2024
087f3b3
record all data in BaseExperiment class.
middleyuan Apr 25, 2024
f8d3eb4
Merge branch 'hpo-dev' into unified-quadrotor-interface
middleyuan Apr 25, 2024
6dae1d3
first version of 2D quadrotor with attitude control
middleyuan Apr 29, 2024
f52f81b
working version of PID as position control
middleyuan Apr 30, 2024
af8b3c6
1. Both PPO and PID is working. 2. Tune the objective function and ch…
middleyuan May 3, 2024
f4ab93d
1. improve sac. 2. introduce magic number that works both for sac and…
middleyuan May 7, 2024
de4558f
tune sac on quadrotor for better performance.
middleyuan May 8, 2024
448a511
1. new hpo configs with rmse as the objective. 2. turning q and r int…
middleyuan May 13, 2024
046b81d
default HPs for GPMPC on quadrotor 2D task.
middleyuan May 14, 2024
5fcfa9b
add configs for gpmpc on 2D quadrotor with attitude controller.
middleyuan May 14, 2024
ce9662f
new trick on sac
middleyuan May 15, 2024
46eee1a
improve sac using the new trick.
middleyuan May 15, 2024
b4508bb
edit quadrotor_2D.sh
middleyuan May 15, 2024
a9dba8c
add submodule
middleyuan May 21, 2024
621f06d
add submodule
middleyuan May 21, 2024
359ec1b
initial commit for erahbo.
middleyuan May 27, 2024
79e7014
update submodule.
middleyuan May 28, 2024
8e71901
update script for specifying max processes.
middleyuan May 28, 2024
dbfb011
update submodule.
middleyuan May 28, 2024
ae50011
change target_kl and entropy_coef to log scale.
middleyuan May 29, 2024
4c50db0
update submodule.
middleyuan May 29, 2024
b848d94
change ppo hp search space.
middleyuan May 30, 2024
8229ba3
change hp search space back to the original setting.
middleyuan May 31, 2024
cdf5a19
1. gpmpc loading for gp models. 2. plot func in hpo_experiment.py
middleyuan Jun 1, 2024
280c414
merge from mingxuan's acados gpmpc.
middleyuan Jun 7, 2024
4714b3f
test
svsawant Jun 7, 2024
2048b44
TD3 + quad attitude interface with pitch rate
svsawant Jun 10, 2024
aac36b9
training sh file
svsawant Jul 5, 2024
84b90a8
add 3D rk4 sim env
MingxuanChe Jul 5, 2024
040ab7f
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
MingxuanChe Jul 5, 2024
020a4f8
Revert "add 3D rk4 sim env"
MingxuanChe Jul 5, 2024
e6dbcd7
add quad dyn sim and rk4 sim option
MingxuanChe Jul 5, 2024
fc44788
remove time printing
MingxuanChe Jul 5, 2024
196b6f1
add cartpole model-based method config
MingxuanChe Jul 8, 2024
ca803c0
Merge remote-tracking branch 'origin/hpo-dev' into benchmark
middleyuan Jul 10, 2024
9f6417a
update identified pitch model
MingxuanChe Jul 11, 2024
aa4090a
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
MingxuanChe Jul 11, 2024
dc38b67
add contraction lqr for 2D quad
MingxuanChe Jul 12, 2024
7051207
move attitude ctrl to env
MingxuanChe Jul 15, 2024
b698369
fix acados gp mpc constructor
MingxuanChe Jul 15, 2024
c7591d8
add discrete-time tracking
MingxuanChe Jul 18, 2024
c16c2ad
update attitude ctrl env setup
MingxuanChe Jul 18, 2024
f286295
update attitude ctrl env setups
MingxuanChe Jul 18, 2024
d30e96c
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
MingxuanChe Jul 22, 2024
c805b9f
HPO support for ilqr, gpmpc, gpmpc_acados, and ppo on cartpole. Corr…
middleyuan Jul 24, 2024
6f8d056
1. add pandas dependency required for hpo. 2. add hpo.sh.
middleyuan Jul 24, 2024
abdaaba
bug fix for trial counting.
middleyuan Jul 24, 2024
938fe19
tracking lqr clean-up
MingxuanChe Jul 26, 2024
5e3b74a
fix lqr tracking step count
MingxuanChe Jul 29, 2024
bc026ac
add sparse GP option
MingxuanChe Jul 30, 2024
b544f6a
add sysID simulator
MingxuanChe Aug 1, 2024
3ef1b45
fix ilqr max steps
MingxuanChe Aug 1, 2024
f014dd8
update quad params and cartpole default constraints
MingxuanChe Aug 1, 2024
9d8b67f
update batch gp naming
MingxuanChe Aug 4, 2024
cd0065a
udpate gpmpc plotting scripts
MingxuanChe Aug 5, 2024
a19e8e4
fix sparse GP val setting and ocp reset; add timing deco
MingxuanChe Aug 6, 2024
b97e372
update gpmpc plotting
MingxuanChe Aug 6, 2024
efc4389
fix sim seeding
MingxuanChe Aug 8, 2024
2e3ead9
minor fix plotting length
MingxuanChe Aug 8, 2024
5869545
add nonlinear prior for gpmpc
MingxuanChe Aug 9, 2024
361064f
fix linearization point
MingxuanChe Aug 11, 2024
13d2acf
update mpc for hardware training
MingxuanChe Aug 16, 2024
3330b23
rmse fix for ppo and sac
svsawant Aug 21, 2024
a512448
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
svsawant Aug 21, 2024
eb282ec
update tracking task config for HPO
MingxuanChe Aug 23, 2024
464b774
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
MingxuanChe Aug 23, 2024
d6c357d
fix typo in config indent
MingxuanChe Aug 27, 2024
77ea61b
add hpo for ilqr with safety filter.
middleyuan Aug 30, 2024
e02b4ea
update configs and unittest for training quadrotor_2D_attitude.
middleyuan Aug 30, 2024
307e5a6
update gpmpc acados config for HPO
MingxuanChe Sep 3, 2024
86b1788
hpo works for ilqr, gpmpc, and ppo.
middleyuan Sep 4, 2024
c270800
Merge branch 'benchmark' of https://github.com/middleyuan/safe-contro…
middleyuan Sep 4, 2024
7466b80
1. add exponentiated mse metric. 2. add seed to control env randoness…
middleyuan Sep 6, 2024
9433e48
add disturbance force for dys_si option with euler update
MingxuanChe Sep 6, 2024
d2b3cfb
update ilqr hardware compatibility
MingxuanChe Sep 6, 2024
089ec7c
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
MingxuanChe Sep 6, 2024
28232e5
minor updates
MingxuanChe Sep 6, 2024
be526a5
initial traj and radar plot script
MingxuanChe Sep 6, 2024
b413965
update hand-tune hp; update quad sim and plotting scripts
MingxuanChe Sep 6, 2024
c36c2b5
add data for test hull plotting
MingxuanChe Sep 6, 2024
93301d9
add data for test hull plotting
MingxuanChe Sep 6, 2024
f99d6cd
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
MingxuanChe Sep 6, 2024
22051a6
add more detailed logging in hpo.
middleyuan Sep 9, 2024
f4f6f2b
Merge branch 'benchmark' of https://github.com/middleyuan/safe-contro…
middleyuan Sep 9, 2024
fe1fa54
fix config saving for hpo.
middleyuan Sep 9, 2024
098653a
updated configs for ppo
svsawant Sep 9, 2024
1200107
updated configs for ppo
svsawant Sep 9, 2024
773dbeb
add standard SE kernel
MingxuanChe Sep 9, 2024
fc5b982
update MPC solver failure handeling; terminal cost and ancilliary gai…
MingxuanChe Sep 9, 2024
6471397
add noise robustness test and plotting
MingxuanChe Sep 9, 2024
b9bdadf
small fix for rmse compute for ppo and sac
svsawant Sep 9, 2024
e00213b
Revert "small fix for rmse compute for ppo and sac"
svsawant Sep 9, 2024
533ef60
Merge remote-tracking branch 'origin/benchmark' into benchmark
svsawant Sep 9, 2024
2e8120b
small fix for rmse compute for ppo and sac
svsawant Sep 9, 2024
0c6f142
small fix for rmse compute for ppo and sac 2
svsawant Sep 9, 2024
1ddd2fd
small fix for faster simulation in quad
svsawant Sep 11, 2024
1085d71
fix 2
svsawant Sep 11, 2024
d759cdb
Set done_on_max_steps to False during HPO.
middleyuan Sep 12, 2024
618ae9d
Merge branch 'benchmark' of https://github.com/middleyuan/safe-contro…
middleyuan Sep 12, 2024
a9fd4b9
change hyperparameter search space for ppo to avoid batch zero error …
middleyuan Sep 12, 2024
b779bfc
lqr clean up
svsawant Sep 14, 2024
bc2a962
learning from ilqr trajectory as reference
svsawant Sep 14, 2024
ea98928
add prior info for ilqr
MingxuanChe Sep 14, 2024
d78d42d
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
MingxuanChe Sep 15, 2024
40d2dd4
fix ilqr feasible traj setup
MingxuanChe Sep 15, 2024
5f92e50
udpate gp training result plotting
MingxuanChe Sep 15, 2024
dee3a44
GPcollection level input normalize; update GP training plotting
MingxuanChe Sep 15, 2024
a8c32d7
1. add Vizier option. 2. add parallel_job option in hpo.sh. 3. add t…
middleyuan Sep 16, 2024
101002f
Merge branch 'benchmark' of https://github.com/middleyuan/safe-contro…
middleyuan Sep 16, 2024
951a7b2
1. update dependencies. 2. distinguish discrete and categorical hyper…
middleyuan Sep 16, 2024
228c07a
1. fix type issue in hpo. 2. change space to log scale for learning r…
middleyuan Sep 16, 2024
67f09fc
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
MingxuanChe Sep 16, 2024
472c2f3
set done_on_max_steps to False.
middleyuan Sep 16, 2024
7aa3940
Merge branch 'benchmark' of github.com:middleyuan/safe-control-gym in…
MingxuanChe Sep 16, 2024
af8f1b1
rollback quad ref to only x-z ref
MingxuanChe Sep 16, 2024
fb75194
small fixes to ppo, sac and td3
svsawant Sep 17, 2024
781505d
Merge remote-tracking branch 'origin/benchmark' into benchmark
svsawant Sep 17, 2024
35696db
1. avoid evaluation during hpo for ppo. 2. Save trials and plot for V…
middleyuan Sep 18, 2024
5972ea8
Merge branch 'benchmark' of https://github.com/middleyuan/safe-contro…
middleyuan Sep 18, 2024
017d9d3
improve logging during hpo.
middleyuan Sep 18, 2024
930b63d
change database to SQLite.
middleyuan Sep 18, 2024
68bcb87
Prepare for deploying on cluster: 1. add weights & Biases. 2. improve…
middleyuan Sep 20, 2024
b8094e3
Merge remote-tracking branch 'middleyuan/benchmark' into developmental
svsawant Sep 24, 2024
f75a85a
small fix 1
svsawant Sep 24, 2024
fcc5bae
Auto stash before merge of "middleyuan/benchmark" and "developmental"
svsawant Sep 24, 2024
f11c62d
fixes for config files, etc.
svsawant Sep 25, 2024
a1e1572
updated models for safe explorer ppo
svsawant Sep 25, 2024
a523715
fix 2
svsawant Sep 25, 2024
7530482
fix 3
svsawant Sep 25, 2024
f716ce9
gitignore update
svsawant Sep 28, 2024
5828716
WIP on developmental
svsawant Sep 30, 2024
f4cfce8
add ilqr hardware compatibility code; add traj stet reset
MingxuanChe Sep 30, 2024
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: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ examples/mpsc/unsafe_rl_temp_data/
examples/pid/*data/
#
results/
Results/
z_docstring.py
TODOs.md

Expand Down Expand Up @@ -147,3 +148,5 @@ dmypy.json

# Pyre type checker
.pyre/

.idea/
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
algo: ilqr
algo_config:
# Cost parameters
q_lqr: [18.0, 0.0017, 18.0, 0.004, 18.0, 0.0017]
r_lqr: [0.001, 0.001]

# Model arguments
# Note: Higher simulation frequency is required if using controller designed
# based on the continuous-time model
discrete_dynamics: True

# iLQR arguments
max_iterations: 15
lamb_factor: 10
lamb_max: 1000
epsilon: 0.01

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
algo: ilqr
algo_config:
# Cost parameters
q_lqr: [18.0, 0.0017, 18.0, 0.004, 18.0, 0.0017]
r_lqr: [0.001, 0.001]

# Model arguments
# Note: Higher simulation frequency is required if using controller designed
# based on the continuous-time model
discrete_dynamics: True

# iLQR arguments
max_iterations: 15
lamb_factor: 10
lamb_max: 1000
epsilon: 0.01

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
algo: lqr
algo_config:
# Cost parameters
q_lqr: [1, 0.1, 1, 0.1, 0.1, 0.1]
r_lqr: [0.1]

# Model arguments
# Note: Higher simulation frequency is required if using controller designed
# based on the continuous-time model
discrete_dynamics: True
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
algo: lqr
algo_config:
# Cost parameters
q_lqr: [1, 0.1, 1, 0.1, 0.1, 0.1]
r_lqr: [0.1]

# Model arguments
# Note: Higher simulation frequency is required if using controller designed
# based on the continuous-time model
discrete_dynamics: True
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
task_config:
seed: 1337
info_in_reset: True
ctrl_freq: 60
pyb_freq: 60
physics: dyn_si
quad_type: 4

init_state_randomization_info:
init_x:
distrib: 'uniform'
low: -1
high: 1
init_x_dot:
distrib: 'uniform'
low: -0.1
high: 0.1
init_z:
distrib: 'uniform'
low: 0.5
high: 1.5
init_z_dot:
distrib: 'uniform'
low: -0.1
high: 0.1
init_theta:
distrib: 'uniform'
low: -0.2
high: 0.2
init_theta_dot:
distrib: 'uniform'
low: -0.1
high: 0.1
randomized_init: True
randomized_inertial_prop: False

task: stabilization
task_info:
stabilization_goal: [0, 1]
stabilization_goal_tolerance: 0.0

episode_len_sec: 6
cost: quadratic
done_on_out_of_bound: True
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
task_config:
seed: 1337
info_in_reset: True
ctrl_freq: 60
pyb_freq: 60
physics: dyn_si
quad_type: 4

init_state:
init_x: 0
init_x_dot: 0
init_z: 1.0
init_z_dot: 0
init_theta: 0
init_theta_dot: 0
randomized_init: False
randomized_inertial_prop: False

init_state_randomization_info:
init_x:
distrib: 'uniform'
low: -0.05
high: 0.05
init_x_dot:
distrib: 'uniform'
low: -0.05
high: 0.05
init_z:
distrib: 'uniform'
low: -0.05
high: 0.05
init_z_dot:
distrib: 'uniform'
low: -0.05
high: 0.05
init_theta:
distrib: 'uniform'
low: -0.05
high: 0.05
init_theta_dot:
distrib: 'uniform'
low: -0.05
high: 0.05

task: traj_tracking
task_info:
trajectory_type: figure8
num_cycles: 1
trajectory_plane: 'xz'
trajectory_position_offset: [0, 1.]
trajectory_scale: 0.5

inertial_prop:
M: 0.027
Iyy: 1.4e-05

episode_len_sec: 6
cost: quadratic
obs_goal_horizon: 0

# RL Reward
rew_state_weight: [10.0, 0.1, 10.0, 0.1, 0.1, 0.001]
rew_act_weight: 0.1
rew_exponential: True

# disturbances:
# observation:
# - disturbance_func: white_noise
# std: [5.6e-05, 1.5e-02, 2.9e-05, 8.0e-03, 1.3e-03, 3.6e-01]

constraints:
- constraint_form: default_constraint
constrained_variable: state
# upper_bounds: [2, 1, 2, 1, 0.2, 2.5]
# lower_bounds: [-2, -1, 0, -1, -0.2, -2.5]
- constraint_form: default_constraint
constrained_variable: input
upper_bounds: [0.47628, 0.4]
lower_bounds: [0.079, -0.4]

done_on_out_of_bound: True
done_on_violation: False
3 changes: 2 additions & 1 deletion examples/lqr/lqr_experiment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

# SYS='cartpole'
# SYS='quadrotor_2D'
SYS='quadrotor_3D'
SYS='quadrotor_2D_attitude'
# SYS='quadrotor_3D'

# TASK='stabilization'
TASK='tracking'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
algo: linear_mpc
algo_config:
horizon: 20
r_mpc:
- 0.1
- 0.1
q_mpc:
- 5.0
- 0.1
- 5.0
- 0.1
- 0.1
- 0.1
# Prior info
prior_info:
prior_prop: null
randomize_prior_prop: False
prior_prop_rand_info: null
warmstart: True
solver: qrqp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
algo: linear_mpc
algo_config:
horizon: 40
r_mpc:
- 0.1
- 0.1
q_mpc:
- 1.0
- 0.1
- 1.0
- 0.1
- 0.1
- 0.1
# Prior info
prior_info:
prior_prop: null
randomize_prior_prop: False
prior_prop_rand_info: null
warmstart: True
solver: qrqp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
algo: mpc
algo_config:
horizon: 20
r_mpc:
- 0.1
- 0.1
q_mpc:
- 5.0
- 0.1
- 5.0
- 0.1
- 0.1
- 0.1
# Prior info
prior_info:
prior_prop: null
randomize_prior_prop: False
prior_prop_rand_info: null
warmstart: True
solver: ipopt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
algo: mpc
algo_config:
horizon: 20
r_mpc:
- 0.1
- 0.1
q_mpc:
- 5.0
- 0.1
- 5.0
- 0.1
- 0.1
- 0.1
# Prior info
prior_info:
prior_prop: null
randomize_prior_prop: False
prior_prop_rand_info: null
warmstart: True
solver: ipopt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
task_config:
seed: 1337
info_in_reset: True
ctrl_freq: 50
pyb_freq: 1000
gui: False
physics: pyb
quad_type: 4

init_state_randomization_info:
init_x:
distrib: 'uniform'
low: -1
high: 1
init_x_dot:
distrib: 'uniform'
low: -0.1
high: 0.1
init_z:
distrib: 'uniform'
low: 0.5
high: 1.5
init_z_dot:
distrib: 'uniform'
low: -0.1
high: 0.1
init_theta:
distrib: 'uniform'
low: -0.2
high: 0.2
init_theta_dot:
distrib: 'uniform'
low: -0.1
high: 0.1
randomized_init: True
randomized_inertial_prop: False

task: stabilization
task_info:
stabilization_goal: [0, 1]
stabilization_goal_tolerance: 0.0

episode_len_sec: 6
cost: quadratic
done_on_out_of_bound: True

constraints:
- constraint_form: default_constraint
constrained_variable: input
- constraint_form: default_constraint
constrained_variable: state
Loading