Skip to content

save_joint_walls

Runs at once Any mode Takes control

Save the live freedrive walls into the robot XML. The robot writes every joint's live wall settings into its <joint> block of the robot XML as a <freedrive_wall> element, replacing the one there or adding it; the rest of the file, comments included, stays as it is. Settings at their default are written as auto. The walls in force do not change; from then on the robot software also starts with them.

Syntax

robot.save_joint_walls()

Arguments

None.

Returns

Any

The walls in force, as get_joint_walls() returns them, now with unsaved false.

Examples

robot.set_joint_wall(5, frequency_hz=6.0)
robot.save_joint_walls()
Usage restrictions 2 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
  • [7005] Walls not saved — the robot XML could not be read or written, has no <joint> block for one of the joints, or would no longer be valid XML after the change. The walls in force stay as they are

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

  • CommandRejected: The robot refused it: the file could not be written (SAVE_FAILED), or another client holds control.
  • 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": "save_joint_walls", "args": []}

See also