# rugvedchauragade/rugved---walk-agent-v1 architecture

> Architecture diagram of the GitHub repository rugvedchauragade/rugved---walk-agent-v1, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rugvedchauragade/rugved---walk-agent-v1
- Repository: https://github.com/rugvedchauragade/rugved---walk-agent-v1

## Overview

Rugved is a simulation-only quadruped locomotion reinforcement-learning project. The workflow defines a Gymnasium walking environment and reward, trains a PPO policy, evaluates clean and disturbed episodes against random and PID controllers, then exports frame-level schema and telemetry. Phase scripts are the product runtime; plots and build machinery are omitted. Source excerpts show the core environment, reward, training wrapper and downstream evaluation/export behavior. Later-phase links follow explicit README statements and SOURCE INDEX references; unsampled implementations are not independently verified.

Main entry points: [`walk_agent_phase7.py`](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase7.py) (Unified Scenarios), [`walk_agent_phase5.py`](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase5.py) (Disturbance Injection), [`walk_agent_phase2.py`](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase2.py) (Reward Strategies), [`walk_agent_phase1.py`](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase1.py) (Walk Environment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_environment["Walking Simulation"]
  node_env["Walk Environment"]
  node_reward["Reward Strategies"]
  node_disturbance["Disturbance Injection"]
end

subgraph group_learning["Policy Learning"]
  node_train["PPO Training"]
  node_model["Trained PPO Model"]
end

subgraph group_validation["Evaluation"]
  node_evaluation["Episode Evaluation"]
  node_comparison["RL vs PID"]
  node_pid["PID Controller"]
end

subgraph group_output["Telemetry Output"]
  node_finalrun["Unified Scenarios"]
  node_schema["Frame Schema"]
  node_telemetry["Telemetry Log"]
end

node_operator(("Operator"))

node_operator -->|"runs phase"| node_env
node_operator -->|"runs phase"| node_reward
node_operator -->|"runs phase"| node_train
node_operator -->|"runs phase"| node_evaluation
node_operator -->|"runs phase"| node_disturbance
node_operator -->|"runs phase"| node_comparison
node_operator -->|"runs phase"| node_finalrun
node_reward -->|"uses environment"| node_env
node_train -->|"wraps environment"| node_env
node_train -->|"applies reward"| node_reward
node_train -->|"saves policy"| node_model
node_evaluation -->|"evaluates episodes"| node_env
node_evaluation -->|"scores episodes"| node_reward
node_disturbance -->|"extends step"| node_env
node_disturbance -->|"scores episodes"| node_reward
node_comparison -->|"runs controller"| node_pid
node_comparison -->|"compares disturbed runs"| node_disturbance
node_comparison -->|"loads policy"| node_model
node_finalrun -->|"loads policy"| node_model
node_finalrun -->|"runs controller"| node_pid
node_finalrun -->|"uses scenarios"| node_disturbance
node_finalrun -->|"writes JSON"| node_schema
node_finalrun -->|"writes CSV"| node_telemetry

click node_env "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase1.py"
click node_reward "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase2.py"
click node_disturbance "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase5.py"
click node_train "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase3.py"
click node_model "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_model.zip"
click node_evaluation "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase4.py"
click node_comparison "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase6.py"
click node_pid "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase6.py"
click node_finalrun "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase7.py"
click node_schema "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_schema.json"
click node_telemetry "https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_telemetry.csv"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_env,node_reward,node_disturbance toneBlue
class node_train,node_model toneAmber
class node_evaluation,node_comparison,node_pid toneMint
class node_finalrun,node_schema,node_telemetry toneRose
class node_operator toneIndigo
```

## Components

### Walking Simulation

- [Walk Environment](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase1.py): `walk_agent_phase1.py`
- [Reward Strategies](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase2.py): `walk_agent_phase2.py`
- [Disturbance Injection](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase5.py): `walk_agent_phase5.py`

### Policy Learning

- [PPO Training](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase3.py): `walk_agent_phase3.py`
- [Trained PPO Model](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_model.zip): `walk_agent_model.zip`

### Evaluation

- [Episode Evaluation](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase4.py): `walk_agent_phase4.py`
- [RL vs PID](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase6.py): `walk_agent_phase6.py`
- [PID Controller](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase6.py): `walk_agent_phase6.py`

### Telemetry Output

- [Unified Scenarios](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_phase7.py): `walk_agent_phase7.py`
- [Frame Schema](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_schema.json): `walk_agent_schema.json`
- [Telemetry Log](https://github.com/rugvedchauragade/rugved---walk-agent-v1/blob/main/walk_agent_telemetry.csv): `walk_agent_telemetry.csv`

### Other components

- **Operator**

## Connections

- Operator → Walk Environment: runs phase (evidence: `README.md`)
- Operator → Reward Strategies: runs phase (evidence: `README.md`)
- Operator → PPO Training: runs phase (evidence: `README.md`)
- Operator → Episode Evaluation: runs phase (evidence: `README.md`)
- Operator → Disturbance Injection: runs phase (evidence: `README.md`)
- Operator → RL vs PID: runs phase (evidence: `README.md`)
- Operator → Unified Scenarios: runs phase (evidence: `README.md`)
- Reward Strategies → Walk Environment: uses environment (evidence: `walk_agent_phase2.py`)
- PPO Training → Walk Environment: wraps environment (evidence: `walk_agent_phase3.py`)
- PPO Training → Reward Strategies: applies reward (evidence: `walk_agent_phase3.py`)
- PPO Training → Trained PPO Model: saves policy (evidence: `README.md`)
- Episode Evaluation → Walk Environment: evaluates episodes (evidence: `walk_agent_phase4.py`)
- Episode Evaluation → Reward Strategies: scores episodes (evidence: `walk_agent_phase4.py`)
- Disturbance Injection → Walk Environment: extends step (evidence: `walk_agent_phase5.py`)
- Disturbance Injection → Reward Strategies: scores episodes (evidence: `walk_agent_phase5.py`)
- RL vs PID → PID Controller: runs controller (evidence: `walk_agent_phase6.py`)
- RL vs PID → Disturbance Injection: compares disturbed runs (evidence: `README.md`)
- RL vs PID → Trained PPO Model: loads policy (evidence: `README.md`)
- Unified Scenarios → Trained PPO Model: loads policy (evidence: `walk_agent_phase7.py`)
- Unified Scenarios → PID Controller: runs controller (evidence: `README.md`)
- Unified Scenarios → Disturbance Injection: uses scenarios (evidence: `README.md`)
- Unified Scenarios → Frame Schema: writes JSON (evidence: `walk_agent_phase7.py`)
- Unified Scenarios → Telemetry Log: writes CSV (evidence: `walk_agent_phase7.py`)
