JointTrajectoryPoint

class compas_fab.robots.JointTrajectoryPoint[source]

Bases: Configuration

Defines a point within a trajectory.

A trajectory point is a sub-class of compas_robots.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_valueslist of float, optional

Joint values expressed in radians or meters, depending on the respective type.

joint_typeslist of compas_robots.Joint.TYPE, optional

Joint types, e.g. a list of compas_robots.Joint.REVOLUTE for revolute joints.

velocitieslist of float, optional

Velocity of each joint.

accelerationslist of float, optional

Acceleration of each joint.

effortlist of float, optional

Effort of each joint.

time_from_startDuration, optional

Duration of trajectory point counting from the start.

Attributes:
joint_valueslist of float

Joint values expressed in radians or meters, depending on the respective type.

joint_typeslist of compas_robots.Joint.TYPE

Joint joint_types, e.g.

velocitieslist of float

list of float : Velocity of each joint.

accelerationslist of float

list of float : Acceleration of each joint.

effortlist of float

list of float : Effort of each joint.

time_from_startDuration

Duration of trajectory point counting from the start.

positionslist of float

list of float : Alias of joint_values.

dataobj:dict

The data representing the trajectory point.

Methods

merged

Get a new JointTrajectoryPoint with this JointTrajectoryPoint merged with another JointTrajectoryPoint.

Inherited Methods

ToString

Converts the instance to a string.

check_joint_names

Raises an error if there is not a joint name for every value.

close_to

Returns True if the other Configuration's joint_values are within a certain range.

copy

Make an independent copy of the data object.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

from_prismatic_and_revolute_values

Construct a configuration from prismatic and revolute joint values.

from_revolute_values

Construct a configuration from revolute joint values in radians.

get

items

iter_differences

Generator over the differences to another Configuration's joint_values.

keys

max_difference

Returns the maximum difference to another Configuration's joint values.

merge

Merge the configuration with another configuration in place along joint names.

scale

Scales the joint positions of the current configuration.

scaled

Return a scaled copy of this configuration.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

validate_data

Validate the data against the object's data schema.

values