robot_interfaces.py_one_joint_types module

class robot_interfaces.py_one_joint_types.Action(torque=[0] * n_joints, position=[nan] * n_joints, position_kp=[nan] * n_joints, position_kd=[nan] * n_joints)

Bases: pybind11_object

Action with desired torque and (optional) position.

The resulting torque command sent to the robot is:

torque_command = torque + PD(position)

To disable the position controller, set the target position to NaN. The controller is executed joint-wise, so it is possible to run it only for some joints by setting a target position for these joints and setting the others to NaN.

The specified torque is always added to the result of the position controller, so if you only want to run the position controller, make sure to set torque to zero for all joints.

Parameters:
  • torque – Desired torque.

  • position – Desired position. Set values to NaN to disable position controller for the corresponding joints

  • position_kp – P-gains for the position controller. Set to NaN to use default values.

  • position_kd – D-gains for the position controller. Set to NaN to use default values.

property position

List of desired positions, one per joint. If set, a PD position controller is run and the resulting torque is added to torque. Set to NaN to disable position controller (default).

property position_kd

D-gains for position controller, one per joint. If NaN, default is used.

property position_kp

P-gains for position controller, one per joint. If NaN, default is used.

property torque

List of desired torques, one per joint.

class robot_interfaces.py_one_joint_types.Backend

Bases: pybind11_object

get_termination_reason()
initialize()
is_running()
request_shutdown()
wait_until_first_action()
wait_until_terminated()
class robot_interfaces.py_one_joint_types.BaseData

Bases: pybind11_object

class robot_interfaces.py_one_joint_types.BinaryLogReader(filename: str)

Bases: pybind11_object

See read_file().

property data

Contains the log entries.

Type:

List[LogEntry]

read_file(filename: str)

Read data from the specified binary robot log file.

The data is stored to data.

Parameters:

filename (str) – Path to the robot log file.

class robot_interfaces.py_one_joint_types.Frontend

Bases: pybind11_object

append_desired_action()
get_applied_action()
get_current_timeindex()
get_desired_action()
get_observation()
get_status()
get_timestamp_ms()
wait_until_timeindex()
class robot_interfaces.py_one_joint_types.LogEntry

Bases: pybind11_object

Represents the logged of one time step.

property applied_action
property desired_action
property observation
property status
property timeindex
property timestamp
class robot_interfaces.py_one_joint_types.Logger

Bases: pybind11_object

class Format

Bases: pybind11_object

Members:

BINARY

CSV

CSV_GZIP

BINARY = <Format.BINARY: 0>
CSV = <Format.CSV: 1>
CSV_GZIP = <Format.CSV_GZIP: 2>
property name
property value
reset()
save_current_robot_data()
save_current_robot_data_binary()
start()
stop()
stop_and_save()
class robot_interfaces.py_one_joint_types.MultiProcessData

Bases: BaseData

property applied_action
property desired_action
property observation
property status
class robot_interfaces.py_one_joint_types.Observation

Bases: pybind11_object

property position

List of angular joint positions [rad], one per joint.

property torque

List of torques [Nm], one per joint.

property velocity

List of angular joint velocities [rad/s], one per joint.

class robot_interfaces.py_one_joint_types.SingleProcessData

Bases: BaseData

property applied_action
property desired_action
property observation
property status
robot_interfaces.py_one_joint_types.clear_memory()
robot_interfaces.py_one_joint_types.create_follower__ActionMultiProcessTimeSeries()
robot_interfaces.py_one_joint_types.create_follower__ObservationMultiProcessTimeSeries()
robot_interfaces.py_one_joint_types.create_leader__ActionMultiProcessTimeSeries()
robot_interfaces.py_one_joint_types.create_leader__ObservationMultiProcessTimeSeries()