Skip to content

Commit

Permalink
use dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
WT-MM committed Oct 28, 2024
1 parent f8ca80a commit 1111d90
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions sim/sim2sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
python sim/sim2sim.py --load_model examples/standing_micro.pt --embodiment stompymicro
"""
import argparse
from dataclasses import dataclass
import math
import os
from collections import deque
Expand Down Expand Up @@ -75,21 +76,12 @@ def handle_keyboard_input() -> None:
if keys[pygame.K_z]:
yaw_vel_cmd -= 0.001


@dataclass
class Sim2simCfg:
def __init__(
self,
sim_duration: float = 60.0,
dt: float = 0.001,
decimation: int = 10,
tau_factor: float = 3,
) -> None:

self.sim_duration = sim_duration
self.dt = dt
self.decimation = decimation

self.tau_factor = tau_factor
sim_duration: float = 60.0
dt: float = 0.001
decimation: int = 10
tau_factor: float = 3


def quaternion_to_euler_array(quat: np.ndarray) -> np.ndarray:
Expand Down

0 comments on commit 1111d90

Please sign in to comment.