Skip to content

Conversation

JuanaDd
Copy link

@JuanaDd JuanaDd commented Sep 22, 2025

Description

This PR fixes a bug in actuator initialization where effort limits specified in USD assets were being incorrectly overridden with a very large default value (1.0e9) for explicit actuator models.

Fixes # (issue)

Previously, the ActuatorBase initialization logic would unconditionally fall back to _DEFAULT_MAX_EFFORT_SIM (1.0e9) for explicit actuator models when effort_limit_sim was not explicitly set in the configuration, even when the USD asset contained finite, meaningful effort limit values.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • 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
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Sep 22, 2025
# For explicit models, we do not want to enforce the effort limit through the solver
# (unless it is explicitly set)
if not self.is_implicit_model and self.cfg.effort_limit_sim is None:
effort_limit_is_finite = (
Copy link
Contributor

@Mayankm96 Mayankm96 Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modifying the code where we set effort_limit might be simpler i think

        # For explicit models, if user does not provide effort limit, we want to default to USD values.
        # For implicit models, we want to enforce the effort limit through the solver.
        if not self.is_implicit_model and self.cfg.effort_limit_sim is None:
            self.effort_limit = self._parse_joint_parameter(self.cfg.effort_limit, effort_limit)
        else:
            self.effort_limit = self._parse_joint_parameter(self.cfg.effort_limit, self.effort_limit_sim)

@github-actions github-actions bot added the asset New asset feature or request label Sep 23, 2025
@JuanaDd JuanaDd force-pushed the effort_limit_bugfix branch from cdb1ddd to 51f3234 Compare September 23, 2025 07:58
dynamic_friction=self._data.default_joint_dynamic_friction_coeff[:, joint_ids],
viscous_friction=self._data.default_joint_viscous_friction_coeff[:, joint_ids],
effort_limit=self._data.joint_effort_limits[:, joint_ids],
effort_limit=self._data.joint_effort_limits[:, joint_ids].clone(),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mayankm96 clone is required because effort_limit would be overwritten to effort_limit_sim again here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asset New asset feature or request bug Something isn't working isaac-lab Related to Isaac Lab team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants