Implementation:Isaac sim IsaacGymEnvs AllegroKukaRegrasping
| Knowledge Sources | |
|---|---|
| Domains | Robotic_Manipulation, Dexterous_Grasping |
| Last Updated | 2026-02-15 11:00 GMT |
Overview
AllegroKukaRegrasping is a single-arm regrasping task environment where a Kuka arm with an Allegro hand must pick up an object, transfer it between fingers, and regrasp it at a target position.
Description
The AllegroKukaRegrasping class extends AllegroKukaBase to implement a regrasping task in the IsaacGym simulation environment. In this task, the robotic system consisting of a Kuka arm and an Allegro dexterous hand must pick up an object from a surface, manipulate it within the hand by transferring it between fingers, and place or hold it at a randomly sampled target position within a defined target volume.
The class loads a goal ball asset (with gravity disabled) that serves as a visual indicator of the target position. During environment resets, the target position is randomized within a configurable volume, and the object is reset to its initial pose on the table. The task uses a single object keypoint at the origin since object orientation is not relevant for regrasping -- only positional accuracy matters.
A curriculum learning strategy is employed via tolerance_curriculum to progressively decrease the success tolerance threshold as the agent improves. The _true_objective method computes a Population-Based Training (PBT) objective that prioritizes tolerance improvements over raw success counts, ensuring that agents are rewarded for achieving tighter tolerances before optimizing for total successes.
Usage
Use this class when training a reinforcement learning policy for single-arm dexterous regrasping tasks. It is suitable for scenarios where the agent must learn to pick up objects and reposition them within the hand, without concern for the object's rotational orientation. Register it as a task in the IsaacGymEnvs task registry and configure it via Hydra configuration files.
Code Reference
Source Location
- Repository: IsaacGymEnvs
- File: isaacgymenvs/tasks/allegro_kuka/allegro_kuka_regrasping.py
- Lines: 42-123
Signature
class AllegroKukaRegrasping(AllegroKukaBase):
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 compute_kuka_reward(self) -> Tuple[Tensor, Tensor]:
...
def _true_objective(self) -> Tensor:
...
def _extra_curriculum(self):
...
Import
from isaacgymenvs.tasks.allegro_kuka.allegro_kuka_regrasping import AllegroKukaRegrasping
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| cfg | dict | Yes | Hydra configuration dictionary containing environment parameters (target volume, tolerances, curriculum settings) |
| 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 computed by compute_kuka_reward |
| is_success | Tensor | Boolean tensor indicating which environments achieved the goal |
| true_objective | Tensor | PBT objective combining tolerance progress and success count |
Usage Examples
# Register and instantiate the AllegroKukaRegrasping task via IsaacGymEnvs
from isaacgymenvs.tasks.allegro_kuka.allegro_kuka_regrasping import AllegroKukaRegrasping
# Typically created through the task registry with Hydra config
env = AllegroKukaRegrasping(
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)