RIT VEXU Core API
Toggle main menu visibility
Loading...
Searching...
No Matches
pose2d.h
1
#pragma once
2
#undef __ARM_NEON__
3
#undef __ARM_NEON
4
#include <Eigen/Dense>
5
6
#include <cmath>
7
#include <iostream>
8
#include <vector>
9
10
#include "core/utils/math/geometry/rotation2d.h"
11
#include "core/utils/math/geometry/transform2d.h"
12
#include "core/utils/math/geometry/translation2d.h"
13
#include "core/utils/math/geometry/twist2d.h"
14
24
class
Pose2d
{
25
public
:
27
constexpr
Pose2d
() : m_translation(
Translation2d
()), m_rotation(
Rotation2d
()) {}
28
35
Pose2d
(
const
Translation2d
&
translation
,
const
Rotation2d
&
rotation
);
36
44
Pose2d
(
const
double
&x,
const
double
&y,
const
Rotation2d
&
rotation
);
45
53
Pose2d
(
const
double
&x,
const
double
&y,
const
double
&radians);
54
61
Pose2d
(
const
Translation2d
&
translation
,
const
double
&radians);
62
68
Pose2d
(
const
Eigen::Vector3d &pose_vector);
69
75
Translation2d
translation
()
const
;
76
82
double
x
()
const
;
83
89
double
y
()
const
;
90
96
Rotation2d
rotation
()
const
;
97
99
void
setRotationRad
(
double
rotRad);
100
102
void
setRotationDeg
(
double
rotDeg);
103
111
bool
operator==
(
const
Pose2d
other)
const
;
112
119
Pose2d
operator*
(
const
double
&scalar)
const
;
120
127
Pose2d
operator/
(
const
double
&scalar)
const
;
128
135
Pose2d
operator+
(
const
Transform2d
&transform)
const
;
136
142
Transform2d
operator-
(
const
Pose2d
&other)
const
;
143
151
friend
std::ostream &
operator<<
(std::ostream &os,
const
Pose2d
&pose);
152
160
Pose2d
relative_to
(
const
Pose2d
&other)
const
;
161
170
Pose2d
transform_by
(
const
Transform2d
&transform)
const
;
171
189
Pose2d
exp
(
const
Twist2d
&twist)
const
;
190
202
Twist2d
log
(
const
Pose2d
&end_pose)
const
;
203
204
private
:
205
Translation2d
m_translation;
206
Rotation2d
m_rotation;
207
};
208
216
Pose2d
wrapped_mean(
const
std::vector<Pose2d> &list);
Pose2d
Definition
pose2d.h:24
Pose2d::relative_to
Pose2d relative_to(const Pose2d &other) const
Definition
pose2d.cpp:156
Pose2d::translation
Translation2d translation() const
Definition
pose2d.cpp:62
Pose2d::log
Twist2d log(const Pose2d &end_pose) const
Definition
pose2d.cpp:223
Pose2d::operator*
Pose2d operator*(const double &scalar) const
Definition
pose2d.cpp:106
Pose2d::x
double x() const
Definition
pose2d.cpp:69
Pose2d::operator==
bool operator==(const Pose2d other) const
Definition
pose2d.cpp:96
Pose2d::operator<<
friend std::ostream & operator<<(std::ostream &os, const Pose2d &pose)
Definition
pose2d.cpp:143
Pose2d::operator+
Pose2d operator+(const Transform2d &transform) const
Definition
pose2d.cpp:122
Pose2d::operator/
Pose2d operator/(const double &scalar) const
Definition
pose2d.cpp:114
Pose2d::rotation
Rotation2d rotation() const
Definition
pose2d.cpp:83
Pose2d::setRotationRad
void setRotationRad(double rotRad)
sets the ration value of the rotational component in Radians
Definition
pose2d.cpp:85
Pose2d::setRotationDeg
void setRotationDeg(double rotDeg)
sets the ration value of the rotational component in Degrees
Definition
pose2d.cpp:87
Pose2d::transform_by
Pose2d transform_by(const Transform2d &transform) const
Definition
pose2d.cpp:169
Pose2d::operator-
Transform2d operator-(const Pose2d &other) const
Definition
pose2d.cpp:131
Pose2d::exp
Pose2d exp(const Twist2d &twist) const
Definition
pose2d.cpp:190
Pose2d::Pose2d
constexpr Pose2d()
Default Constructor for Pose2d.
Definition
pose2d.h:27
Pose2d::y
double y() const
Definition
pose2d.cpp:76
Rotation2d
Definition
rotation2d.h:26
Transform2d
Definition
transform2d.h:22
Translation2d
Definition
translation2d.h:21
Twist2d
Definition
twist2d.h:18
include
core
utils
math
geometry
pose2d.h
Generated by
1.17.0