roboglia.move.Frame

class Frame(name='FRAME', positions=[], velocities=[], loads=[])[source]

Bases: object

A Frame is a single representation of the robots’ joints at one point in time. It is described by a list of positions, the velocities wanted to get to those positions and the loads. The last two of them are optional and will be padded with nan in case they do not cover all positions listed in the first parameter.

Parameters
  • name (str) – The name of the frame

  • positions (list of floats) – The desired positions for the joints. They are provided in the same order as the number of joints that are described at the begining of the Script where the frame is used. The unit of measure is the one used for the joints which in turn is dependent on the settings of the registers used by joints.

  • velocities (list of floats) – The velocities used to move to the desired positions. If they are empty or not all covered, the constructor will padded with nan to make it the same size as the positions. You can also use nan in the list to indicate that a particular joint does not need to change the velocity (will continue to use the one set previously).

  • loads (list of floats) – The loads used to move to the desired positions. If they are empty or not all covered, the constructor will padded with nan to make it the same size as the positions. You can also use nan in the list to indicate that a particular joint does not need to change the load (will continue to use the one set previously).

__init__(name='FRAME', positions=[], velocities=[], loads=[])[source]

Initialize self. See help(type(self)) for accurate signature.

property positions

Returns the positions of a frame.

property velocities

Returns the (padded) velocities of a frame.

property loads

Returns the (padded) loads of a frame.

property commands

Returns a list of tuples (pos, vel, load) for each joint in the frame.