This repository contains an advanced continuous deep reinforcement learning system (PPO) and a real-time engineering telemetry cockpit for 7-DOF robotic arm manipulation in
Gymnasium MuJoCo
Pusher-v5.
1flowchart TD
2 subgraph Web_Cockpit ["1-Screen Zero-Scroll Robotics Telemetry Cockpit"]
3 W1["HTML5 / CSS3 / Vanilla JS Client"] <-->|"WebSocket /ws/simulation @ 30 FPS"| S1["FastAPI High-Performance Engine"]
4 S1 -->|"Base64 JPEG Physics Stream"| W1
5 S1 -->|"7-DOF Bipolar Torques (-2 to +2 Nm)"| W1
6 S1 -->|"3D Vector Coordinates (Tip, Obj, Goal)"| W1
7 W1 -->|"Control Commands (Start, Pause, Step, Reset, Policy)"| S1
8 end
9
10 subgraph Analytics_Deck ["4-Tab Analytics & Replay Deck"]
11 T1["Tab 1: Live Telemetry Dynamics (Raw & 20-Ep Moving Average)"]
12 T2["Tab 2: Milestone Replay Deck (16:9 Widescreen Video Gallery)"]
13 T3["Tab 3: Live PPO Logs (Algorithmic Console Stream)"]
14 T4["Tab 4: Environment & Reward Math Specifications"]
15 end
16
17 subgraph Deep_RL_Pipeline ["Stable-Baselines3 PPO Training Loop"]
18 TR1["train.py / Background Thread"] --> TR2["MuJoCo Pusher-v5 Physics"]
19 TR2 --> TR3["VisualProgressCallback"]
20 TR3 --> TR4["Step 0 to 300k MP4 & GIF Videos"]
21 TR3 --> TR5["Training Plots & Metrics JSON"]
22 TR4 & TR5 --> TR6["Single-Click ZIP Archive: ppo_pusher_bundle.zip"]
23 end
1git clone https://github.com/Hwihwa-Lab/pusher-v5-ppo.git
2cd pusher-v5-ppo
3pip install -r requirements.txt
1# Train PPO agent
2python train.py --timesteps 300000 --eval_freq 30000
3
4# Evaluate trained model
5python evaluate.py --model_path ./results/ppo_pusher.zip --episodes 5
You can load and evaluate this pre-trained agent in 5 lines of Python using Stable-Baselines3:
1import gymnasium as gym
2from stable_baselines3 import PPO
3
4# 1. Initialize Pusher-v5 environment & load model
5env = gym.make("Pusher-v5", render_mode="human")
6model = PPO.load("results/ppo_pusher.zip")
7
8# 2. Run deterministic pushing evaluation
9obs, _ = env.reset()
10done = False
11while not done:
12 action, _ = model.predict(obs, deterministic=True)
13 obs, reward, terminated, truncated, _ = env.step(action)
14 done = terminated or truncated
15
16env.close()
This project is licensed under the MIT License - see the
LICENSE file for details.