Skip to content

Commit

Permalink
Fixed dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolomonti authored and HaoruXue committed Sep 29, 2024
1 parent 821b3dd commit e3fed91
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dial_mpc/envs/unitree_h1_env.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import Any, Dict, Sequence, Tuple, Union, List

import numpy as np
Expand All @@ -24,7 +24,7 @@

@dataclass
class UnitreeH1WalkEnvConfig(BaseEnvConfig):
kp: Union[float, jax.Array] = jnp.array(
kp: Union[float, jax.Array] = field(default_factory=lambda: jnp.array(
[
200.0,
200.0,
Expand All @@ -46,8 +46,8 @@ class UnitreeH1WalkEnvConfig(BaseEnvConfig):
60.0,
60.0, # right shoulder, elbow
]
)
kd: Union[float, jax.Array] = jnp.array(
))
kd: Union[float, jax.Array] = field(default_factory=lambda: jnp.array(
[
5.0,
5.0,
Expand All @@ -69,7 +69,7 @@ class UnitreeH1WalkEnvConfig(BaseEnvConfig):
1.5,
1.5, # right shoulder, elbow
]
)
))
default_vx: float = 1.0
default_vy: float = 0.0
default_vyaw: float = 0.0
Expand Down

0 comments on commit e3fed91

Please sign in to comment.