base Module

Classes in roboglia can be categorized in two groups in relation to their position to the main robot class:

  • Downstream classes: are classes that are located between the robot class and the physical devices.

  • Upstream classes are classes that expose the robot capabilities in a uniform way like ‘joints’, ‘sensors’, ‘moves’, etc.

Downstream

The following classes from base module are provided for representing various structural elements of a robot.

Buses

BaseBus

A base abstract class for handling an arbitrary bus.

FileBus

A bus that writes to a file with cache provided for testing purposes.

SharedBus

Implements a bus that provides a locking mechanism for the access to the underlying hardware, aimed specifically for use in multi-threaded environments where multiple jobs could compete for access to one single bus.

SharedFileBus

This is a FileBus class that was wrapped for access to a shared resource.

Registers

BaseRegister

A minimal representation of a device register.

BoolRegister

A register with BOOL representation (true/false).

RegisterWithConversion

A register with an external representation that is produced by using a linear transformation.

RegisterWithDynamicConversion

A register that, in addition to the conversions provided by RegisterWithConversion can use the value provided by another register in the device as a factor adjustment.

RegisterWithThreshold

A register with an external representation that is represented by a threshold between negative and positive values.

RegisterWithMapping

A register that can specify a 1:1 mapping of internal values to external values.

Devices

BaseDevice

A base virtual class for all devices.

Threads and Loops

BaseThread

Implements a class that wraps a processing logic that is executed in a separate thread with the ability to pause / resume or fully stop the task.

BaseLoop

This is a thread that executes in a separate thread, scheduling a certain atomic work (encapsulated in the atomic method) periodically as prescribed by the frequency parameter.

BaseSync

Base processing for a sync loop.

BaseReadSync

A SyncLoop that performs a naive read of the registers by sequentially calling the read on each of them.

BaseWriteSync

A SyncLoop that performs a naive write of the registers by sequentially calling the read on each of them.

Middle

BaseRobot

A complete representation of a robot.

JointManager

Implements the management of the joints by alowing multiple movement streams to submit position commands to the robot.

Upstream

The following classes from base module are provided for helping with the synchronization of devices’ values task.

Joints

PVL

A representation of a (position, value, load) command that supports nan value components and implements a number of help functions like addition, substraction, negation, equality (with error margin) and representation.

PVLList

A class that holds a list of PVL commands and provides a number of extra manipulation functions.

Joint

A Joint is a convenient class to represent a positional device.

JointPV

A Joint with position and velocity control.

JointPVL

A Joint with position, velocity and load control.

Sensors

Sensor

A one-value sensor.

SensorXYZ

An XYZ sensor.