Package org.robwork.sdurw_math
Class RPYd
- java.lang.Object
-
- org.robwork.sdurw_math.Rotation3DVectord
-
- org.robwork.sdurw_math.RPYd
-
public class RPYd extends Rotation3DVectord
A class for representing Roll-Pitch-Yaw Euler angle rotations.
-
-
Constructor Summary
Constructors Constructor Description RPYd()Constructs rotation in which all elements are initialized to 0RPYd(double roll, double pitch, double yaw)Constructs an initialized roll-pitch-yaw euler angle vectorRPYd(long cPtr, boolean cMemoryOwn)RPYd(Rotation3Dd 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)))
RPYd(Rotation3Dd 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 voiddelete()booleanequals(RPYd rhs)Comparison operator.
The comparison operator makes a element wise comparison.
Returns true only if all elements are equal.
doubleget(long i)static longgetCPtr(RPYd obj)booleannotEqual(RPYd rhs)Comparison operator.
The comparison operator makes a element wise comparison.
Returns true if any of the elements are different.
voidset(long i, double d)longsize()size of this RPY.Rotation3DdtoRotation3D()Returns the corresponding 3\times 3 Rotation matrix-
Methods inherited from class org.robwork.sdurw_math.Rotation3DVectord
getCPtr
-
-
-
-
Constructor Detail
-
RPYd
public RPYd(long cPtr, boolean cMemoryOwn)
-
RPYd
public RPYd()
Constructs rotation in which all elements are initialized to 0
-
RPYd
public RPYd(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
-
RPYd
public RPYd(Rotation3Dd 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.
-
RPYd
public RPYd(Rotation3Dd 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(RPYd obj)
-
delete
public void delete()
- Overrides:
deletein classRotation3DVectord
-
toRotation3D
public Rotation3Dd toRotation3D()
Description copied from class:Rotation3DVectordReturns the corresponding 3\times 3 Rotation matrix- Overrides:
toRotation3Din classRotation3DVectord- Returns:
- The rotation matrix
-
get
public double get(long i)
-
set
public void set(long i, double d)
-
equals
public boolean equals(RPYd 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(RPYd 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
-
-