SO101-Nexus
Environments

MuJoCoTouch-v1

Bring the gripper to an object resting on the table using the MuJoCo backend.

MuJoCoTouch-v1

Bring the gripper to an object resting on the table (touch it).

Overview

PropertyValue
Environment IDMuJoCoTouch-v1
BackendMuJoCo
Max episode steps512
Config classTouchConfig (extends PickConfig)
Task description"Touch the {object repr}."

Configuration

TouchConfig extends PickConfig, so it reuses the object-pool fields and adds a touch clearance:

FieldTypeDefaultDescription
objectslist[SceneObject] | SceneObject | NoneNoneObject pool for the touch target (CubeObject, YCBObject, or MeshObject); a single object is auto-wrapped and None defaults to [CubeObject()]
n_distractorsint0Number of distractor objects to spawn alongside the target
min_object_separationfloat0.04Minimum distance between spawned objects (meters)
touch_marginfloat0.03Clearance added to the target object bounding radius; success fires when the TCP is within bounding_radius + touch_margin of the object center

Observation Space

Default observation is the pick state vector (configurable via the observations parameter on TouchConfig):

ComponentClassDimensionsDescription
End-effector poseEndEffectorPose7TCP position and orientation
Grasp stateGraspState1Whether the gripper is grasping
Object poseObjectPose7Target object position and orientation
Object offsetObjectOffset3TCP-to-object position offset

Objects

Any CubeObject, YCBObject (e.g. a spoon), or MeshObject can be the touch target, optionally among distractors.

Success Condition

Succeeds when the TCP reaches within the target object bounding radius plus touch_margin.

Example

import gymnasium as gym
import so101_nexus.mujoco

from so101_nexus import TouchConfig

env = gym.make(
    "MuJoCoTouch-v1",
    render_mode="human",
    config=TouchConfig(),
)

obs, info = env.reset()
for _ in range(512):
    action = env.action_space.sample()
    obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        obs, info = env.reset()

env.close()

To touch a specific YCB object, such as a spoon, pass it through the object pool:

from so101_nexus import TouchConfig, YCBObject

config = TouchConfig(objects=[YCBObject("031_spoon")])
env = gym.make("MuJoCoTouch-v1", config=config)

On this page