Limit DreamWaQ commands to stand or walk
This commit is contained in:
@@ -44,6 +44,19 @@ def test_apply_action_advances_three_frame_action_history():
|
||||
np.testing.assert_array_equal(state.info["current_actions"], 3.0)
|
||||
|
||||
|
||||
def test_dreamwaq_commands_are_stand_or_fixed_forward_speed(monkeypatch):
|
||||
task = DreamWaQTask.__new__(DreamWaQTask)
|
||||
task._cfg = DreamWaQCfg()
|
||||
monkeypatch.setattr(
|
||||
np.random, "random", lambda size: np.array([0.1, 0.2, 0.9], dtype=np.float32)
|
||||
)
|
||||
|
||||
commands = task.resample_commands(3)
|
||||
|
||||
np.testing.assert_array_equal(commands[:, 0], [0.0, 0.5, 0.5])
|
||||
np.testing.assert_array_equal(commands[:, 1:], 0.0)
|
||||
|
||||
|
||||
def test_dreamwaq_feet_air_time_matches_upstream_contact_filtering():
|
||||
task = DreamWaQTask.__new__(DreamWaQTask)
|
||||
task._cfg = SimpleNamespace(ctrl_dt=0.02)
|
||||
|
||||
Reference in New Issue
Block a user