I guess it kinda works ish

This commit is contained in:
pulipakaa24
2025-12-12 08:56:30 -06:00
parent bbcf7d40d2
commit bfe6ebdf34
12 changed files with 1454 additions and 688 deletions

View File

@@ -5,6 +5,7 @@ Runs a simple episode with constant actions to verify the environment works
from lev_pod_env import LevPodEnv
import numpy as np
import time
# Create environment with GUI for visualization
env = LevPodEnv(use_gui=True, initial_gap_mm=15)
@@ -30,7 +31,7 @@ print("\nRunning test episode...")
for step in range(500):
# Apply constant moderate PWM to all 4 coils
# 50% PWM should generate current that produces upward force
action = np.array([0.95,0.95,-0.95,-0.95], dtype=np.float32)
action = np.array([0,0,0,0], dtype=np.float32)
obs, reward, terminated, truncated, info = env.step(action)
@@ -51,6 +52,8 @@ for step in range(500):
if terminated or truncated:
print(f"\nEpisode terminated at step {step}")
break
time.sleep(0.01)
print("\n" + "=" * 60)
print("Test complete!")