Implementation:Haosulab ManiSkill TurnFaucet
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Tabletop_Manipulation |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete implementation of the faucet turning task environment in ManiSkill using PartNet-Mobility faucet models.
Description
The TurnFaucetEnv requires a robot to turn a faucet handle by interacting with its articulated joint. Faucet models are sourced from the PartNet-Mobility dataset with varied geometries.
Registered as TurnFaucet-v1 with max_episode_steps=200 and asset_download_ids=["partnet_mobility_faucet"]. Supported robots: panda, panda_wristcam, fetch. Reward modes include "sparse" and "none".
The faucet is placed on a table and the robot must rotate its handle joint. Different faucet models have different handle geometries and joint configurations. The task tests the ability to manipulate articulated objects.
Usage
Use this environment for articulated object manipulation research. The variety of faucet geometries tests generalization across different handle shapes and joint types.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/envs/tasks/tabletop/turn_faucet.py
Signature
@register_env(
"TurnFaucet-v1",
max_episode_steps=200,
asset_download_ids=["partnet_mobility_faucet"],
)
class TurnFaucetEnv(BaseEnv):
SUPPORTED_REWARD_MODES = ["sparse", "none"]
SUPPORTED_ROBOTS = ["panda", "panda_wristcam", "fetch"]
Import
import gymnasium as gym
import mani_skill.envs
env = gym.make("TurnFaucet-v1")
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| obs_mode | str | No | Observation mode |
| reward_mode | str | No | Reward mode: "sparse", "none" |
| control_mode | str | No | Control mode for the robot |
Outputs
| Name | Type | Description |
|---|---|---|
| obs | dict/array | Observation including robot state, faucet joint angle, handle position |
| reward | float | Sparse reward based on faucet joint rotation progress |
| terminated | bool | Whether episode ended by success |
| truncated | bool | Whether episode hit max steps (200) |
| info | dict | Contains success flag |
Usage Examples
Basic Usage
import gymnasium as gym
import mani_skill.envs
env = gym.make("TurnFaucet-v1", obs_mode="state", render_mode="rgb_array")
obs, info = env.reset()
for _ in range(200):
action = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()