• Lorenz Wellhausen's avatar
    Fix PDActuator docstring to match actual implementation (#3493) · 7455d3df
    Lorenz Wellhausen authored
    # 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: 's avatarLorenz Wellhausen <lorenz.wellhausen@rivr.ai>
    7455d3df
Name
Last commit
Last update
.github Loading commit data...
.vscode Loading commit data...
apps Loading commit data...
docker Loading commit data...
docs Loading commit data...
scripts Loading commit data...
source Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.flake8 Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.pre-commit-config.yaml Loading commit data...
CITATION.cff Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS.md Loading commit data...
LICENSE Loading commit data...
LICENSE-mimic Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
VERSION Loading commit data...
environment.yml Loading commit data...
isaaclab.bat Loading commit data...
isaaclab.sh Loading commit data...
pyproject.toml Loading commit data...
pytest.ini Loading commit data...