mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-30 13:09:40 +00:00
fix(RGB only): remove the stereo module fallback when setting RGB/color parameters to avoid unexpected impacts on depth sensing
This commit is contained in:
@@ -322,15 +322,16 @@ def test_get_color_sensor_prefers_rgb_camera():
|
||||
assert camera._get_color_sensor() is rgb
|
||||
|
||||
|
||||
def test_get_color_sensor_falls_back_to_stereo_module():
|
||||
"""D405 has no separate RGB module; color comes from Stereo Module."""
|
||||
def test_get_color_sensor_raises_without_dedicated_rgb_module():
|
||||
"""D405 has no separate RGB module; we refuse to touch the shared Stereo Module."""
|
||||
config = RealSenseCameraConfig(serial_number_or_name="042")
|
||||
camera = RealSenseCamera(config)
|
||||
|
||||
stereo = _make_mock_sensor("Stereo Module")
|
||||
_attach_mock_color_sensor(camera, stereo)
|
||||
|
||||
assert camera._get_color_sensor() is stereo
|
||||
with pytest.raises(RuntimeError, match="dedicated 'RGB Camera' module"):
|
||||
camera._get_color_sensor()
|
||||
|
||||
|
||||
def test_get_color_sensor_raises_with_available_sensors():
|
||||
|
||||
Reference in New Issue
Block a user