Package org.robwork.sdurw_math
Class RPYf
- java.lang.Object
-
- org.robwork.sdurw_math.Rotation3DVectorf
-
- org.robwork.sdurw_math.RPYf
-
public class RPYf extends Rotation3DVectorf
A class for representing Roll-Pitch-Yaw Euler angle rotations.
-
-
Constructor Summary
Constructors Constructor Description RPYf()Constructs rotation in which all elements are initialized to 0RPYf(float roll, float pitch, float yaw)Constructs an initialized roll-pitch-yaw euler angle vectorRPYf(long cPtr, boolean cMemoryOwn)RPYf(Rotation3Df R)Constructs an RPY object initialized according to the specified Rotation3D
\beta = arctan2(-r_{31},\sqrt{r_{11}^2+r_{21}^2})
\alpha = arctan2(r_{21}/cos(\beta), r_{11}/cos(\beta))
\beta = arctan2(r_{32}/cos(\beta), r_{33}/cos(\beta)))
RPYf(Rotation3Df R, float epsilon)Constructs an RPY object initialized according to the specified Rotation3D
\beta = arctan2(-r_{31},\sqrt{r_{11}^2+r_{21}^2})
\alpha = arctan2(r_{21}/cos(\beta), r_{11}/cos(\beta))
\beta = arctan2(r_{32}/cos(\beta), r_{33}/cos(\beta)))
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()booleanequals(RPYf rhs)Comparison operator.
The comparison operator makes a element wise comparison.
Returns true only if all elements are equal.
floatget(long i)static longgetCPtr(RPYf obj)booleannotEqual(RPYf rhs)Comparison operator.
The comparison operator makes a element wise comparison.
Returns true if any of the elements are different.
voidset(long i, float d)longsize()size of this RPY.Rotation3DftoRotation3D()Returns the corresponding 3\times 3 Rotation matrixjava.lang.StringtoString()-
Methods inherited from class org.robwork.sdurw_math.Rotation3DVectorf
getCPtr
-
-
-
-
Constructor Detail
-
RPYf
public RPYf(long cPtr, boolean cMemoryOwn)
-
RPYf
public RPYf()
Constructs rotation in which all elements are initialized to 0
-
RPYf
public RPYf(float roll, float pitch, float yaw)Constructs an initialized roll-pitch-yaw euler angle vector- Parameters:
roll- Rotation around zpitch- Rotation around yyaw- Rotation around x
-
RPYf
public RPYf(Rotation3Df R, float epsilon)
Constructs an RPY object initialized according to the specified Rotation3D
\beta = arctan2(-r_{31},\sqrt{r_{11}^2+r_{21}^2})
\alpha = arctan2(r_{21}/cos(\beta), r_{11}/cos(\beta))
\beta = arctan2(r_{32}/cos(\beta), r_{33}/cos(\beta)))
- Parameters:
R- [in] A 3x3 rotation matrix \mathbf{R}
epsilon- [in] Value specifying the value for which cos(\beta) is assumed 0 and the special case solution assuming
\alpha=0, \beta=\pi/2 and \gamma = arctan2(r_{21}, r_{22}) is
to be used.
-
RPYf
public RPYf(Rotation3Df R)
Constructs an RPY object initialized according to the specified Rotation3D
\beta = arctan2(-r_{31},\sqrt{r_{11}^2+r_{21}^2})
\alpha = arctan2(r_{21}/cos(\beta), r_{11}/cos(\beta))
\beta = arctan2(r_{32}/cos(\beta), r_{33}/cos(\beta)))
- Parameters:
R- [in] A 3x3 rotation matrix \mathbf{R}
-
-
Method Detail
-
getCPtr
public static long getCPtr(RPYf obj)
-
delete
public void delete()
- Overrides:
deletein classRotation3DVectorf
-
toRotation3D
public Rotation3Df toRotation3D()
Description copied from class:Rotation3DVectorfReturns the corresponding 3\times 3 Rotation matrix- Overrides:
toRotation3Din classRotation3DVectorf- Returns:
- The rotation matrix
-
get
public float get(long i)
-
set
public void set(long i, float d)
-
equals
public boolean equals(RPYf rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true only if all elements are equal.
- Parameters:
rhs- [in] RPY to compare with- Returns:
- True if equal.
-
notEqual
public boolean notEqual(RPYf rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true if any of the elements are different.
- Parameters:
rhs- [in] RPY to compare with- Returns:
- True if not equal.
-
size
public long size()
size of this RPY.- Returns:
- the value 3
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-