56 #ifndef _GAMS_POSE_POSE_H_ 57 #define _GAMS_POSE_POSE_H_ 65 namespace gams {
namespace pose {
72 template<
typename Derived>
109 double rx,
double ry,
double rz);
141 Derived &
self() {
return static_cast<Derived&
>(*this); }
142 const Derived &
self()
const {
return static_cast<const Derived&
>(*this); }
144 template<
typename Derived2>
150 template<
typename Derived2>
162 const madara::knowledge::containers::DoubleVector &vec);
170 const madara::knowledge::containers::NativeDoubleVector &vec);
178 const madara::knowledge::containers::DoubleVector &vec_loc,
179 const madara::knowledge::containers::DoubleVector &vec_rot);
187 const madara::knowledge::containers::NativeDoubleVector &vec_loc,
188 const madara::knowledge::containers::NativeDoubleVector &vec_rot);
248 static std::string
name ();
264 double get (
int i)
const;
274 double set (
int i,
double val);
290 const BaseType &
as_vec ()
const;
332 template<
typename Derived2>
334 double epsilon)
const 336 (void)other;(void)epsilon;
337 throw "unimplemented";
342 template<
typename Derived2>
345 throw "unimplemented";
357 const std::string & delimiter =
", ",
358 const std::string & unset_identifier =
"<unset>")
const;
365 madara::knowledge::containers::NativeDoubleVector &container)
const;
372 const madara::knowledge::containers::NativeDoubleVector &container);
379 const std::vector <double> &container);
392 public Framed<BasicPose<Pose>>
426 double angle_to (
const Pose &target)
const;
442 template<
typename U>
double angle_to (
const Pose &target, U u)
const;
450 template<
typename U>
double angle_to (
const Orientation &target, U u)
const;
468 public Stamped<Framed<BasicPose<StampedPose>>>
493 :
Base(pos.time(), pos.frame(),
520 template<
typename Derived>
521 inline std::ostream &operator<<(std::ostream &o, const BasicPose<Derived> &pose)
523 o << Derived::type_name <<
"(";
PositionVector & as_position_vec()
Gets a reference to this object's Position part.
Internal class implementing coordinates stamped with timestamp.
Pose(const StampedPosition &pos, const StampedOrientation &ori)
bool is_position_zero() const
Tests if all position information is zero.
bool is_zero() const
Tests if all pose information is zero.
BasicPose(double x, double y)
Constructs a BasicPose from individual position values.
static constexpr const char * type_name
PositionVector & as_location_vec()
bool is_orientation_set() const
Tests if the orientation/orientation has been set.
BaseType & as_vec()
Gets a reference to this object.
void from_container(const madara::knowledge::containers::NativeDoubleVector &container)
Imports the pose from a MADARA container.
int size() const
Get the number of values this coordinate type uses.
Internal class implementing coordinates bound to reference frame.
StampedPose(const Orientation &ori)
bool is_position_set() const
Tests if the position is set (valid).
Pose(const Position &pos)
StampedPose(const Position &pos)
BasicPose(double x, double y, double z)
Constructs a BasicPose from individual position values.
BasicPose()
Default constructor.
bool is_location_set() const
std::string to_string(const std::string &delimiter=", ", const std::string &unset_identifier="<unset>") const
Returns a string of the values x, y, z, rx, ry, rz.
Pose(const StampedOrientation &ori)
bool is_location_zero() const
Pose(const StampedPosition &pos)
StampedPose(const Position &pos, const Orientation &ori)
OrientationVector & as_orientation_vec()
Gets a reference to this object's Orientation part.
Contains all GAMS-related tools, classes and code.
bool is_orientation_zero() const
Tests if all orientation information is zero.
gams::pose::Orientation Orientation
Represents a orientation or orientation within a reference frame.
Underlying template for all Pose types, including PoseVector, Pose, and StampedPose See PositionVecto...
For internal use. The underlying template for all coordinate types.
StampedPose(const StampedOrientation &ori)
Pose(const Position &pos, const Orientation &ori)
bool operator==(const BasicPose &rhs) const
Tests for exact equality.
bool approximately_equal(const BasicPose< Derived2 > &other, double epsilon) const
Tests if this Coordinate is within epsilon in distance (as defined by this Coordinate's reference fra...
double distance_to(const BasicPose< Derived2 > &target) const
static std::string name()
Get the name of this coordinate type.
bool is_set() const
Tests if this Pose is invalid; i.e., any values are INVAL_COORD.
StampedPose(const StampedPosition &pos, const StampedOrientation &ori)
gams::pose::Pose Pose
Represents a combination of Location and Orientation within a single reference frame.
void to_container(madara::knowledge::containers::NativeDoubleVector &container) const
Saves the pose to a MADARA container.
StampedPose(const StampedPosition &pos)
Pose(const Orientation &ori)