55 #ifndef _GAMS_POSE_EPSILON_H_
56 #define _GAMS_POSE_EPSILON_H_
65 namespace gams {
namespace pose {
103 double dist_ = 0.1, radians_ = M_PI/16;
119 : dist_(dist_tol), radians_(radians_tol) {}
129 template<
typename AngleUnits>
130 Epsilon(
double dist,
double angle, AngleUnits u)
131 : dist_(dist), radians_(u.to_radians(angle)) {}
142 return fabs(current.angle_to(target)) <= radians_;
A simple bounds checker which tests whether the current position is within the given number of meters...
Epsilon(double dist)
Use default value for angle tolerance.
Epsilon()
Use default values for position and angle tolerance.
bool check_orientation(const pose::Orientation ¤t, const pose::Orientation &target) const override
Override to return whether the current orientation is within the expected bounds of target.
bool check_position(const pose::Position ¤t, const pose::Position &target) const override
Override to return whether the current position is within the expected bounds of target.
Epsilon(double dist, double angle, AngleUnits u)
Use specified tolerances, with custom angle units.
Epsilon(double dist_tol, double radians_tol)
Use specified tolerances.
double distance_to(const derived_type &target) const
Calculate distance from this Coordinate to a target.
Interface for defining a bounds checker for Orientations.
virtual bool check_orientation(const pose::Orientation ¤t, const pose::Orientation &target) const =0
Override to return whether the current orientation is within the expected bounds of target.
virtual ~OrientationBounds()=default
Interface for defining a bounds checker for Poses, a combination of position and orientation checking...
Interface for defining a bounds checker for Positions.
virtual bool check_position(const pose::Position ¤t, const pose::Position &target) const =0
Override to return whether the current position is within the expected bounds of target.
virtual ~PositionBounds()=default
Contains all GAMS-related tools, classes and code.
Copyright (c) 2015 Carnegie Mellon University.
Copyright (c) 2015-2018 Carnegie Mellon University.