Implementation:Isaac sim IsaacGymEnvs AllegroKukaThrow
| Knowledge Sources | |
|---|---|
| Domains | Robotic_Manipulation, Throwing |
| Last Updated | 2026-02-15 11:00 GMT |
Overview
AllegroKukaThrow is an object throwing task environment where a Kuka arm with an Allegro hand must pick up an object and throw it into a randomly positioned target bucket.
Description
The AllegroKukaThrow class extends AllegroKukaBase to implement a throwing task in the IsaacGym simulation environment. The robotic system must pick up an object from the table, and throw it toward a target bucket placed at a random position in the workspace. The bucket is a physics-enabled asset with collision decomposition (VHACD) that has a fixed base link so it remains stationary during the simulation.
The target bucket is randomized to appear on either the left or right side of the table with additional random offsets in the x, y, and z axes. The goal position is set slightly above the bucket opening (z + 0.05) to account for the trajectory the object must follow. The task uses a single object keypoint at the origin since only the positional accuracy of the throw matters, not the object's orientation during flight.
Like the regrasping task, the object is reset to the table surface when the target is reset, and the lifted_object flag is cleared. The _true_objective method provides a PBT-compatible objective using tolerance_successes_objective to track training progress.
Usage
Use this class when training a reinforcement learning policy for robotic throwing tasks. It is suitable for research into dynamic manipulation, where the agent must learn ballistic release timing and arm/hand coordination to accurately throw objects at variable target locations. Configure it via Hydra configuration files within the IsaacGymEnvs framework.
Code Reference
Source Location
- Repository: IsaacGymEnvs
- File: isaacgymenvs/tasks/allegro_kuka/allegro_kuka_throw.py
- Lines: 41-124
Signature
class AllegroKukaThrow(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 _true_objective(self) -> Tensor:
...
Import
from isaacgymenvs.tasks.allegro_kuka.allegro_kuka_throw import AllegroKukaThrow
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| cfg | dict | Yes | Hydra configuration dictionary containing environment parameters, asset paths (including bucket URDF), and tolerance 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 based on object proximity to the bucket target |
| is_success | Tensor | Boolean tensor indicating which environments successfully threw the object into the bucket |
| true_objective | Tensor | PBT objective combining tolerance progress and success count |
Usage Examples
# Register and instantiate the AllegroKukaThrow task via IsaacGymEnvs
from isaacgymenvs.tasks.allegro_kuka.allegro_kuka_throw import AllegroKukaThrow
# Typically created through the task registry with Hydra config
env = AllegroKukaThrow(
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)