Skip to content

set_force_confirm

Runs at once Any mode Open to every client

Require a button press at the robot for a forced takeover. With it on, take_control(force=True) from a client that does not hold control succeeds only when someone at the control box confirms it within 20 s: holding button 2 for 1 s allows it, button 1 refuses it. With it off, any client on the network can take control from another. A claim on a robot that nobody controls never needs the button.

Any client can switch it on. Only the client that holds control can switch it off, or any client while nobody holds control.

Syntax

robot.set_force_confirm(enabled)

Arguments

Name Type Default Description
enabled bool required True to require the button press, False to stop requiring it.

Default values

Off, each time the robot software starts.

Returns

dict

{"force_confirm": bool}: the setting now in force.

Examples

robot.set_force_confirm(True)
Usage restrictions 2 codes

This command runs at once; it is not queued. The robot accepts it in any mode and state, from every client.

It answers with one of these codes when it does not carry the command out:

  • [6003] Invalid arguments — enabled was not true or false (a raw client's 1 / 0 also count)
  • [6101] Control held by another client — enabled is false and another client holds control

In Python, a code above raises CommandRejected; its number is the code. The call raises:

  • CommandRejected: The robot refused it; its error code says why.
  • RobotTimeout: The robot did not answer within 5 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:

{"id": "c1", "cmd": "set_force_confirm", "args": [true]}

See also