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 of float, optional) – Joint values expressed in radians or meters, depending on the respective type.

  • joint_types (list of compas.robots.Joint.TYPE, optional) – Joint types, e.g. a list of compas.robots.Joint.REVOLUTE for revolute joints.

  • velocities (list of float, optional) – Velocity of each joint.

  • accelerations (list of float, optional) – Acceleration of each joint.

  • effort (list of float, optional) – Effort of each joint.

  • time_from_start (Duration, optional) – Duration of trajectory point counting from the start.

Attributes
  • joint_values (list of float) – Joint values expressed in radians or meters, depending on the respective type.

  • joint_types (list of compas.robots.Joint.TYPE) – Joint types, e.g. a list of compas.robots.Joint.REVOLUTE for revolute joints.

  • velocities (list of float) – Velocity of each joint.

  • accelerations (list of float) – Acceleration of each joint.

  • effort (list of float) – Effort of each joint.

  • time_from_start (Duration) – Duration of trajectory point counting from the start.

  • positions (list of float) – Alias of joint_values.

  • data (obj:dict) – The data representing the trajectory point.

Methods

copy

Create a copy of this JointTrajectoryPoint.

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.

from_data

Construct an object of this type from the provided data.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in 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_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.

values