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

add torque readings for implicit actuator #172

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Guidelines for modifications:
* René Zurbrügg
* Ritvik Singh
* Rosario Scalise
* Chao Ni

## Acknowledgements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,10 +679,13 @@ def _apply_actuator_model(self):
self._joint_effort_target_sim[:, actuator.joint_indices] = control_action.joint_efforts
# update state of the actuator model
if isinstance(actuator, ImplicitActuator):
# TODO read torque from simulation (#127)
pass
# self._data.computed_torques[:, actuator.joint_indices] = ???
# self._data.applied_torques[:, actuator.joint_indices] = ???
# read torque from simulation
self._data.computed_torque[:, actuator.joint_indices] = self._root_view.get_measured_joint_efforts(
joint_indices=actuator.joint_indices
)
self._data.applied_torque[:, actuator.joint_indices] = self._root_view.get_applied_joint_efforts(
joint_indices=actuator.joint_indices
)
else:
# -- torques
self._data.computed_torque[:, actuator.joint_indices] = actuator.computed_effort
Expand Down