read_drive_parameters¶
Runs at once Any mode Open to every client
Read every parameter that the drives hold now. The robot asks each drive for its parameters (about 90 each: gains and limits, the motor model, the control loops, the watchdog, the build and board ids) one at a time, paced between its regular status requests, so its control loop does not slow down. All drives take about 5 s, one drive under 1 s. A new read replaces one that is still running. It moves nothing and changes nothing; it works in any mode. Read the values with get_drive_parameters().
Syntax¶
Arguments¶
| Name | Type | Default | Description |
|---|---|---|---|
drive |
int | None |
None |
The drive to read: 1 to the number of joints for a joint, one more for a CAN gripper. None reads every drive. |
wait |
bool | None |
None |
Wait until the read has finished, up to 30 s. None follows the client's sync setting. |
Returns¶
Nothing.
Examples¶
Usage restrictions 3 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 —
driveis not one of this robot's drives - [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 — rTI refused it: no such drive. The message says why
In Python, a code above raises CommandRejected; its number is the code. The call raises:
CommandRejected: The robot refused it: no such drive. Or RTI refused it or did not answer within 1 s (Errors:).RobotTimeout: The robot did not answer within 5 s, or, withwait, the read had not finished after 30 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: