A minimal trajectory class to mix frame sequences and joint trajectories.

Module name in reference to class_fab.robots.

class rapid_clay_formations_fab.robots.trajectories.MinimalTrajectories(trajectories)[source]

Bases: _ListLike

List of MinimalTrajectory objects.

This class inherits from MutableSequence which means that it behaves like a list exposing methods such as index, __iter__ __len__.

Parameters:

trajectories (list of MinimalTrajectory) – Trajectory points.

__init__(trajectories)[source]
property trajectories

List of trajectories.

Return type:

List[MinimalTrajectory]

Type:

list

property data

Get a dict representation of MinimalTrajectories.

Return type:

dict

reverse_recursively()[source]

Reverse list and the lists elements.

Return type:

None

copy()[source]

Get an independent copy of object.

Return type:

MinimalTrajectories

reversed_recursively()[source]

Get an independent, recursively reversed copy of object.

Return type:

MinimalTrajectories

to_data()[source]

Get a dict representation of MinimalTrajectories.

Return type:

dict

classmethod from_data(data)[source]

Construct a MinimalTrajectories from a dict representation.

Parameters:

data (dict) – The data dictionary.

Returns:

MinimalTrajectories

Return type:

MinimalTrajectories

class rapid_clay_formations_fab.robots.trajectories.MinimalTrajectory(points)[source]

Bases: _ListLike

Trajectory defined either as joint positions or frames.

This class inherits from UserList which means that it behaves like a list implementing methods such as index, __iter__ and reveresed.

Parameters:

points (list) – Trajectory points.

JOINT_TRAJECTORY = 0
FRAME_TRAJECTORY = 1
__init__(points)[source]
property points

List of trajectory points.

Return type:

List[Union[Frame, Configuration]]

Type:

list

property data

Get a dict representation of MinimalTrajectory.

Return type:

dict

property trajectory_type

Return the type of elements in the trajectory.

Return type:

int

Type:

type

copy()[source]

Get an independent copy of object.

Return type:

MinimalTrajectory

reversed()[source]

Get an independent, reversed copy of object.

Return type:

MinimalTrajectory

to_compas_rrc()[source]
Return type:

Tuple[Callable, List[Union[Frame, RobotJoints]]]

classmethod from_joint_trajectory(joint_trajectory)[source]

Construct a instance from a compas_fab.robots.JointTrajectory.

Return type:

MinimalTrajectory

to_data()[source]

Get dict representation of MinimalTrajectory.

classmethod from_data(data)[source]

Construct a MinimalTrajectory from a dictionary representation.

Parameters:

data (dict) – The data dictionary.

Returns:

MinimalTrajectory

Return type:

MinimalTrajectory