Skip to content

Expose activation and actuator kinematics on ActuatorDevice - #14

Open
M-Colley wants to merge 1 commit into
google-deepmind:mainfrom
M-Colley:feat/actuator-device-activations
Open

M-Colley wants to merge 1 commit into
google-deepmind:mainfrom
M-Colley:feat/actuator-device-activations

Conversation

@M-Colley

Copy link
Copy Markdown

Summary

Expose actuator activation state (act), actuator length/velocity kinematics (actuator_length, actuator_velocity), and a set_act puppet helper on ActuatorDevice to support stateful actuators such as Hill-type <muscle> actuators:

  • Resolve activation index spans (self._act_ids) in ActuatorDevice.initialize() via actuator_actadr and actuator_actnum (skipping stateless targets where actnum == 0).
  • Support "act" (shape (num_act,)), "actuator_length", and "actuator_velocity" (shape (num_out,)) in substep_measurements_spec() and get_measurements().
  • Add set_act(env_mask, act) mirroring set_ctrl for full and masked environment resets.

Testing

  • Added parameterized RuntimeTest.test_muscle_activations_and_actuator_kinematics (Impl.CPP and Impl.WARP) in actuator_device_test.py covering mixed <motor> + <muscle> targets with non-zero actadr/outadr offsets, spec/measurement parity, and unmasked/masked set_act.
  • Ran pyink --check, isort --check, pyrefly check, and pytest reaf/simulation/torch/_src/common/actuator_device_test.py (14 passed).

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.

1 participant