Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions source/isaaclab_newton/changelog.d/max-newton-ik-solver.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Added
^^^^^

* Added :class:`~isaaclab_newton.ik.NewtonIKSolver` and
:class:`~isaaclab_newton.envs.mdp.actions.NewtonInverseKinematicsAction`
for Newton-backed inverse kinematics, including named pose objectives and
custom Newton objective passthrough.
* Added persistent IK seeds and helpers to initialize pose-objective targets
from live Newton body transforms.
14 changes: 10 additions & 4 deletions source/isaaclab_newton/isaaclab_newton/cloner/replicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ def _build_newton_builder_from_mapping(
quaternions: torch.Tensor | None = None,
up_axis: str = "Z",
simplify_meshes: bool = True,
) -> tuple[ModelBuilder, object, dict, list]:
"""Build a Newton model builder from clone mapping inputs."""
) -> tuple[ModelBuilder, object, dict, list, dict[str, ModelBuilder]]:
"""Build a Newton model builder from clone mapping inputs.

Also returns the per-source builders (``{source_path: ModelBuilder}``) so the
committing path can retain them for single-model consumers such as the
batched Newton IK action.
"""
if positions is None:
positions = torch.zeros((mapping.size(1), 3), device=mapping.device, dtype=torch.float32)
if quaternions is None:
Expand Down Expand Up @@ -98,7 +103,7 @@ def _build_newton_builder_from_mapping(

site_index_map = {label: (idx, None) for label, idx in global_sites.items()}
site_index_map.update((label, (None, per_world)) for label, per_world in local_site_map.items())
return builder, stage_info, site_index_map, world_xforms
return builder, stage_info, site_index_map, world_xforms, source_builders


class NewtonReplicateContext:
Expand Down Expand Up @@ -208,7 +213,7 @@ def _merged_mapping(self) -> _MappingBatch:
def replicate(self) -> tuple[ModelBuilder, object, dict]:
"""Build the Newton model builder from queued mappings and optionally publish it."""
sources, destinations, env_ids, mapping, positions, quaternions = self._merged_mapping()
builder, stage_info, site_index_map, world_xforms = _build_newton_builder_from_mapping(
builder, stage_info, site_index_map, world_xforms, source_builders = _build_newton_builder_from_mapping(
stage=self.stage,
sources=sources,
destinations=destinations,
Expand All @@ -224,6 +229,7 @@ def replicate(self) -> tuple[ModelBuilder, object, dict]:
NewtonManager._cl_site_index_map = site_index_map
NewtonManager._cl_fabric_body_bindings = fabric_body_bindings
NewtonManager._world_xforms = world_xforms
NewtonManager._cl_protos = source_builders
NewtonManager.set_builder(builder)
NewtonManager._num_envs = mapping.size(1)
self._queue.clear()
Expand Down
10 changes: 10 additions & 0 deletions source/isaaclab_newton/isaaclab_newton/envs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""Newton-specific environment components."""

from isaaclab.utils.module import lazy_export

lazy_export()
10 changes: 10 additions & 0 deletions source/isaaclab_newton/isaaclab_newton/envs/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

__all__ = [
"mdp",
]

from . import mdp
10 changes: 10 additions & 0 deletions source/isaaclab_newton/isaaclab_newton/envs/mdp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""Newton-specific MDP components."""

from isaaclab.utils.module import lazy_export

lazy_export()
11 changes: 11 additions & 0 deletions source/isaaclab_newton/isaaclab_newton/envs/mdp/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

__all__ = [
"NewtonInverseKinematicsAction",
"NewtonInverseKinematicsActionCfg",
]

from .actions import NewtonInverseKinematicsAction, NewtonInverseKinematicsActionCfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

"""Newton-specific action terms."""

from isaaclab.utils.module import lazy_export

lazy_export()
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

__all__ = [
"NewtonInverseKinematicsAction",
"NewtonInverseKinematicsActionCfg",
]

from .newton_ik_actions import NewtonInverseKinematicsAction
from .newton_ik_actions_cfg import NewtonInverseKinematicsActionCfg
Loading
Loading