Package org.robwork.sdurw_math
Class RPY
- java.lang.Object
-
- org.robwork.sdurw_math.Rotation3DVector
-
- org.robwork.sdurw_math.RPY
-
public class RPY extends Rotation3DVector
A class for representing Roll-Pitch-Yaw Euler angle rotations.
-
-
Constructor Summary
Constructors Constructor Description RPY()
Constructs rotation in which all elements are initialized to 0RPY(double roll, double pitch, double yaw)
Constructs an initialized roll-pitch-yaw euler angle vectorRPY(long cPtr, boolean cMemoryOwn)
RPY(Rotation3D 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)))
RPY(Rotation3D R, double 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 void
delete()
boolean
equals(RPY rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true only if all elements are equal.
double
get(long i)
static long
getCPtr(RPY obj)
boolean
notEqual(RPY rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true if any of the elements are different.
void
set(long i, double d)
long
size()
size of this RPY.Rotation3D
toRotation3D()
Returns the corresponding 3\times 3 Rotation matrixjava.lang.String
toString()
-
Methods inherited from class org.robwork.sdurw_math.Rotation3DVector
getCPtr
-
-
-
-
Constructor Detail
-
RPY
public RPY(long cPtr, boolean cMemoryOwn)
-
RPY
public RPY()
Constructs rotation in which all elements are initialized to 0
-
RPY
public RPY(double roll, double pitch, double yaw)
Constructs an initialized roll-pitch-yaw euler angle vector- Parameters:
roll
- Rotation around zpitch
- Rotation around yyaw
- Rotation around x
-
RPY
public RPY(Rotation3D R, double 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.
-
RPY
public RPY(Rotation3D 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(RPY obj)
-
delete
public void delete()
- Overrides:
delete
in classRotation3DVector
-
toRotation3D
public Rotation3D toRotation3D()
Description copied from class:Rotation3DVector
Returns the corresponding 3\times 3 Rotation matrix- Overrides:
toRotation3D
in classRotation3DVector
- Returns:
- The rotation matrix
-
get
public double get(long i)
-
set
public void set(long i, double d)
-
equals
public boolean equals(RPY 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(RPY 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:
toString
in classjava.lang.Object
-
-