placo::tools#

class placo.AxisesMask#

Used to mask some task axises.

R_custom_world: ndarray#

ROtation from world to custom rotation (provided by the user)

R_local_world: ndarray#

Rotation from world to local frame (provided by task)

apply(M: ndarray) ndarray#

Apply the masking to a given matrix.

Parameters:

M – the matrix to be masked (3xn)

set_axises(axises: str, frame: str) None#

Sets the axises to be masked (kept), for example “xy”.

Parameters:
  • axises – axises to be kept

  • frame – the reference frame where the masking is done (task, local or custom)

class placo.CubicSpline(angular: bool = False)#
add_point(t: float, x: float, dx: float) None#

Adds a point in the spline.

Parameters:
  • t – time

  • x – value

  • dx – speed

clear() None#

Clears the spline.

duration() float#

Spline duration.

Returns:

duration in seconds

pos(t: float) float#

Retrieve the position at a given time.

Parameters:

t – time

Returns:

position

vel(x: float) float#

Retrieve velocity at a given time.

Parameters:

t – time

Returns:

velocity

class placo.CubicSpline3D#
add_point(t: float, x: ndarray, dx: ndarray) None#

Adds a point.

Parameters:
  • t – time

  • x – value (3D vector)

  • dx – velocity (3D vector)

clear() None#

Clears the spline.

duration() float#

Spline duration.

Returns:

spline duration in seconds

pos(t: float) ndarray#

Returns the spline value at time t.

Parameters:

t – time

Returns:

position (3D vector)

vel(t: float) ndarray#

Returns the spline velocity at time t.

Parameters:

t – time

Returns:

velocity (3D vector)

class placo.Prioritized#

Represents an object (like a task or a constraint) that is prioritized.

configure(name: str, priority: any, weight: float = 1.0) None#

Configures the object.

Parameters:
  • name – task name

  • priority – task priority (hard, soft or scaled)

  • weight – task weight

name: str#

Object name.

priority: any#

Object priority.