Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Haosulab ManiSkill QuadrupedReach

From Leeroopedia
Knowledge Sources
Domains Robotics, Simulation, Locomotion
Last Updated 2026-02-15 08:00 GMT

Overview

Concrete implementation of the quadruped reach locomotion task in ManiSkill.

Description

The QuadrupedReachEnv requires a quadruped robot to navigate to a target goal position. Two robot-specific variants are registered:

  • AnymalC-Reach-v1 (max_episode_steps=200): AnymalC robot reaches a target.
  • UnitreeGo2-Reach-v1 (max_episode_steps=200): Unitree Go2 robot reaches a target.

The goal is visualized as a green sphere (radius 0.2m). The goal position is randomized 2.5 +/- 0.5m in front and +/- 1m to either side. Success requires the robot to be within 0.35m of the goal without falling. Failure occurs when the robot's main body hits the ground. Supported robots: anymal_c, unitree_go2_simplified_locomotion. Reward modes include "dense", "normalized_dense", "sparse", and "none".

Usage

Use this environment for quadruped locomotion and navigation research. The dense reward includes penalties for undesired contacts, z-axis linear velocity, and deviation from default stance.

Code Reference

Source Location

Signature

class QuadrupedReachEnv(BaseEnv):
    SUPPORTED_ROBOTS = ["anymal_c", "unitree_go2_simplified_locomotion"]
    ...

@register_env("AnymalC-Reach-v1", max_episode_steps=200)
class AnymalCReachEnv(QuadrupedReachEnv): ...

@register_env("UnitreeGo2-Reach-v1", max_episode_steps=200)
class UnitreeGo2ReachEnv(QuadrupedReachEnv): ...

Import

import gymnasium as gym
import mani_skill.envs
env = gym.make("AnymalC-Reach-v1")

I/O Contract

Inputs

Name Type Required Description
obs_mode str No Observation mode
reward_mode str No Reward mode: "dense", "normalized_dense", "sparse", "none"
control_mode str No Control mode for the quadruped robot

Outputs

Name Type Description
obs dict/array Observation including root velocities, goal position, robot-to-goal vector
reward float Dense reward from reaching + penalties for instability
terminated bool Whether robot has fallen
truncated bool Whether episode hit max steps (200)
info dict Contains success, fail, robot_to_goal_dist, is_fallen flags

Usage Examples

Basic Usage

import gymnasium as gym
import mani_skill.envs

env = gym.make("AnymalC-Reach-v1", obs_mode="state", render_mode="rgb_array")
obs, info = env.reset()
for _ in range(100):
    action = env.action_space.sample()
    obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        obs, info = env.reset()
env.close()

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment