|
1 | 1 | #pragma once |
2 | 2 | #include "RaidZeroLib/api/Geometry/Point.hpp" |
3 | | -#include "RaidZeroLib/api/Geometry/Transform.hpp" |
4 | | -#include "RaidZeroLib/api/Geometry/Twist.hpp" |
5 | | -#include "RaidZeroLib/api/Units/Units.hpp" |
6 | | -#include "okapi/api/odometry/odomState.hpp" |
| 3 | +#include "RaidZeroLib/api/Geometry/Rotation.hpp" |
| 4 | + |
| 5 | +namespace okapi { |
| 6 | +class OdomState; |
| 7 | +} // namespace okapi |
7 | 8 |
|
8 | 9 | namespace rz { |
9 | | -using namespace okapi; |
| 10 | + |
10 | 11 | class Transform; |
| 12 | +class Twist; |
11 | 13 |
|
12 | 14 | class Pose { |
13 | 15 | public: |
14 | | - constexpr Pose() = default; |
15 | | - |
16 | | - Pose(const Translation& iTranslation, const Rotation& iRotation); |
17 | | - |
18 | | - Pose(QLength iX, QLength iY, const Rotation& iRotation); |
19 | | - |
20 | | - Pose(const OdomState& iState); |
21 | | - |
22 | | - ~Pose() = default; |
23 | | - |
24 | | - const Translation& getTranslation() const; |
25 | | - |
26 | | - const Rotation& getRotation() const; |
| 16 | + constexpr Pose() noexcept = default; |
27 | 17 |
|
28 | | - QLength X() const; |
| 18 | + Pose(const Point& point, const Rotation& rotation) noexcept; |
29 | 19 |
|
30 | | - QLength Y() const; |
| 20 | + Pose(au::QuantityD<au::Meters> x, au::QuantityD<au::Meters> y, const Rotation& rotation) noexcept; |
31 | 21 |
|
32 | | - QAngle Theta() const; |
| 22 | + Pose(au::QuantityD<au::Meters> x, au::QuantityD<au::Meters> y, au::QuantityD<au::Radians> angle) noexcept; |
33 | 23 |
|
34 | | - Pose operator+(const Transform& rhs) const; |
| 24 | + Pose(const okapi::OdomState& state) noexcept; |
35 | 25 |
|
36 | | - Transform operator-(const Pose& rhs) const; |
| 26 | + const Point& getPoint() const noexcept; |
37 | 27 |
|
38 | | - Pose operator*(double scalar) const; |
| 28 | + const Rotation& getRotation() const noexcept; |
39 | 29 |
|
40 | | - Pose operator/(double scalar) const; |
| 30 | + au::QuantityD<au::Meters> X() const noexcept; |
41 | 31 |
|
42 | | - bool operator==(const Pose& rhs) const; |
| 32 | + au::QuantityD<au::Meters> Y() const noexcept; |
43 | 33 |
|
44 | | - bool operator!=(const Pose& rhs) const; |
| 34 | + au::QuantityD<au::Radians> Theta() const noexcept; |
45 | 35 |
|
46 | | - void operator=(const Pose& rhs); |
| 36 | + Pose transformBy(const Transform& rhs) const noexcept; |
47 | 37 |
|
48 | | - Pose transformBy(const Transform& rhs) const; |
| 38 | + Transform relativeTo(const Pose& rhs) const noexcept; |
49 | 39 |
|
50 | | - Pose relativeTo(const Pose& rhs) const; |
| 40 | + Pose exp(const Twist& rhs) const noexcept; |
51 | 41 |
|
52 | | - Pose exp(const Twist& rhs) const; |
| 42 | + Twist log(const Pose& rhs) const noexcept; |
53 | 43 |
|
54 | | - Twist log(const Pose& rhs) const; |
| 44 | + bool isApprox(const Pose& rhs) const noexcept; |
55 | 45 |
|
56 | 46 | private: |
57 | | - Translation translation; |
| 47 | + Point point; |
58 | 48 | Rotation rotation; |
59 | 49 | }; |
60 | 50 |
|
61 | | -QCurvature curvatureToPoint(const Pose& position, const Point& point); |
| 51 | +au::QuantityD<au::Inverse<au::Meters>> curvatureToPoint(const Pose& pose, const Point& point) noexcept; |
62 | 52 |
|
63 | 53 | } // namespace rz |
0 commit comments