-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
134 lines (97 loc) · 6.17 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# TODO
## general
[x] refactor parallelisation setup
[x] create new parameter struct without reading from file each time
- dont need to reset Z array as fixed variables stay fixed, variable ones change
- do need to reset torque generators to give correct conditions (cc angle, angvel etc)
[x] compare performance of Dierckx.jl with other packages - no real difference
[x] find better way to run optimisations
- [x] dont want to change initial_conditions.csv each time
- [x] dont want to change parallel_setup.jl to change VCMX
- still need to chane parallel_setup.jl to change swing data
[x] add functions to calculate forces
[x] quicker way to create and run a model from results.csv
[x] repeat stance phase optimisations
## whole stride optimisations
[x] virtual second contact
- [x] add a saving callback that saves the force (and any other variables of interest) produced at each timestep
- [x] fit a function to these variables e.g. rx/ry as functions of time
- [x] add flag to parameters to signal when second contact occuring
- [x] set values of virtual contact forces from function
[] maybe need to add air resistance?
- e.g. initial velocity 10.0 m/s
- end of stance #1 velocity 10.05 m/s
- velocity at start of stance #2 10.05 m/s
- velocity at end of stance #2 = 10.1 m/s
- accelerating!
[x] rmse comparison to data
[] what to do when simulation time longer than matching data
- use and evaluate functions instead?
[x] load_from_results needs to work with different length inputs
[x] reduce simulation time
[] redo parameter struct making it more modular?
[x] want cc angular velocity to be more stable
- decrease tolerances, but make simulation slower
[x] change simluation to two indiviual step simulations
- [x] calculate cost for two different sol's
- [x] sol.t of sol2 is at 0.001 s intervals after start time rather than at 0.001 intervals from 0.0
[] add check if first simulation can be terminated early
- removing second callback from com_drop decreased simulate time from 594 ms to 490 ms (upstairs pc)
- benefit for optimisation of ending bad parameters early vs improved optimisation time
[] plotting outputs for two sol's
[x] simulated annealing not working in parallel for optimisation
- lower tolerances mean the callback is missed
[x] may need to limit spline fitting callback to one call
- [x] a flag to make sure the virtual force only gets applied seems to work
[] alternate-dynamics ~2x faster than main branch (850 ms vs 475 ms)
- [x] try making Params non-mutable with forces in vector - no difference
- [x] fix type of virutal forces in eom - improved to 650 ms -- might be able to speed up alternate-dynamics too?
- [x] Params mutable struct which contains field `virtual_stance` which is a tuple{Bool, Function, Function} - no real difference 646 ms, 3.66 MiB
- [x] pass parameters to ODEProblem as one element Params[] - 8s ??????
- [x] create virtual force type
- [x] mutable type - no difference 860 ms, 193 MiB memory -- declaring types of vrx/y output in eom 640 ms 1.52 MiB
- [x] vector of immutable type with type declaration in eom - 630 ms 2.83 MiB
[x] objective errors with some x values (xfail.txt)
- [x] callback not being found so q2 crosses 0.0 -> large forces/accelerations -> angles tend to Inf -> domain errror
- [x] check its not a tolerance issue - does fix it (both 1e-7) and catches callback
[x] rerun best optimisation (17/01/2021) but with higher cost on hat match
- if still cant match with bounds at 3.0 then likley something in the model or cost function preventing it
- trunk leans forward due to high hf torque
- try with shorter ramp limits - if stance is not long enough to extend and being flexing then maybe wobbling mass should be added?
- only ran for 0.1s
[] remove end of simulation callback and instead run it for 0.484 s
- would expect simulated stride to be shorter due to rigidty
- would make overall optimisation run longer as would be simulating dud parameters for full time
[] parameters for best opt give really low torque-angvel component for hip flexor because cc angle is basically the same as joint angle (1e-15 smaller so doesnt get caught) - must be getting initialised with a tiny sec angle...
[x] still got out of domain error with lower tolerances
[x] include try catch block to prevent the optimisation from stopping completely - only errors with bad parameters anyway
- will allow tolerances to be higher now
[x] run optimisation to match joint angles without any ground contact or gravity (increase CoM position above ground, set initial vertical CoM velocity to zero and set gravity to zero)
- leave gravity on as it will affect joint torques
- EDITED:
- tolerances in optimisation
- initial conditions of mtpy and vocmy
- hat moi
[] new swing-leg
- [] accelerations are high for new angle driven joints, especially at the mtp - check its not a problem
[x] remove use of Dierckx.jl
- [x] numerically differentate input swing data in setup.jl - what to do about initial timepoints use dierckx splines initially to get values
- [x] fit interpolation object to each derivative
- [x] add function calling evaluation to Parameter struct
- 3x faster on evaluating 0th derivative and 40, 70x faster on 1st and 2nd derivative
- 22 vs 22 micro seconds for eom with interpolations - interpolations has more allocations though?
- 20s vs 10 s for simulate(prob)
- [x] remove use for virtual forces too
- 2.3 s for simulate(prob) now??
- ### loses some accuracy when fitting spline to derivatives
[x] running simulation no longer produces identical results
- some give error from try/catch block - which implies cost or simulate erroring
[x] convert back to two simulation simulation
- [x] change optimisation.jl functions
- ### SPECIFYING OUTPUT TYPE OF SPLINE FUNCTIONS MAKES FUNCTIONS TYPE STABLE ###
## Angle driven model
[x] angle definitions
[x] initial x positions for right foot
- seems to fail with callback on some parameter sets
- setting repeat_nudge > 1//100 seems to fix problem
[] optimisations