set_friction_ff¶
Runs at once Any mode Takes control
Switch the friction feedforward on or off for the whole robot. With it on, the robot adds the torque each joint's friction takes at the commanded speed, from the friction model in the robot XML (per joint <friction_coulomb_nm>, <friction_viscous_nm_s> and <friction_load_per_nm>). <dynamics_feedforward><friction_fraction> in config/system.xml sets the share of the model it adds: all of it as shipped.
It acts in EXEC and JOG motion and in real-time position and velocity streams. A joint commanded to stand still gets none, and neither do freedrive (see set_friction_comp()), homing and real-time torque streams. It uses no measurement, so it cannot run away: each drive's own control corrects what is left.
The call returns as soon as the robot accepts it. latest_status() shows the switch in friction_ff once it is in force, and the robot's activity log records each change.
Syntax¶
Arguments¶
| Name | Type | Default | Description |
|---|---|---|---|
enabled |
bool |
required | True to add the friction torque, False to stop adding it. |
Default values¶
From config/system.xml <dynamics_feedforward><friction>, read when
the robot software starts: off as shipped, and when the element is
missing.
Returns¶
Any
Always None: the robot's answer carries no data.
Examples¶
robot.set_friction_ff(True)
robot.move_joints(90, -105, 165, 0, -30, 180)
robot.wait_idle()
robot.set_friction_ff(False)
Further details¶
Note
It ships off: measured on the arm, it did not make the joints follow their path more closely. Switch it off while you measure friction, or it hides what you measure.
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
- [6003] Invalid arguments — the value was not true or false (1 / 0); this client always sends one of them
- [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
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.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: