disconnect¶
Runs in the client Sends nothing to the robot
Close the connection to the robot. The robot releases control at once if this client holds it, so another client can take it. On the client, every call still waiting for the robot ends: a command's call raises CommandRejected with the code DISCONNECTED, and a status wait such as wait_mode() raises RobotConnectionError. Queued commands that had not finished count as failed: on_motion_error() gets them, and the next wait_idle() raises MotionFailed for them.
Calling it again, or before connect(), does nothing. Leaving a with RobotClient() as robot: block calls it.
Syntax¶
Arguments¶
None.
Returns¶
Nothing.
Examples¶
robot.wait_idle()
robot.disconnect()
from robotclient import RobotClient
with RobotClient() as robot:
robot.connect("192.168.0.84")
robot.wait_homed()
Further details¶
Warning
When this client holds control and moves it queued still run, the
robot stops the arm as stop() does; a lost connection does the same.
Call wait_idle() first to let them finish. A jog stops too. The
robot stays in its mode, and a real-time session opened with
rti_connect() stays open.