Go to the documentation of this file.
14 #include "PB_Coords.hpp"
18 namespace cogip_defs {
30 explicit Coords(
const PB_Coords &coords) :
x_(coords.get_x()),
y_(coords.get_y()) {};
33 double x(
void)
const {
return x_; };
36 double y(
void)
const {
return y_; };
64 )
const {
return x_ == other.
x_ &&
y_ == other.
y_; };
void set_x(double x)
Set X coordinate.
double y(void) const
Return Y coordinate.
Coords(const PB_Coords &coords)
Constructor from Protobuf class.
Differential drive controller.
bool operator==(const Coords other) const
Check if this point is equal to another.
double distance(const Coords &dest) const
Compute the distance the destination point.
void pb_copy(PB_Coords &coords) const
Copy data to Protobuf message.
Coords(double x=0.0, double y=0.0)
Constructor.
bool on_segment(const Coords &a, const Coords &b) const
Check if this point is placed on a segment defined by two points A,B.
Absolute coordinates along X and Y axis.
void set_y(double y)
Set Y coordinate.
double x(void) const
Return X coordinate.