-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add residual torque to TORQUE_ACTIVATIONS_DRIVEN function #623
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 19 of 19 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @AnaisFarr)
bioptim/dynamics/configure_problem.py
line 1233 at r1 (raw file):
name = "residual_tau" name_residual_tau = ConfigureProblem._get_kinematics_based_names(nlp, name) ConfigureProblem._adjust_mapping(name, ["qdot", "taudot"], nlp) ### @pariterre???
I agree
Code quote:
### @pariterre???
bioptim/dynamics/dynamics_functions.py
line 270 at r1 (raw file):
tau_residual = DynamicsFunctions.get(nlp.controls["residual_tau"], controls) tau = nlp.model.torque(tau_activation, q, qdot) tau = tau + tau_residual if with_residual_torque else tau
Please add the ():
(tau + tau_residual) if with_residual_torque else tau
Code quote:
tau + tau_residual if with_residual_torque else tau
bioptim/dynamics/dynamics_functions.py
line 271 at r1 (raw file):
tau = nlp.model.torque(tau_activation, q, qdot) tau = tau + tau_residual if with_residual_torque else tau tau = tau + nlp.model.passive_joint_torque(q, qdot) if with_passive_torque else tau
Add the () here too, just to make sure
bioptim/examples/torque_driven_ocp/residual_torque_actuator.py
line 2 at r1 (raw file):
""" This is an example of the use of torque actuator using a model of 2 segments and 2 degrees of freedom
torque_activation_driven.py ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please black with -l120 (and not the default -l80)
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @AnaisFarr)
This reverts commit d9910e1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 14 of 14 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @AnaisFarr)
bioptim/examples/torque_driven_ocp/residual_torque_actuator.py
line 2 at r1 (raw file):
Previously, pariterre (Pariterre) wrote…
torque_activation_driven.py ?
Please change this file name
bioptim/examples/torque_driven_ocp/residual_torque_actuator.py
line 121 at r2 (raw file):
sol.print_cost() print(sol.states) print(sol.controls)
Do not add these prints
Code quote:
print(sol.states)
print(sol.controls)
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #623 +/- ##
==========================================
+ Coverage 81.67% 81.69% +0.01%
==========================================
Files 106 107 +1
Lines 11805 11849 +44
==========================================
+ Hits 9642 9680 +38
- Misses 2163 2169 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Ready to merge @pariterre |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @EveCharbie)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @EveCharbie)
All Submissions:
New Feature Submissions:
black . -l120 --exclude "external/*"
)?Changes to Core Features:
This change is