com.kuka.nav
Class TupleSE2

java.lang.Object
  extended by com.kuka.nav.XYTheta
      extended by com.kuka.nav.TupleSE2
All Implemented Interfaces:
com.kuka.parameters.IParameter, Serializable
Direct Known Subclasses:
Pose

public class TupleSE2
extends XYTheta

Class to represent a tuple of 2-dimensional coordinates (x, y) together with a rotation component (theta).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.kuka.nav.XYTheta
_theta, _x, _y
 
Constructor Summary
TupleSE2()
          Constructs the tuple (0, 0, 0).
TupleSE2(double x, double y, double theta)
          Constructor.
TupleSE2(TupleSE2 other)
          Copy constructor.
TupleSE2(XYTheta obj)
          Constructs a tuple and sets its attribute to the attribute values of the given tuple.
 
Method Summary
 TupleSE2 invert()
          Interprets this TupleSE2 as a coordinate transformation, inverts it and returns the result.
static TupleSE2 min(TupleSE2 o1, TupleSE2 o2)
          Returns a tuple with minimum x, y and theta values from the two input tuples.
 TupleSE2 multiply(TupleSE2 other)
          'Multiplies' this tuple with the passed one, i.e. calculates the transformation of this TupleSE2 by applying the passed TupleSE2 to it.
 double norm()
          Returns the euclidean norm of the (x, y) component of this tuple.
 TupleSE2 substract(TupleSE2 other)
          Subtracts the passed TupleSE2 from this TupleSE2 by subtracting all three contained elements and returns the result.
 String toString()
           
 TupleSE2 withTheta(double newTheta)
          Returns a new TupleSE2 with a changed theta-coordinate.
 TupleSE2 withX(double newX)
          Returns a new TupleSE2 with a changed x-coordinate.
 TupleSE2 withY(double newY)
          Returns a new TupleSE2 with a changed y-coordinate.
 
Methods inherited from class com.kuka.nav.XYTheta
copy, equals, getTheta, getX, getY, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TupleSE2

public TupleSE2()
Constructs the tuple (0, 0, 0).


TupleSE2

public TupleSE2(XYTheta obj)
Constructs a tuple and sets its attribute to the attribute values of the given tuple.

Parameters:
obj - tuple whose attribute values are copied

TupleSE2

public TupleSE2(TupleSE2 other)
Copy constructor.

Parameters:
other - the tuple to copy

TupleSE2

public TupleSE2(double x,
                double y,
                double theta)
Constructor.

Parameters:
x - The x-coordinate.
y - The y-coordinate.
theta - The theta-coordinate.
Method Detail

withX

public TupleSE2 withX(double newX)
Description copied from class: XYTheta
Returns a new TupleSE2 with a changed x-coordinate.

Overrides:
withX in class XYTheta
Parameters:
newX - the new x coordinate
Returns:
a new object with the changed value

withY

public TupleSE2 withY(double newY)
Description copied from class: XYTheta
Returns a new TupleSE2 with a changed y-coordinate.

Overrides:
withY in class XYTheta
Parameters:
newY - the new y coordinate
Returns:
a new object with the changed value

withTheta

public TupleSE2 withTheta(double newTheta)
Description copied from class: XYTheta
Returns a new TupleSE2 with a changed theta-coordinate.

Overrides:
withTheta in class XYTheta
Parameters:
newTheta - the new theta coordinate
Returns:
a new object with the changed value

substract

public TupleSE2 substract(TupleSE2 other)
Subtracts the passed TupleSE2 from this TupleSE2 by subtracting all three contained elements and returns the result.

Parameters:
other - the tuple to substract from this tuple
Returns:
a new tuple representing the result of the subtraction

invert

public TupleSE2 invert()
Interprets this TupleSE2 as a coordinate transformation, inverts it and returns the result.

Returns:
the inverse of this TupleSE2

multiply

public TupleSE2 multiply(TupleSE2 other)
'Multiplies' this tuple with the passed one, i.e. calculates the transformation of this TupleSE2 by applying the passed TupleSE2 to it. This can be interpreted as a coordinate transformation, first performing a rotation, then a translation.

Parameters:
other - the tuple to 'multiply' with
Returns:
the resulting transformation

norm

public double norm()
Returns the euclidean norm of the (x, y) component of this tuple.

Returns:
the euclidean norm

min

public static TupleSE2 min(TupleSE2 o1,
                           TupleSE2 o2)
Returns a tuple with minimum x, y and theta values from the two input tuples.

Parameters:
o1 - input tuple
o2 - input tuple
Returns:
tuple with minimum values

toString

public String toString()
Overrides:
toString in class XYTheta


Copyright © 2019. All rights reserved.