sim2bot.Robot.describe¶
describe(timeout: float = 2.0) -> list[RobotInfo]
¶
Request model-derived metadata for every robot in the current scene.
Parameters:
-
timeout(float, default:2.0) –Maximum time in seconds to wait for a scene announcement.
Returns:
-
list[RobotInfo]–Robots in current scene order. The returned
indexis the command -
list[RobotInfo]–address to pass as
robot=. An empty list means no scene response -
list[RobotInfo]–arrived before the timeout or no robot is loaded.
Raises:
-
RuntimeError–If the client is not connected.
-
ConnectionClosed–If the WebSocket closes while sending discovery.
-
OSError–If the selected transport cannot send the request.
Notes
Discover the scene instead of hard-coding degree of freedom, joint order, limits, or home targets.
Source code in sim2bot/client.py
Practical examples¶
Examples use objects discovered from the current scene rather than hard-coded robot metadata.
List every robot
Select by stable scene ID
Guidance¶
Usage tip
Discover before controlling. Scene order, degree of freedom, joint names, and limits can change when users edit the scene.
Common error
An empty list means no robot scene was announced before the timeout; it does not necessarily mean the bridge connection failed.