Wrench

class compas_fab.robots.Wrench(force, torque)[source]

Bases: object

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

Attributes
  • force (Vector) – [Fx, Fy, Fz] force vector in Newtons

  • torque (Vector) – [Tx, Ty, Tz] moments vector in Newton-meters

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))

Methods

by_samples

Construct the wrench by sampled data, allowing to filter.

copy

Make a copy of this Wrench.

from_data

Construct a wrench from its data representation.

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.

to_data

Returns the data dictionary that represents the wrench.

transform

Transforms a Wrench with the transformation.

transformed

Returns a transformed copy of the Wrench.