|
CARLA
|
Euler angles of a rotation in CARLA's / Unreal's left-handed frame: x forward, y right, z up, degrees. More...
#include <Rotation.h>
Public Member Functions | |
| Vector3D | GetForwardVector () const |
| Vector3D | GetRightVector () const |
| Vector3D | GetUpVector () const |
| void | InverseRotateVector (Vector3D &in_point) const |
| MSGPACK_DEFINE_ARRAY (pitch, yaw, roll) | |
| Rotation | Normalize () const |
| operator FRotator () const | |
| bool | operator!= (const Rotation &rhs) const |
| Rotation | operator+ (const Rotation &rhs) const |
| Rotation & | operator+= (const Rotation &rhs) |
| Rotation | operator- (const Rotation &rhs) const |
| Rotation & | operator-= (const Rotation &rhs) |
| bool | operator== (const Rotation &rhs) const |
| Vector3D | RotateVector (const Vector3D &in_point) const |
| void | RotateVector (Vector3D &in_point) const |
| Rotation ()=default | |
| Rotation (const FRotator &rotator) | |
| constexpr | Rotation (float p, float y, float r) |
| constexpr RightHandedRotation | ToRightHanded () const |
| This rotation expressed in a right-handed, x-forward / y-**left** / z-up frame (ROS REP-103 "FLU"), as intrinsic Z-Y-X Euler angles under the right-hand rule. | |
Static Public Member Functions | |
| static constexpr Rotation | FromRightHanded (const RightHandedRotation &rhs) |
| Inverse of ToRightHanded(). | |
Public Attributes | |
| float | pitch = 0.0f |
| float | roll = 0.0f |
| float | yaw = 0.0f |
Euler angles of a rotation in CARLA's / Unreal's left-handed frame: x forward, y right, z up, degrees.
The three angles compose as R = Rz(+yaw) * Ry(-pitch) * Rx(-roll) with the standard (right-handed) elementary matrices, which is the same thing as saying:
This is CARLA 0.9.x's documented convention and it is what the engine builds from the same FRotator, verified against rendered camera frames on UE5.8. RotateVector, Transform::GetMatrix and Math::Get{Forward,Right,Up}Vector all live in this frame and must not be "corrected" towards a right-handed convention.
For ROS / REP-103 consumers convert explicitly at the boundary with ToRightHanded() / FromRightHanded(); see RightHandedRotation and Docs/coordinate_conventions.md.
Definition at line 45 of file Rotation.h.
|
default |
|
inlineconstexpr |
Definition at line 66 of file Rotation.h.
|
inline |
Definition at line 271 of file Rotation.h.
|
inlinestaticconstexpr |
Inverse of ToRightHanded().
The mapping is an involution, so the same three sign flips apply in both directions.
Definition at line 212 of file Rotation.h.
Referenced by TEST().
|
inline |
Definition at line 75 of file Rotation.h.
Referenced by URoadMap::SetPixelAt(), and AProceduralBuilding::UpdateTransformPositionToNextChunk().
|
inline |
Definition at line 79 of file Rotation.h.
Referenced by AProceduralBuilding::UpdateTransformPositionToNextSide().
|
inline |
Definition at line 83 of file Rotation.h.
Referenced by ACarlaGameModeBase::DebugShowSignals().
|
inline |
Definition at line 131 of file Rotation.h.
|
inline |
Definition at line 164 of file Rotation.h.
|
inline |
Definition at line 274 of file Rotation.h.
|
inline |
Definition at line 226 of file Rotation.h.
Definition at line 234 of file Rotation.h.
Definition at line 250 of file Rotation.h.
Definition at line 242 of file Rotation.h.
Definition at line 257 of file Rotation.h.
|
inline |
Definition at line 220 of file Rotation.h.
|
inline |
Definition at line 125 of file Rotation.h.
|
inline |
Definition at line 87 of file Rotation.h.
|
inlineconstexpr |
This rotation expressed in a right-handed, x-forward / y-**left** / z-up frame (ROS REP-103 "FLU"), as intrinsic Z-Y-X Euler angles under the right-hand rule.
Mirroring the Y axis maps Rz(+yaw) * Ry(-pitch) * Rx(-roll) onto Rz(-yaw) * Ry(+(-pitch)) * Rx(+roll), so pitch and yaw flip sign and roll does not. Example: Rotation(pitch=20, yaw=30, roll=10) becomes RightHandedRotation(roll=10, pitch=-20, yaw=-30).
Definition at line 206 of file Rotation.h.
| float carla::geom::Rotation::pitch = 0.0f |
Definition at line 52 of file Rotation.h.
| float carla::geom::Rotation::roll = 0.0f |
Definition at line 56 of file Rotation.h.
| float carla::geom::Rotation::yaw = 0.0f |
Definition at line 54 of file Rotation.h.