JointConstraint

class compas_fab.robots.JointConstraint(joint_name, value, tolerance=0.0, weight=1.0)[source]

Bases: compas_fab.robots.constraints.Constraint

Constrains the value of a joint to be within a certain bound.

joint_name

The name of the joint this contraint refers to.

Type

string

value

The targeted value for that joint.

Type

float

tolerance

The bound to be achieved is [value - tolerance, value + tolerance]

Type

float

weight

A weighting factor for this constraint. Denotes relative importance to other constraints. Closer to zero means less important. Defaults to 1.

Type

float, optional

Examples

>>> from compas_fab.robots import JointConstraint
>>> jc = JointConstraint("joint_0", 1.4, 0.1)

Methods

__init__(joint_name, value[, tolerance, weight])

Initialize self.

copy()

scale(scale_factor)

transform(transformation)

Attributes

JOINT

ORIENTATION

POSITION

possible_types

__init__(joint_name, value, tolerance=0.0, weight=1.0)[source]

Initialize self. See help(type(self)) for accurate signature.