JointTrajectoryPoint
-
class
compas_fab.robots.JointTrajectoryPoint(values=None, types=None, velocities=None, accelerations=None, effort=None, time_from_start=None)[source] Bases:
compas_fab.robots.configuration.ConfigurationDefines a point within a trajectory.
A trajectory point is a sub-class of
Configurationextended with acceleration, effort and time from start information.Trajectory points are defined either as values + velocities and accelerations, or as values + efforts.
- Parameters
values (
listoffloat, optional) – Joint values expressed in radians or meters, depending on the respective type.types (
listofcompas.robots.Joint.TYPE, optional) – Joint types, e.g. alistofcompas.robots.Joint.REVOLUTEfor revolute joints.velocities (
listoffloat, optional) – Velocity of each joint.accelerations (
listoffloat, optional) – Acceleration of each joint.time_from_start (
Duration, optional) – Duration of trajectory point counting from the start.
- Attributes
values (
listoffloat) – Joint values expressed in radians or meters, depending on the respective type.types (
listofcompas.robots.Joint.TYPE) – Joint types, e.g. alistofcompas.robots.Joint.REVOLUTEfor revolute joints.time_from_start (
Duration) – Duration of trajectory point counting from the start.data (obj:dict) – The data representing the trajectory point.
Methods
__init__([values, types, velocities, …])Initialize self.
Raises an error if there is not a joint name for every value.
close_to(other[, tol])Returns
Trueif the other Configuration’s values are within a certain range.copy()Create a copy of this
JointTrajectoryPoint.from_data(data)Construct a configuration from its data representation.
Construct a configuration from prismatic and revolute joint values.
from_revolute_values(values[, joint_names])Construct a configuration from revolute joint values in radians.
iter_differences(other)Generator over the differences to another Configuration’s values.
max_difference(other)Returns the maximum difference to another Configuration’s values.
merge(other)Merge the
JointTrajectoryPointwith anotherJointTrajectoryPointin place along joint names.merged(other)Get a new
JointTrajectoryPointwith thisJointTrajectoryPointmerged with anotherJointTrajectoryPoint.scale(scale_factor)Scales the joint positions of the current configuration.
scaled(scale_factor)Return a scaled copy of this configuration.
to_data()Get the data dictionary that represents the configuration.
Attributes
acceleration_dictA dictionary of joint accelerations by joint name.
accelerationsAcceleration of each joint.
dataThe data representing the trajectory point.
effortEffort of each joint.
effort_dictA dictionary of joint efforts by joint name.
has_joint_namesReturns
Truewhen there is a joint name for every value.joint_dictA dictionary of joint values by joint name.
positionsAlias of values.
prismatic_valuesPrismatic joint values in meters.
revolute_valuesRevolute joint values in radians.
type_dictA dictionary of joint types by joint name.
velocitiesVelocity of each joint.
velocity_dictA dictionary of joint velocities by joint name.