JointTrajectoryPoint
- class compas_fab.robots.JointTrajectoryPoint(joint_values=None, joint_types=None, velocities=None, accelerations=None, effort=None, time_from_start=None, joint_names=None)[source]
Bases:
Configuration
Defines a point within a trajectory.
A trajectory point is a sub-class of
Configuration
extended with acceleration, effort and time from start information.Trajectory points are defined either as joint_values + velocities and accelerations, or as joint_values + efforts.
- Parameters
joint_values (
list
offloat
, optional) – Joint values expressed in radians or meters, depending on the respective type.joint_types (
list
ofcompas.robots.Joint.TYPE
, optional) – Joint types, e.g. alist
ofcompas.robots.Joint.REVOLUTE
for revolute joints.velocities (
list
offloat
, optional) – Velocity of each joint.accelerations (
list
offloat
, optional) – Acceleration of each joint.time_from_start (
Duration
, optional) – Duration of trajectory point counting from the start.
- Attributes
joint_values (
list
offloat
) – Joint values expressed in radians or meters, depending on the respective type.joint_types (
list
ofcompas.robots.Joint.TYPE
) – Joint types, e.g. alist
ofcompas.robots.Joint.REVOLUTE
for revolute joints.time_from_start (
Duration
) – Duration of trajectory point counting from the start.data (obj:dict) – The data representing the trajectory point.
Methods
Create a copy of this
JointTrajectoryPoint
.Get a new
JointTrajectoryPoint
with thisJointTrajectoryPoint
merged with anotherJointTrajectoryPoint
.Inherited Methods
Converts the instance to a string.
Raises an error if there is not a joint name for every value.
Returns
True
if the other Configuration's joint_values are within a certain range.Construct an object of this type from the provided data.
Construct an object from serialized data contained in a JSON file.
Construct an object from serialized data contained in a JSON string.
Construct a configuration from prismatic and revolute joint values.
Construct a configuration from revolute joint values in radians.
Generator over the differences to another Configuration's joint_values.
Returns the maximum difference to another Configuration's joint values.
Merge the configuration with another configuration in place along joint names.
Scales the joint positions of the current configuration.
Return a scaled copy of this configuration.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation.
Serialize the data representation of an object to a JSON file.
Serialize the data representation of an object to a JSON string.
Validate the object's data against its data schema.
Validate the object's data against its json schema.