mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 18:26:11 +00:00
fix(envs): set LiberoEnvConfig.fps default to 20 to match robosuite (#4124)
* fix(envs): set LiberoEnvConfig.fps default to 20 to match robosuite LiberoEnvConfig.fps was set to 30, but the underlying robosuite OffScreenRenderEnv always runs at its default control_freq of 20 Hz since fps is never passed through. This mismatch silently decouples the dataset/eval loop rate from the actual simulation step rate. Set the default to 20 to match the real sim rate and avoid the footgun. Fixes #3368 * fix(libero): apply configured control frequency --------- Co-authored-by: xinmotlanthua <275663218+xinmotlanthua@users.noreply.github.com>
This commit is contained in:
@@ -35,6 +35,17 @@ def test_unknown_type():
|
||||
make_env_config("nonexistent")
|
||||
|
||||
|
||||
def test_libero_fps_controls_simulator_frequency():
|
||||
cfg = LiberoEnv(fps=17)
|
||||
|
||||
assert cfg.gym_kwargs["control_freq"] == 17
|
||||
|
||||
|
||||
def test_libero_rejects_nonpositive_fps():
|
||||
with pytest.raises(ValueError, match="fps must be positive"):
|
||||
LiberoEnv(fps=0)
|
||||
|
||||
|
||||
def test_identity_processors():
|
||||
"""Base class get_env_processors() returns identity pipelines."""
|
||||
cfg = make_env_config("aloha")
|
||||
|
||||
Reference in New Issue
Block a user