Deploy RL parkour policies for Go2 quadruped robot in Gazebo simulation based on Extreme-Parkour-Onboard code (https://github.com/change-every/Extreme-Parkour-Onboard)

This package provides a complete deployment system for running trained RL policies on the Go2 quadruped robot in Gazebo. It includes:
- FSM Controller: Finite State Machine for managing robot states (Idle → Sit → Stand → RL Mode)
- Observation Manager: Aggregates sensor data and constructs observation vectors
- RL Policy Node: Executes trained policy inference with vision and proprioception
- Joystick Interface: Control robot states and velocity commands
# ROS Noetic
sudo apt install ros-noetic-desktop-full
sudo apt install ros-noetic-gazebo-ros-pkgs
sudo apt install ros-noetic-controller-manager
sudo apt install ros-noetic-joint-state-controller
sudo apt install ros-noetic-position-controllers
sudo apt install ros-noetic-joy
# Python packages
pip3 install torch torchvision
pip3 install opencv-python
pip3 install numpyPlace your trained models in ~/go2_parkour/traced/:
base_jit.pt- Base policy (actor, estimator, history encoder)vision_weight.pt- Vision encoder weights
roslaunch rl_deploy complete_system.launch world:=parkourThis launches:
- Gazebo with Go2 robot
- All deployment nodes
- Joystick interface
- RViz (optional)
IDLE (Robot spawned)
│
│ Press A
▼
SIT (Sitting position)
│
│ Press B
▼
STAND (Standing position)
│
│ Press Y
▼
RL_MODE (Policy control active)
Edit config/go2_parkour_config.yaml to customize:
joint_positions/sit: Sitting posejoint_positions/stand: Standing posejoint_positions/default: RL mode neutral pose
control:
static_mode:
stiffness: 40.0 # PD gains for sit/stand
damping: 2.0
rl_mode:
stiffness: 40.0 # PD gains for RL control
damping: 1.0
action_scale: 0.25
control_dt: 0.02 # 50Hzobservation:
n_proprio: 53
n_depth_latent: 32
history_len: 10
scales:
lin_vel: 2.0
ang_vel: 0.25
dof_pos: 1.0
dof_vel: 0.05depth_camera:
crop_top: 60
crop_bottom: 100
crop_left: 80
crop_right: 36
resize_width: 87
resize_height: 58
visual_update_interval: 5 # 10HzThe system constructs a 123-dimensional observation vector matching the trained policy:
| Component | Dimensions | Description |
|---|---|---|
| Angular velocity | 3 | Body frame gyroscope |
| IMU orientation | 2 | Roll, pitch |
| Yaw info | 3 | Delta yaw (from vision) |
| Commands | 3 | vx, vy, vyaw from joystick |
| Terrain flags | 2 | Parkour/walk mode |
| Joint positions | 12 | Relative to default |
| Joint velocities | 12 | Scaled |
| Last actions | 12 | Previous motor commands |
| Contact states | 4 | Foot contact flags |
| Depth latent | 32 | Vision-encoded features |
| Estimated lin vel | 9 | From estimator network |
| History latent | 29 | From history encoder |
| Total | 123 |
Note: No height scanner is used (matching real hardware deployment).
/go2_joint_controller/command- Joint position commands/rl/commands- Velocity commands (vx, vy, vyaw)/rl/proprioception- Current proprioception vector/rl/last_action- Last action for observation/fsm/state- Current FSM state
/joy- Joystick input/imu/data- IMU data/joint_states- Joint positions/velocities/camera/depth/image_raw- Depth camera/FR_foot_contact,/FL_foot_contact, etc. - Contact sensors
Based on the Isaac Lab extreme parkour training framework and real hardware deployment code.