set_inertia_comp¶
Runs at once Any mode Takes control
Switch the inertia feedforward on or off for the whole robot. With it on, the robot adds the torque each joint needs to accelerate as commanded: for the arm's links and for the motors' rotors behind the gearboxes. It is computed from the commanded motion of each control cycle, never from a measured one.
It acts in EXEC and JOG motion and in real-time position streams. There it uses the stream's own acceleration, and only while rti_set_dynamics_ff() is "stream" (as at the start of every real-time session) and rti_set_rate_limiter() is on. Freedrive, holds, homing, and real-time velocity and torque streams get none.
The call returns as soon as the robot accepts it. latest_status() shows the switch in inertia_comp 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 inertia torque, False to stop adding it. |
Default values¶
From config/system.xml <dynamics_feedforward><inertia>, read when the
robot software starts: on as shipped, and when the element is missing.
Returns¶
Any
Always None: the robot's answer carries no data.
Examples¶
robot.set_inertia_comp(False)
robot.move_joints(90, -105, 165, 0, -30, 180)
robot.wait_idle()
robot.set_inertia_comp(True)
Further details¶
Note
Off, the drives' own position control makes the accelerating torque, so the joints follow fast moves less closely.
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: