sim2bot.Robot.set_room_opening¶
Experimental API
This surface is still being validated and may change before the public beta.
set_room_opening(opening: str, fraction: float) -> None
¶
Set the target opening fraction of a scene door or window.
Parameters:
-
opening(str) –Device ID returned by
room_devices. -
fraction(float) –0.0closed through1.0fully open. Values are clamped.
Returns:
-
None–The clamped target is sent asynchronously.
Raises:
-
TypeError–If
fractioncannot be converted tofloat. -
ValueError–If
fractionis not a numeric value. -
RuntimeError–If the client is not connected.
-
ConnectionClosed–If the WebSocket closes while sending the command.
-
OSError–If the selected transport cannot send the command.
Warning
This API is experimental. Browser-side room actuation is currently under revision and may not reliably move every authored mechanism. Do not rely on it for automated tests until that work is completed.
Source code in sim2bot/client.py
Practical examples¶
Examples use objects discovered from the current scene rather than hard-coded robot metadata.
Request a fully open door
Guidance¶
Important behavior
This API is experimental and current browser-side room mechanisms may not move reliably.
Common error
Pass the discovered device ID, not its display name.