Skip to content

get_versions

Runs at once Any mode Open to every client

Return the version of every part of the robot. The robot reports its software, the operating system, the description package, the control box and each drive, and the clients connected now. A value a part has not reported yet is None. The software's own version is the one the robot software started with. It moves nothing.

Syntax

robot.get_versions()

Arguments

None.

Returns

dict

A dict: runtime: the robot software's version, branch and commit. python: the Python version that runs it. os: name, kernel and realtime (whether the kernel is a real-time one). description_package: version, path, min (the oldest version the robot's configuration accepts) and ok (whether it is at least that). protocols: commands, rti and telemetry, the protocol versions. hardware: what the configuration declares: robot, revision, driver_types (per joint), gripper, gripper_revision, gripper_driver_type and description_package_min; and error when a configuration file could not be read. drives: one dict per joint: joint (1 for J1), can_id, firmware, hardware, serial, batch, driver_type, supported (as firmware_supported in get_hardware()) and supported_range. gripper: the same for a CAN gripper's drive, without joint and batch, or None. control_box: pcb_configured (the PCB revision the configuration names), and hardware, software, serial and batch as the board reports them. config_formats: reads (per kind of configuration file, the newest format this software reads) and files (each file read, with its kind and schema). clients: one dict per connected client: client (its name and address), and its client library's version and protocol. time: when it was read, in seconds since 1970, UTC.

Examples

robot.get_versions()["runtime"]["version"]
Usage restrictions never refused

This command runs at once; it is not queued. The robot accepts it in any mode and state, from every client.

It never answers with an error code.

In Python, the call raises:

  • 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": "get_versions", "args": []}

See also