com.kuka.roboticsAPI.deviceModel
Class JointPosition

java.lang.Object
  extended by com.kuka.roboticsAPI.deviceModel.JointPosition

public final class JointPosition
extends Object

Defines a joint position with arbitrary joint values in radians.


Constructor Summary
JointPosition(double... values)
          Creates a new joint position with the given values in radians.
JointPosition(int jointCount)
          Creates a new joint position with the given joint count.
JointPosition(JointPosition other)
          Creates a new joint position as a copy of the given joint position.
 
Method Summary
 boolean equals(Object obj)
           
 double[] get()
          Gets a joint values as a new double array with values in radians.
 double get(int index)
          Gets a position value in radians of the axis with the specified (zero-based) index.
 double get(com.kuka.roboticsAPI.deviceModel.JointEnum joint)
          Gets the position value for a specific joint in radians.
 int getAxisCount()
          Gets the axis count.
 double[] getInternalArray()
          Gets the reference to the backing double array containing the real values of the class in radians.
 int hashCode()
           
 boolean isNearlyEqual(JointPosition other)
          Returns true if the two joint positions are nearly equal.
 boolean isNearlyEqual(JointPosition other, double epsilon)
          Returns true if the two joint positions are nearly equal.
 void set(double... values)
          Sets all values of the vector to the defined values in radians.
 void set(int index, double value)
          Sets a value to a specified new value in radians.
 void set(JointPosition otherValue)
          Sets all values of the vector to the defined value in radians of the other vector.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JointPosition

public JointPosition(double... values)
Creates a new joint position with the given values in radians.

Parameters:
values - The values for the joint position in radians.

JointPosition

public JointPosition(JointPosition other)
Creates a new joint position as a copy of the given joint position.

Parameters:
other - The other joint position.

JointPosition

public JointPosition(int jointCount)
Creates a new joint position with the given joint count.

Parameters:
jointCount - The joint count. Must not be negative.
Method Detail

getAxisCount

public int getAxisCount()
Gets the axis count.

Returns:
The axis count.

get

public double[] get()
Gets a joint values as a new double array with values in radians.

Returns:
New double array with joint angles in radians.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getInternalArray

public double[] getInternalArray()
Gets the reference to the backing double array containing the real values of the class in radians.

Note. Please use with caution!!!

Main Usage is currently: Side-Effect for the "RegisterForReturnValue" "SPR Update" "DFE" Functionality

Returns:
The reference to the backing double array containing the real values of the class in radians.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

get

public double get(com.kuka.roboticsAPI.deviceModel.JointEnum joint)
Gets the position value for a specific joint in radians.

Parameters:
joint - The joint for which to query the position value.
Returns:
The value in radians at the specified index.

get

public double get(int index)
Gets a position value in radians of the axis with the specified (zero-based) index.

Parameters:
index - The index (must be a valid axis index).
Returns:
The value in radians at the specified index.

set

public void set(int index,
                double value)
Sets a value to a specified new value in radians.

Parameters:
index - The index.
value - The new value.

set

public void set(double... values)
Sets all values of the vector to the defined values in radians. Will make a deep copy.

Parameters:
values - The new values in radians. Must have the same length as the old values.

set

public void set(JointPosition otherValue)
Sets all values of the vector to the defined value in radians of the other vector. Will make a deep copy.

Parameters:
otherValue - The new value in radians. Must have the same length as the old values.

isNearlyEqual

public boolean isNearlyEqual(JointPosition other)
Returns true if the two joint positions are nearly equal. Every joint value is compared to the respective joint value of the other object with respect to some small epsilon.

Parameters:
other - the other joint values to compare to this one.
Returns:
true, if nearly equal
This element is not in its final state and might change in future versions.

isNearlyEqual

public boolean isNearlyEqual(JointPosition other,
                             double epsilon)
Returns true if the two joint positions are nearly equal. Every joint value is compared to the respective joint value of the other object with respect to some small given epsilon.

Parameters:
other - the other joint values to compare to this one.
epsilon - Epsilon value.
Returns:
True, if nearly equal.
This element is not in its final state and might change in future versions.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2019. All rights reserved.