7#ifndef _GEOMETRY_POSE_HPP_
8#define _GEOMETRY_POSE_HPP_
25 Pose(
double ix,
double iy,
double iyaw) :
x(ix),
y(iy),
yaw(iyaw) {}
37 return std::sqrt((
x - other.
x) * (
x - other.
x) +
38 (
y - other.
y) * (
y - other.
y));
47 return "Pose: {x: " + std::to_string(
x) +
", y: " + std::to_string(
y) +
48 ", yaw: " + std::to_string(
yaw) +
"}";
52 return std::to_string(
x) +
"," + std::to_string(
y) +
"," +
bool operator==(const Pose &other) const
std::string to_csv() const
double dist(const Pose &other) const
Calculates the Euclidean distance between this pose and another.
Pose(double ix, double iy, double iyaw)
Specifies a point and heading in 2D space.
std::string to_string() const
Serializes the Pose data for debugging.
Copyright 2020 Jonathan Bayless.
bool nearly_equal(const double &a, const double &b, double epsilon=1e-5)