Implementation:Isaac sim IsaacGymEnvs AllegroKukaTwoArmsReorientation
| Knowledge Sources | |
|---|---|
| Domains | Robotic_Manipulation, Bimanual_Manipulation |
| Last Updated | 2026-02-15 11:00 GMT |
Overview
AllegroKukaTwoArmsReorientation is a dual-arm object reorientation task environment where two Kuka arms with Allegro hands must cooperate to rotate an object to a target pose.
Description
The AllegroKukaTwoArmsReorientation class extends AllegroKukaTwoArmsBase to implement a bimanual object reorientation task. This task requires two robotic arm-hand systems to coordinate in order to rotate a manipulated object to match both a randomly sampled target position and a randomly sampled target orientation (quaternion). It uses four corner keypoints ([1,1,1], [1,1,-1], [-1,-1,1], [-1,-1,-1]) to fully capture the object's rotational state.
Goal assets corresponding to each object type in the training set are loaded with gravity disabled. A translucent goal object is placed at the target pose to visually indicate the desired configuration. For non-block objects, the goal object is colored in a light blue shade. During target resets, the position is randomized within a configurable volume with an x-offset of +/-0.75 (randomly near either arm), and the orientation is set using get_random_quat to sample a uniformly random rotation. The velocities of the goal object are zeroed out on each reset.
Curriculum learning is applied through tolerance_curriculum to progressively tighten the success tolerance. The _true_objective method provides a PBT-compatible objective that prioritizes tolerance improvements over raw success counts, following the same strategy as the single-arm reorientation task.
Usage
Use this class when training a reinforcement learning policy for bimanual in-hand object reorientation tasks. It is suitable for research into coordinated dual-arm manipulation where both position and orientation of the object must be controlled simultaneously. Configure it through the IsaacGymEnvs Hydra configuration system with dual-arm environment settings.
Code Reference
Source Location
- Repository: IsaacGymEnvs
- File: isaacgymenvs/tasks/allegro_kuka/allegro_kuka_two_arms_reorientation.py
- Lines: 42-158
Signature
class AllegroKukaTwoArmsReorientation(AllegroKukaTwoArmsBase):
def __init__(self, cfg, rl_device, sim_device, graphics_device_id, headless, virtual_screen_capture, force_render):
...
def _object_keypoint_offsets(self):
...
def _load_additional_assets(self, object_asset_root, arm_pose):
...
def _create_additional_objects(self, env_ptr, env_idx, object_asset_idx):
...
def _after_envs_created(self):
...
def _reset_target(self, env_ids: Tensor) -> None:
...
def _extra_object_indices(self, env_ids: Tensor) -> List[Tensor]:
...
def _extra_curriculum(self):
...
def _true_objective(self) -> Tensor:
...
Import
from isaacgymenvs.tasks.allegro_kuka.allegro_kuka_two_arms_reorientation import AllegroKukaTwoArmsReorientation
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| cfg | dict | Yes | Hydra configuration dictionary containing environment parameters, object types, dual-arm settings, and curriculum parameters |
| rl_device | str | Yes | Device string for the RL algorithm (e.g., "cuda:0") |
| sim_device | str | Yes | Device string for the simulation (e.g., "cuda:0") |
| graphics_device_id | int | Yes | GPU device ID for rendering |
| headless | bool | Yes | Whether to run without a display |
| virtual_screen_capture | bool | Yes | Whether to capture virtual screen output |
| force_render | bool | Yes | Whether to force rendering even in headless mode |
Outputs
| Name | Type | Description |
|---|---|---|
| rew_buf | Tensor | Per-environment reward buffer incorporating position and orientation error from both arms |
| is_success | Tensor | Boolean tensor indicating which environments achieved the target pose |
| true_objective | Tensor | PBT objective combining tolerance progress and success count |
Usage Examples
# Register and instantiate the AllegroKukaTwoArmsReorientation task
from isaacgymenvs.tasks.allegro_kuka.allegro_kuka_two_arms_reorientation import AllegroKukaTwoArmsReorientation
# Typically created through the task registry with Hydra config
env = AllegroKukaTwoArmsReorientation(
cfg=task_cfg,
rl_device="cuda:0",
sim_device="cuda:0",
graphics_device_id=0,
headless=True,
virtual_screen_capture=False,
force_render=False,
)
# Run a step in the environment
obs = env.reset()
actions = policy(obs)
obs, rewards, dones, info = env.step(actions)