sim2bot.Robot.cameras¶
cameras(timeout: float = 2.0) -> list[dict]
¶
Return the global scene cameras available for subscription.
Parameters:
-
timeout(float, default:2.0) –Discovery timeout in seconds when the scene is not cached.
Returns:
-
list[dict]–Camera dictionaries containing an
id, label, kind, stream -
list[dict]–defaults, and mount metadata. Mount kind may be
world,robot, -
list[dict]–object, orsensor.
Raises:
-
RuntimeError–If discovery is needed and the client is not connected.
-
ConnectionClosed–If the WebSocket closes during discovery.
-
OSError–If the selected transport cannot send a discovery request.
Notes
Camera IDs are global scene resources. A world-mounted overhead camera
can observe several robots and is not addressed with robot=.
Source code in sim2bot/client.py
Practical examples¶
Examples use objects discovered from the current scene rather than hard-coded robot metadata.
Find world-mounted cameras
Find a camera mounted on one robot
Guidance¶
Usage tip
Treat the camera ID as global. Mount metadata explains attachment but does not make the stream belong to a robot command index.
Common error
Do not invent IDs such as model:0; select the exact ID returned by discovery.