Fix PDActuator docstring to match actual implementation (#3493)
# Description
The docstring of the `IdealPDActuator` didn't match its implementation.
Desired and actual joint positions and velocities were swapped.
Actual implementation is like this:
```
def compute(
self, control_action: ArticulationActions, joint_pos: torch.Tensor, joint_vel: torch.Tensor
) -> ArticulationActions:
# compute errors
error_pos = control_action.joint_positions - joint_pos
error_vel = control_action.joint_velocities - joint_vel
# calculate the desired joint torques
self.computed_effort = self.stiffness * error_pos + self.damping * error_vel + control_action.joint_efforts
```
It is "`desired - current`", the current docstring says the opposite:
<img width="524" height="60" alt="image"
src="https://github.com/user-attachments/assets/efdc7348-1587-4ed6-be58-875e804e8db9"
/>
## Type of change
- Documentation update
## Checklist
- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
Co-authored-by:
Lorenz Wellhausen <lorenz.wellhausen@rivr.ai>
Showing
Please register or sign in to comment