Repository navigation
MDP2 Part 2 #9120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
MDP2 Part 2 #9120
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
d6571ee
Bring the MDP2 features of the Arena prototype to MDP2
StafaH 97e1622
Read where MDP2 ops run and start from the op
StafaH 284d501
Add tunable MDP2 values that change per world while graphs replay
StafaH d8b4bbf
Switch MDP2 uses on and off per world with when
StafaH d5b5a66
Count repeated completions of MDP2 tasks
StafaH 7e50cf4
Give MDP2 actions name slots and a live mask
StafaH 201b0d8
Let the tasks of an MDP2 sequence take actions
StafaH e7e3674
Apply MDP2 actions once per control step or before every physics step
StafaH 01ba17d
Fix a role split across lines in the MDP2 changelog fragment
StafaH 017be53
Name the action and observation columns of an MDP2 task in its spec
StafaH 22039bc
Resolve term state, tunables, and progress by name inside MDP2 subtasks
StafaH 732e9d1
Let MDP2 splits nest and divide the same worlds
StafaH cb95c95
Add mdp2.choice, which draws a subtask per episode and world
StafaH e025fec
Give MDP2 subtasks that run together columns of their own, and add re…
StafaH 98b4f36
Add MDP2 start events, and let reset events read the ended progress
StafaH 850e36b
Record MDP2 quantities per episode with one flag, and keep done with …
StafaH 5f4435c
Replace the task of a running MDP2 environment with update_task
StafaH f1bcf02
Add MDP2 variations that draw, record, and replay scene values
StafaH edea9e5
Flag actuators that CUDA graphs can replay
StafaH 5b21b22
Capture MDP2 steps through the physics backend, and account for replays
StafaH 6e2a3cd
Verify MDP2 captures bitwise without reproducible physics
StafaH c71c307
Add the resting_on term for contact-based success in MDP2
StafaH 7be76dd
Run uses that the tasks of an MDP2 sequence define alike as one
StafaH 99208cd
Run MDP2 uses of all the tasks of a sequence in its scope, and log pr…
StafaH 761a0d8
Compute the MDP2 episode logs inside the captured step
StafaH c767884
Average MDP2 progress logs with one mean where every world runs every…
StafaH 31f6ac1
Check that the illegal-contact termination fires in the MDP2 contact …
StafaH 8dae7a2
Render only the cameras that MDP2 terms read
StafaH 52a3b4b
Test the new MDP2 features in a captured Cartpole step, and fix two e…
StafaH 4802915
Document MDP2 runtime values, switches, choices, variations, and the …
StafaH bf4a67e
Keep MDP2 episode logs in one generated kernel per step
StafaH 67b1fb6
Mark the network actuators as not capturable
StafaH 9cfdb3e
Tune MDP2 values without undoing other writes, and carry tuned values…
StafaH 4279f31
Keep MDP2 episode statistics a row per column, so writes and sums are…
StafaH d2bd603
Update the measured costs of MDP2 runtime values and stages
StafaH bc218ca
Keep earlier inertia changes when randomizing masses
StafaH a0c4fd3
Address review comments on MDP2 Part 2
StafaH 220266e
List the one-task builder among the MDP2 breaking changes
StafaH e4dc7e2
Merge main into MDP2 Part 2
hujc7 6311633
Describe the MDP2 actuator support and changelogs after merging main
hujc7 277d4d3
Test delayed-implicit replay, per-step bookkeeping of MDP2 tasks, and…
hujc7 e214512
Compute the MDP2 physics capture flag with the step work
hujc7 e2c5b67
Merge main into MDP2 Part 2
hujc7 5806801
Raise on physics other than Newton in MDP2 environments
hujc7 adc02e5
Require mask in Python hooks of MDP2 action terms
hujc7 d2591d9
Compute quantities that MDP2 actions read again after resets
hujc7 ad9a06e
Check the episode budget of MDP2 environments without an RL config
hujc7 1d3054d
Log MDP2 task progress over the episodes that ran each task
hujc7 a7daf59
Keep the Torch delay draw of delayed actuators and mark them not capt…
hujc7 7962cb3
Describe MDP2 progress logs and delayed actuator support accurately
hujc7 cd2f0f4
Merge main into MDP2 Part 2
hujc7 8dea79c
Trim the MDP2 action-hook check, capture flag, and progress tests
StafaH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| * Added :attr:`~isaaclab.actuators.ActuatorBase.capturable`, which says whether a CUDA graph can replay an actuator's | ||
| compute and masked reset with Torch work inside it: the implicit, ideal PD, and DC motor actuators. The delayed | ||
| actuators, whose masked resets draw from Torch's generator, and the network actuators are not capturable. | ||
| * Added :meth:`~isaaclab.physics.PhysicsManager.supports_step_capture` and | ||
| :meth:`~isaaclab.physics.PhysicsManager.capture`, with which environments that replay their steps as CUDA graphs | ||
| record them as the physics backend records its own step, and :meth:`~isaaclab.sim.SimulationContext.after_replay`, | ||
| which does the host work of the physics steps that a replayed graph ran, such as counting them. |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
source/isaaclab_experimental/changelog.d/mdp2-mass-inertia.fixed.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| * Fixed :data:`~isaaclab_experimental.mdp2.mdp.randomize_rigid_body_mass` scaling the inertias from before the | ||
| startup events: an inertia offset from :data:`~isaaclab_experimental.mdp2.mdp.randomize_rigid_body_inertia` that | ||
| ran before it was lost. It now scales the inertias at its first call, as MDP1 does. |
76 changes: 76 additions & 0 deletions
76
source/isaaclab_experimental/changelog.d/mdp2-part2.added.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| * Added cameras to :class:`~isaaclab_experimental.envs.MDP2Env`: their data types are scene fields that terms read, | ||
| such as ``camera.rgb``, and the environment renders them once per control step at | ||
| :attr:`~isaaclab_experimental.envs.Step.RENDER`, inside the step's CUDA graph. | ||
| :attr:`~isaaclab_experimental.envs.ResetStep.RENDER` renders them again after resets. | ||
| * Added :class:`~isaaclab_experimental.mdp2.ObservationGroup`, whose ``concatenate=False`` keeps a buffer per term, | ||
| with the term's own shape and element type, such as ``uint8`` images, observed as a dict of tensors, and | ||
| :data:`~isaaclab_experimental.mdp2.mdp.image_rgb`. | ||
| * Added :class:`~isaaclab_experimental.mdp2.Action`, action terms whose hooks turn their columns of the action into | ||
| writes, and :data:`~isaaclab_experimental.mdp2.mdp.binary_joint_position`, a binary gripper command with a | ||
| threshold. A Python hook takes ``mask``, the worlds where the action applies. | ||
| * Added :func:`~isaaclab_experimental.mdp2.compose`, which merges partial task configs, such as those of a scene, an | ||
| embodiment, and a task, in order. | ||
| * Added tasks of tasks to MDP2: a :class:`~isaaclab_experimental.mdp2.TaskCfg` may say when it is ``done`` (with | ||
| ``hold``, ``score``, and ``final``) and hold named subtasks, which run together | ||
| (:func:`~isaaclab_experimental.mdp2.compose`, with ``require``), one after another | ||
| (:func:`~isaaclab_experimental.mdp2.sequence`), or in their own worlds (:func:`~isaaclab_experimental.mdp2.split`). | ||
| :class:`~isaaclab_experimental.mdp2.Milestone` is a task with only a completion. The uses of a task of a sequence run | ||
| while it does, and restart when it starts. A subtask reads its own fields by name, as a task that runs alone does: | ||
| its commands, quantities, term state, tunable values, and progress. Terms read the progress of every task, such as | ||
| ``mdp2.progress.grasp.done``, and :class:`~isaaclab_experimental.envs.MDP2RLEnv` logs it as ``Progress/<task>`` and | ||
| records the step at which each task was done. | ||
| * Added :meth:`~isaaclab_experimental.mdp2.MDP.spec`, which names the columns of the action and of the observation | ||
| buffers, with the names of their elements, such as joint names, and | ||
| :meth:`~isaaclab_experimental.mdp2.MDP.action_mask` and :meth:`~isaaclab_experimental.mdp2.MDP.observation_mask`, | ||
| which give the columns each world takes and writes. | ||
| * Added :data:`~isaaclab_experimental.mdp2.mdp.joint_pos_normalized`, :data:`~isaaclab_experimental.mdp2.mdp.is_true`, | ||
| and :data:`~isaaclab_experimental.mdp2.mdp.one_hot`. | ||
| * Added an episode budget to :class:`~isaaclab_experimental.envs.MDP2RLEnv` for evaluation, ``episode_budget``: worlds | ||
| stop starting episodes once the budget is spent, and every episode is recorded on the device, with the quantities | ||
| marked ``Quantity(record=True)``, in :meth:`~isaaclab_experimental.envs.MDP2RLEnv.episode_records`. | ||
| * Added OptiX cameras to :class:`~isaaclab_experimental.envs.MDP2Env`: cameras with | ||
| :class:`~isaaclab_newton.renderers.NewtonOptixRendererCfg` render between the CUDA graphs of a step, since OptiX | ||
| refits its acceleration structures on the host. | ||
| * Added runtime values to MDP2: a param or reward weight declared :class:`~isaaclab_experimental.mdp2.Tunable` holds | ||
| one value per world, which :func:`~isaaclab_experimental.mdp2.tune` and | ||
| :meth:`~isaaclab_experimental.envs.MDP2Env.tune` change at each world's next reset or from the next step, while | ||
| captured steps keep replaying, leaving the other values as they are. Terms read a param as a field, | ||
| :func:`~isaaclab_experimental.mdp2.tunable`, and each world counts the tunings that took effect, recorded as | ||
| ``revision``. | ||
| * Added ``when`` to MDP2 term uses: a reward, termination, observation, command, or interval event runs only in the | ||
| worlds where a field, such as a mode command, was positive at the start of the step, and restarts its state, timer, | ||
| command, and history where it turns on. ``when=mdp2.Tunable(True)`` is a switch per world that | ||
| :func:`~isaaclab_experimental.mdp2.tune` turns on and off. | ||
| * Added ``repeat`` to MDP2 tasks: a task that repeats counts its completions as ``mdp2.progress.<task>.count``, such as | ||
| the drops of an object, and restarts with its subtasks and uses once its completion no longer holds. | ||
| :class:`~isaaclab_experimental.envs.MDP2RLEnv` records the count of every episode. | ||
| * Added actions to the tasks of an MDP2 sequence: each task writes its actions while it runs, and actions of the same | ||
| name share their columns of the action, so that one policy drives every task. | ||
| * Added :class:`~isaaclab_experimental.mdp2.ActionRate` to MDP2 actions: an action at ``ActionRate.CONTROL`` applies | ||
| once per control step, before the physics steps, such as an embedded whole-body controller or inverse kinematics, | ||
| and one at ``ActionRate.PHYSICS``, the default, before every physics step. | ||
| :func:`~isaaclab_experimental.mdp2.process_actions` runs the former. | ||
| * Added nested splits to MDP2: a :func:`~isaaclab_experimental.mdp2.split` may be a step of a sequence, and several | ||
| subtasks that split divide the same worlds, such as robots and terrains, each world running the subtask of its | ||
| share of each. | ||
| * Added :func:`~isaaclab_experimental.mdp2.choice`, which draws one subtask per episode and world at the reset, by | ||
| weights, for multi-task learning: only the drawn subtask's uses run, and ``Progress/<task>`` logs its success over | ||
| the worlds that drew it. | ||
| * Added :func:`~isaaclab_experimental.mdp2.rename`, which binds a part of a task to other scene entities, so that a | ||
| part can run twice, such as two arms. Uses of subtasks that run together get columns of their own, named with the | ||
| subtask's name, as in ``left.joint_pos``; uses of subtasks that take turns share the columns of their name. | ||
| * Added start events to MDP2, ``EventMode.START``: an event writes the scene when its task starts, at the reset or, | ||
| for a task of a sequence or a choice, or one that repeats, during the episode, where the scene commits it. | ||
| * Added :meth:`~isaaclab_experimental.envs.MDP2Env.update_task`, which replaces the task of a running environment on | ||
| the same scene, such as with a reward added, and :func:`~isaaclab_experimental.mdp2.migrate`, which carries over the | ||
| state, random streams, and tunable values of the uses that both tasks have; other reward weights and params are the | ||
| new task's. | ||
| * Added variations to the MDP2 library, :func:`~isaaclab_experimental.mdp2.mdp.variation`: a reset event that draws a | ||
| value per world, such as how far a drawer is open, writes it to a scene field, and records it per episode, drawn | ||
| :class:`~isaaclab_experimental.mdp2.mdp.Uniform` (in a tunable range), from a | ||
| :class:`~isaaclab_experimental.mdp2.mdp.Choice`, or replayed in the order of the resets with | ||
| :class:`~isaaclab_experimental.mdp2.mdp.Replay`, independent of the number of worlds. | ||
| * Added :data:`~isaaclab_experimental.mdp2.mdp.resting_on`, one where an object rests on another by its contact force | ||
| in a cone and its speed, like Arena's ``object_on_destination``, for a milestone with ``hold``. | ||
| * Added sharing of uses across the tasks of an MDP2 sequence or choice: uses that the tasks define alike run as one, | ||
| while any of these tasks runs, so that their state and observation histories carry on from one task to the next. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.