sim2bot.Robot.wait_until_reached¶
wait_until_reached(q: Sequence[float], robot: int = 0, tol: float = 0.02, timeout: float = 10.0) -> bool
¶
Wait until every addressed joint is within a target tolerance.
Parameters:
-
q(Sequence[float]) –Target joint positions in radians and discovered joint order.
-
robot(int, default:0) –Robot index returned by
describe. -
tol(float, default:0.02) –Absolute per-joint tolerance in radians.
-
timeout(float, default:10.0) –Maximum wait in seconds.
Returns:
-
bool–Truewhen all supplied joints reach tolerance;Falseon timeout.
Source code in sim2bot/client.py
Practical examples¶
Examples use objects discovered from the current scene rather than hard-coded robot metadata.
Wait for home
Use a tighter tolerance
Guidance¶
Usage tip
Choose tolerance based on controller stiffness and task needs; an unrealistically small value may never pass in physics mode.