Skip to content

Commit

Permalink
fix default value of gravity issue caused by newer python verisons
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneT2000 committed Mar 6, 2024
1 parent e0ca6bf commit ee757b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mani_skill2/utils/structs/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from dataclasses import asdict, dataclass
from dataclasses import asdict, dataclass, field
from typing import Sequence, Union

import numpy as np
Expand Down Expand Up @@ -40,7 +40,7 @@ def dict(self):

@dataclass
class SceneConfig:
gravity: np.ndarray = np.array([0, 0, -9.81])
gravity: np.ndarray = field(default_factory=lambda: np.array([0, 0, -9.81]))
bounce_threshold: float = 2.0
sleep_threshold: float = 0.005
contact_offset: float = 0.02
Expand Down

0 comments on commit ee757b4

Please sign in to comment.