Skip to content

Conversation

AntoineRichard
Copy link
Contributor

@AntoineRichard AntoineRichard commented Aug 27, 2025

Description

Adds the ability to compose forces onto rigid bodies, rigid body collections and articulations.
This should help implement drones, boats, and satellites into the framework.

Usage

# Adding two forces in a single step on the same body
asset.add_composable_force_and_torque(forces=torch.ones(1, 1, 3), env_ids=[0], object_ids=[0])
# Compose local and global forces together
asset.add_composable_force_and_torque(forces=torch.ones(1, 1, 3), env_ids=[0], object_ids=[1], is_global=True)
# Adding torques to the same body
asset.add_composable_force_and_torque(torques=torch.ones(1, 1, 3), env_ids=[0], object_ids=[0])
#Adding forces and torques to the same body
asset.add_composable_force_and_torque(forces=torch.ones(1, 1, 3), torques=torch.ones(1, 1, 3), env_ids=[0], object_ids=[0])
# Adding forces and torques to the same body with different positions
asset.add_composable_force_and_torque(forces=torch.ones(1, 1, 3), torques=torch.ones(1, 1, 3), env_ids=[0], object_ids=[0], positions=torch.ones(1, 1, 3))

 # The resulting composed forces and torques can be queried by calling:
composed_force = asset._wrench_composer.composed_force_as_torch
composed_torque = asset._wrench_composer.composed_torque_as_torch

Fixes #3286

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist

  • 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

@AntoineRichard AntoineRichard changed the title Antoiner/wrench composer New method to compose wrenches Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Proposal] Support for wrench composition
1 participant