Wrench

class compas_fab.robots.Wrench[source]

Bases: Data

A wrench represents force in free space, separated into its linear (force) and angular (torque) parts.

Examples

>>> from compas.geometry import Vector
>>> w = Wrench([1, 2, 3], [0.1, 0.2, 0.3])
>>> w = Wrench(Vector(1, 2, 3), Vector(0.1, 0.2, 0.3))
Attributes:
forceVector

[Fx, Fy, Fz] force vector in Newtons

torqueVector

[Tx, Ty, Tz] moments vector in Newton-meters

Methods

by_samples

Construct the wrench by sampled data, allowing to filter.

copy

Make a copy of this Wrench.

from_list

Construct a wrench from a list of 6 float values.

gravity_compensated

Removes the force and torque in effect of gravity from the wrench.

transform

Transforms a Wrench with the transformation.

transformed

Returns a transformed copy of the Wrench.

Inherited Methods

ToString

Converts the instance to a string.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

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.