com.kuka.nav
Class Orientations

java.lang.Object
  extended by com.kuka.nav.Orientations
All Implemented Interfaces:
com.kuka.parameters.IParameter

public final class Orientations
extends Object
implements com.kuka.parameters.IParameter

This class holds a list of angular orientations. An orientations object always has at least one orientation. Negative orientations point to the right side (clockwise), positive orientations point to the left side (counter-clockwise).


Nested Class Summary
static class Orientations.ReferenceSystem
          The reference system for the orientations.
 
Field Summary
static Orientations ALIGN
          Indicates orientations forward, backward, left or right relative to a path.
static Orientations BACKWARD
          Indicates a single orientation in the direction backward on a path.
static Orientations CROSSWISE
          Indicates orientations left or right on a path.
static Orientations FORWARD
          Indicates a single orientation in the direction forward on a path.
static Orientations LEFT
          Indicates a single orientation facing 90 degrees left of the path.
static Orientations LENGTHWISE
          Indicates orientations forward or backward on a path.
static Orientations RIGHT
          Indicates a single orientation facing 90 degrees right of the path.
 
Method Summary
 com.kuka.parameters.IParameter copy()
           
 double getBestMatch(double refOrientation)
          Checks all allowed orientations and returns the closest match to the given reference orientation.
 Orientations.ReferenceSystem getReferenceSystem()
           
static Orientations map(Collection<Double> orientations)
          Creates a new set of orientations from the given orientation values using the map as reference system.
static Orientations map(double... orientations)
          Creates a new set of orientations from the given orientation values using the map as reference system.
 Orientations or(Orientations ori)
          Builds the union of two orientation sets.
static Orientations path(Collection<Double> orientations)
          Creates a new set of orientations from the given orientation values using the path as reference system.
static Orientations path(double... orientations)
          Creates a new set of orientations from the given orientation values using the path as reference system.
 Orientations relativeTo(Orientations.ReferenceSystem reference)
          Returns a copy of this set of orientations with a changed reference system.
 Set<Double> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORWARD

public static final Orientations FORWARD
Indicates a single orientation in the direction forward on a path.


BACKWARD

public static final Orientations BACKWARD
Indicates a single orientation in the direction backward on a path.


LENGTHWISE

public static final Orientations LENGTHWISE
Indicates orientations forward or backward on a path.


LEFT

public static final Orientations LEFT
Indicates a single orientation facing 90 degrees left of the path.


RIGHT

public static final Orientations RIGHT
Indicates a single orientation facing 90 degrees right of the path.


CROSSWISE

public static final Orientations CROSSWISE
Indicates orientations left or right on a path.


ALIGN

public static final Orientations ALIGN
Indicates orientations forward, backward, left or right relative to a path.

Method Detail

path

public static Orientations path(double... orientations)
Creates a new set of orientations from the given orientation values using the path as reference system. At least one value must be given.

Parameters:
orientations - a number of angular orientations in rad
Returns:
an object encapsulating the given orientations

path

public static Orientations path(Collection<Double> orientations)
Creates a new set of orientations from the given orientation values using the path as reference system. At least one value must be given.

Parameters:
orientations - a number of angular orientations in rad
Returns:
an object encapsulating the given orientations

map

public static Orientations map(double... orientations)
Creates a new set of orientations from the given orientation values using the map as reference system. At least one value must be given.

Parameters:
orientations - a number of angular orientations in rad
Returns:
an object encapsulating the given orientations

map

public static Orientations map(Collection<Double> orientations)
Creates a new set of orientations from the given orientation values using the map as reference system. At least one value must be given.

Parameters:
orientations - a number of angular orientations in rad
Returns:
an object encapsulating the given orientations

or

public Orientations or(Orientations ori)
Builds the union of two orientation sets.

Parameters:
ori - another orientations object
Returns:
a new object with all orientations of this object and the given object

values

public Set<Double> values()
Returns:
an unmodifiable view on the angular orientation values in rad

getReferenceSystem

public Orientations.ReferenceSystem getReferenceSystem()
Returns:
the reference system of the orientations

relativeTo

public Orientations relativeTo(Orientations.ReferenceSystem reference)
Returns a copy of this set of orientations with a changed reference system.

Parameters:
reference - the new reference system
Returns:
the same orientation values with the new reference system

getBestMatch

public double getBestMatch(double refOrientation)
Checks all allowed orientations and returns the closest match to the given reference orientation.

Parameters:
refOrientation - the orientation to compare against, must be in the same reference system
Returns:
the closest matching orientation

copy

public com.kuka.parameters.IParameter copy()
Specified by:
copy in interface com.kuka.parameters.IParameter


Copyright © 2019. All rights reserved.