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 alist
exposing methods such asindex
,__iter__
__len__
.- Parameters:
trajectories (
list
ofMinimalTrajectory
) – Trajectory points.
- property trajectories¶
List of trajectories.
- Return type:
- Type:
- property data¶
Get a
dict
representation ofMinimalTrajectories
.- Return type:
- reversed_recursively()[source]¶
Get an independent, recursively reversed copy of object.
- Return type:
- to_data()[source]¶
Get a
dict
representation ofMinimalTrajectories
.- Return type:
- classmethod from_data(data)[source]¶
Construct a
MinimalTrajectories
from adict
representation.- Parameters:
data (
dict
) – The data dictionary.- Returns:
- Return type:
- 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 asindex
,__iter__
and reveresed.- Parameters:
points (
list
) – Trajectory points.
- JOINT_TRAJECTORY = 0¶
- FRAME_TRAJECTORY = 1¶
- property points¶
List of trajectory points.
- property data¶
Get a
dict
representation ofMinimalTrajectory
.- Return type:
- property trajectory_type¶
Return the type of elements in the trajectory.
- classmethod from_joint_trajectory(joint_trajectory)[source]¶
Construct a instance from a
compas_fab.robots.JointTrajectory
.- Return type:
- to_data()[source]¶
Get
dict
representation ofMinimalTrajectory
.
- classmethod from_data(data)[source]¶
Construct a
MinimalTrajectory
from a dictionary representation.- Parameters:
data (
dict
) – The data dictionary.- Returns:
- Return type: