Skip to main content

Goals

There are a variety of different "goal" types that can be provided. Think of these as settings that you would like to achieve (e.g. a PositionMatch objective accepts a Translation goal).

Translation

A 3-vector representing coordinates that is used by the PositionMatch, PositionMirroring objectives.

let goal = {Translation:[1.0,0.0,0.5]}

Rotation

A Quaternion representing rotation that is used by the OrientationMatch, OrientationMirroring objectives.

let goal = {Rotation:[0.707,0.0,0.0,0.707]} // [x, y, z, w] ordering

Scalar

A float value that is used by the JointMatch, JointMirroring, DistanceMatch, JointLiveliness, and RelativeMotionLiveliness objectives.

let goal = {Scalar:0.5}

Size

A 3-vector representing scale of a 3D shape that is used by the PositionLiveliness, OrientationLiveliness, OriginPositionLiveliness objectives.

let goal = {Size:[1.0,0.1,0.5]}

Ellipse

A structure designating a rotated ellipsoid, with Translation, Rotation, and Size components. The ellipse goal is used by the PositionBounding objective.

let goal = {Ellipse: {
pose: {translation: [1.0,0.0,0.4], rotation: [0.707,0.0,0.0,0.707]}, // [x, y, z, w] ordering for quaternion
size: [0.1,0.1,0.2]}}

RotationRange

A structure including a center Rotation, as well as a float value indicating allowed delta in radians from that rotation. The RotationRange goal is used by the RotationBounding objective.

let goal = {RotationRange: {rotation: [0.707,0.0,0.0,0.707], // [x, y, z, w] ordering for quaternion
delta:0.4}}

ScalarRange

A structure including a center float value, and float value representing allowed delta from that value. The ScalarRange goal is used by the JointBounding objective.

let goal = {ScalarRange: {value:0.0,delta:0.4}}

Import

note

There is no need to import for Javascript.

from lively import Translation #Rotation, Scalar, Size, Ellipse, RotationRange, ScalarRange