Skip to content

Conversation

@yuecideng
Copy link
Contributor

@yuecideng yuecideng commented Jan 29, 2026

Description

  • Add center of mass setter and getter for rigid object. Also add a randomization functor for this attribte.
  • Add body type API for kinematic and dynamic exchanging.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Dependencies have been updated, if applicable.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds center of mass (COM) getter and setter functionality for RigidObject, along with a randomization function to support domain randomization of COM properties.

Changes:

  • Added com_pose property getter and default_com_pose storage to RigidBodyData class
  • Added set_com_pose method to RigidObject class
  • Added randomize_rigid_object_center_of_mass function to support COM randomization
  • Updated type annotations from Union[torch.Tensor, List[int]] to torch.Tensor | list[int] for consistency

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
embodichain/lab/sim/objects/rigid_object.py Adds COM data structures, property getter, and setter method to enable reading and modifying center of mass pose
embodichain/lab/gym/envs/managers/randomization/physics.py Adds randomization function for COM and updates type annotations for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yuecideng yuecideng merged commit e51a9ea into main Jan 29, 2026
5 checks passed
@yuecideng yuecideng deleted the yueci/add-com-rigid-object branch January 29, 2026 11:01
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.

2 participants