com.kuka.nav
Class NavUtil

java.lang.Object
  extended by com.kuka.nav.NavUtil

public final class NavUtil
extends Object

Utility class with some navigation-system related helper methods.


Method Summary
static Position getClosestPointOnSegment(Position start, Position end, Position position)
          Computes the position on the segment defined by the given start and end positions which is closest to the given position.
static double normalizeAngle(double angle)
          Normalizes the given angle to a value in the range [-π; +π].
static double normalizeAngle(double angle, double center)
          Normalizes the given angle into an interval of size 2*π around the angle center.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

normalizeAngle

public static double normalizeAngle(double angle)
Normalizes the given angle to a value in the range [-π; +π].

Parameters:
angle - the angle to normalize in [rad]
Returns:
the normalized angle in [rad]

normalizeAngle

public static double normalizeAngle(double angle,
                                    double center)
Normalizes the given angle into an interval of size 2*π around the angle center. That is, the result is from the interval [ center - π; center + π].

Parameters:
angle - the angle to wrap in [rad]
center - the center angle in [rad]
Returns:
the wrapped angle in [rad]

getClosestPointOnSegment

public static Position getClosestPointOnSegment(Position start,
                                                Position end,
                                                Position position)
Computes the position on the segment defined by the given start and end positions which is closest to the given position.

Parameters:
start - the start position of the segment
end - the end position of the segment
position - the position for which the closest point is to be computed
Returns:
the position on the segment from start to end which is closest to the given position.


Copyright © 2019. All rights reserved.