enable¶
Runs at once Any mode Takes control
Enable the robot, so that it can home and move. The robot accepts it in any mode. While an error is latched, a pressed E-stop included, the robot refuses to enable and stays disabled: the call raises CommandRejected (ENABLE_REJECTED). Call clear_errors() first.
In IDLE mode, on a homed arm with gravity compensation on (as at every start), enabling starts freedrive: the arm holds itself up against gravity and can be moved by hand.
Syntax¶
Arguments¶
| Name | Type | Default | Description |
|---|---|---|---|
wait |
bool | None |
None |
Wait until the robot reports itself enabled, up to 10 s. None follows the client's sync setting. |
Returns¶
Nothing.
Examples¶
Usage restrictions 3 codes
This command runs at once; it is not queued. The robot accepts it in any mode and state, from the client that holds control or when no client does.
It answers with one of these codes when it does not carry the command out:
- [6101] Control held by another client — another client holds control; the message names it
- [6025] RTI not running or not answering — rTI did not answer within 1 s: it is not running or not responding. The command may still have taken effect
- [6015] Enable refused — an error is latched (a pressed E-stop included) or a safety violation is active: the robot stays disabled.
clear_errors()first
In Python, a code above raises CommandRejected; its number is the code. The call raises:
CommandRejected: Another client holds control. Or RTI refused it or did not answer within 1 s (Errors:).RobotTimeout: The robot did not answer within 5 s, or, withwait, did not report itself enabled within 10 s.RobotConnectionError: The client is not connected.
If the connection drops while the call waits for the robot's answer, it raises CommandRejected with the code CONNECTION_LOST (DISCONNECTED after disconnect()); while it waits for the robot's status, RobotConnectionError.
Like every immediate command, it also answers BAD_ARGS when a raw client sends a value the robot cannot read at all, and INTERNAL when it fails inside the robot.
Protocol¶
A client that does not use robotclient sends this over the TCP command protocol (port 29000) for the example above: