Open ChiyenLee opened 2 years ago
Yes there is a way to do this. This file computes the the gradient of the residual wrt to the mechanism data = (previous state, control input, mass inertia, etc).
https://github.com/dojo-sim/Dojo.jl/blob/main/src/gradients/data.jl
then to get the gradient of the next state wrt to the mass, inertia. You'll need to implement something like get_maximal_gradients
https://github.com/dojo-sim/Dojo.jl/blob/main/src/gradients/state.jl
this means using the Iplicit function theorem i.e. computing d next_state/ d data = -d residual /d next_state ^-1 * d residual / d data
I can help you set this up if you want to work on this!
+1 on this as a desired feature. I'd be willing to help set it up in my spare time.
Is there a way to get access to gradients with respect to a mechanism's model parameters like inertia, mass, and center of mass?