Go to the documentation of this file.
16 #include "PB_Pose.hpp"
17 #include "trigonometry.h"
21 namespace cogip_defs {
34 explicit Pose(
const PB_Pose &pose) :
Coords(pose.get_x(), pose.get_y()),
O_(pose.get_O()) {};
45 double O(
void)
const {
return O_; };
56 )
const {
return x_ == other.
x_ &&
y_ == other.
y_ &&
O_ == other.
O_; };
68 double error_x =
x_ - p.
x();
69 double error_y =
y_ - p.
y();
71 double error_O = limit_angle_rad(atan2(error_y, error_x) - DEG2RAD(p.
O()));
74 sqrt(square(error_x) + square(error_y)),
Pose(double x=0.0, double y=0.0, double O=0.0)
Constructor.
bool operator==(const Pose other) const
Check if this pose is equal to another.
Pose(const PB_Pose &pose)
Constructor from Protobuf class.
double y(void) const
Return Y coordinate.
void set_coords(const Coords &coords)
Set coordinates.
Differential drive controller.
void set_O(double O)
Set 0-orientation.
Coords(double x=0.0, double y=0.0)
Constructor.
double O(void) const
Return 0-orientation.
Absolute coordinates along X and Y axis.
Coords coords(void) const
Return coordinates.
void pb_copy(PB_Pose &pose) const
Copy data to Protobuf message.
double x(void) const
Return X coordinate.