Skip to content

accept_homing_reference

Runs at once HOMING mode Enabled Takes control

Accept where a joint just homed as its new reference. Homing asks when a joint homes more than 1 deg from where this arm's joint always homes: it holds the arm until it is answered, and latest_status()["homing_question"] names the joint. Accept after a deliberate change, such as the gripper re-fitted or a belt or a drive replaced: the robot stores the new spot for that joint and homing goes on. Otherwise end the homing with stop(): the arm is then not homed; bring it to its park pose and home it again. Unanswered for 10 minutes (config/system.xml <homing_question_timeout_s>), the homing ends the same way.

Syntax

robot.accept_homing_reference(wait=None)

Arguments

Name Type Default Description
wait bool | None None Wait until homing has ended, up to 3 minutes. None follows the client's sync setting.

Returns

Nothing.

Examples

try:
    robot.home(wait=True)
except HomingQuestion as question:
    print(question.joints)
    robot.accept_homing_reference(wait=True)

Further details

Warning

A joint that stopped short of its endstop, a false stall, gets a wrong reference when accepted: its angles are then off by that much. If nothing was changed on purpose, stop the homing instead.

Usage restrictions 4 codes

This command runs at once; it is not queued. The robot accepts it only when it is in HOMING mode and enabled, 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:

  • [6010] Command not allowed now — the message names the mode or state it needs
  • [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
  • [6026] Refused by RTI — no homing question is waiting. The message says why

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

  • CommandRejected: The robot refused it: it is not homing or not enabled, or another client holds control. Or RTI refused it or did not answer within 1 s (Errors:).
  • HomingFailed: With wait, homing failed later on, or was stopped.
  • HomingQuestion: With wait, homing asks about another joint.
  • RobotTimeout: The robot did not answer within 5 s, or, with wait, homing had not ended after 3 minutes.
  • 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.

See also