forcedimension_core.containers.numpy module

class forcedimension_core.containers.numpy.DOFFloat(data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))[source]

Bases: ndarray

Represents an array of floats, one for each degree-of-freedom as a view over a numpy.array. Typically used by functions that request joint angles or linear/angular velocities for each degree-of-freedom.

property delta: Vec3

A view over the part of the buffer that corresponds to the degrees-of-freedom typically associated with the DELTA structure.

property gripper: c_double

A view over the part of the buffer that corresponds to the degrees-of-freedom typically associated with the gripper.

property ptr: LP_c_double

A pointer to the front of the underlying contiguous data.

property wrist: Vec3

A view over the part of the buffer that corresponds to the degrees-of-freedom typically associated with the WRIST structure.

class forcedimension_core.containers.numpy.DOFInt(data: Array[int, int] = (0, 0, 0, 0, 0, 0, 0, 0))[source]

Bases: ndarray

Represents an array of C ints, one for each degree-of-freedom as a view over a numpy.ndarray. Typically used by functions that get encoder values for each degree-of-freedom

property delta: Enc3

A view over the part of the buffer that corresponds to the degrees-of-freedom typically associated with the DELTA structure.

property gripper: c_int

A view over the part of the buffer that corresponds to the degrees-of-freedom typically associated with the gripper.

property ptr: LP_c_int
property wrist: Enc3

A view over the part of the buffer that corresponds to the degrees-of-freedom typically associated with the WRIST structure.

property wrist_grip: Enc4

A view over the part of the buffer that corresponds to the degrees-of-freedom typically associated with the WRIST structure and the gripper.

class forcedimension_core.containers.numpy.DOFMotor(data: Array[int, int] = (0, 0, 0, 0, 0, 0, 0, 0))[source]

Bases: ndarray

Represents an array of C unsigned shorts, one for each degree-of-freedom as a view over a numpy.ndarray. Typically used by functions that request motor commands for each degree-of-freedom.

property ptr: LP_c_ushort
class forcedimension_core.containers.numpy.Enc3(data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = (0.0, 0.0, 0.0))[source]

Bases: ndarray

Represents an array of three C ints as a view over a numpy.ndarray. Typically used by functions which return information about encoders from the WRIST or DELTA structure.

property ptr: LP_c_int

A pointer to the front of the array.

property ptrs: Tuple[LP_c_int, LP_c_int, LP_c_int]

A tuple of pointers to each element of the array in order.

class forcedimension_core.containers.numpy.Enc4(data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = (0.0, 0.0, 0.0, 0.0))[source]

Bases: ndarray

Represents an array of four C ints as a view over a numpy.ndarray. Typically used functions which convert gripper motor commands to forces and vice versa.

property ptr: LP_c_int

A pointer to the front of the underlying contiguous data.

class forcedimension_core.containers.numpy.Mat3x3(data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))[source]

Bases: ndarray

Represents the type of a 3x3 matrix of floats as a view over a numpy.ndarray`. Typically used to represent a 3x3 coordinate frame matrix.

property ptr: LP_c_double

A pointer to the front of the underlying contiguous data.

class forcedimension_core.containers.numpy.Mat6x6(data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))[source]

Bases: ndarray

Represents the type of a 6x6 matrix of floats as a view over a numpy.ndarray. Typically used to represent a 6x6 inertia matrix.

property ptr: LP_c_double

A pointer to the front of the underlying contiguous data.

class forcedimension_core.containers.numpy.Mot3(data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = (0.0, 0.0, 0.0))[source]

Bases: ndarray

Represents an array of three C ushorts as a view over a numpy.ndarray. Typically used functions which take motor commands or convert motor commands to forces (and vice versa). In those functions, represents an array of motor commands for each axis of the delta or wrist structure.

property ptr: LP_c_ushort

A pointer to the front of the array.

property ptrs: Tuple[LP_c_ushort, LP_c_ushort, LP_c_ushort]

A tuple of pointers to each element of the array in order.

class forcedimension_core.containers.numpy.Vec3(data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = (0.0, 0.0, 0.0))[source]

Bases: ndarray

Represents an array of three C floats as a view over a numpy.ndarray. Typically used by functions which return a vector or take a vector. Can also be used by functions which convert a set of 3 float such as in the functions which get orientation.

property ptr: LP_c_double

A pointer to the front of the array.

property ptrs: Tuple[LP_c_double, LP_c_double, LP_c_double]

A tuple of pointers to each element of the array in order.

property x: float
property y: float

Alias to 1st element

property z: float

Alias to 2nd element