GAMS
1.2.2
|
#include <Pose.h>
Public Types | |
typedef BasicPose | BaseType |
using | derived_type = typename Framed< BasicPose< StampedPose > >::derived_type |
using | units_type = units::absolute< units::length > |
using | units_type = units::absolute< units::plane_angle > |
Public Member Functions | |
bool | approximately_equal (const Framed< Base2 > &other, double epsilon) const |
Tests if this Coordinate is within epsilon in distance (as defined by this Coordinate's reference frame's distance metric). More... | |
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 frame's distance metric). More... | |
PositionVector & | as_location_vec () |
const PositionVector & | as_location_vec () const |
OrientationVector & | as_orientation_vec () |
Gets a reference to this object's Orientation part. More... | |
const OrientationVector & | as_orientation_vec () const |
Gets a const reference to this object's Orientation part. More... | |
PositionVector & | as_position_vec () |
Gets a reference to this object's Position part. More... | |
const PositionVector & | as_position_vec () const |
Gets a const reference to this object's Position part. More... | |
BaseType & | as_vec () |
Gets a reference to this object. More... | |
const BaseType & | as_vec () const |
Gets a const reference to this object. More... | |
PositionVector | cross (const BasicVector< Other, units::absolute< units::length > > &other) const |
Passthrough to Eigen vector cross method. More... | |
OrientationVector | cross (const BasicVector< Other, units::absolute< units::plane_angle > > &other) const |
Passthrough to Eigen vector cross method. More... | |
double | distance_to (const derived_type &target) const |
Calculate distance from this Coordinate to a target. More... | |
double | distance_to (const BasicPose< Derived2 > &target) const |
double | dot (const BasicVector< Other, units::absolute< units::plane_angle > > &other) const |
Passthrough to Eigen vector dot method. More... | |
double | dot (const BasicVector< Other, units::absolute< units::length > > &other) const |
Passthrough to Eigen vector dot method. More... | |
const ReferenceFrame & | frame () const |
Getter for the ReferenceFrame this Coordinate belongs to. More... | |
ReferenceFrame | frame (ReferenceFrame new_frame) |
Setter for the ReferenceFrame this Coordinate belongs to. More... | |
void | from_array (const ContainType &in) |
Overwrites this Coordinate's values with those pulled from the referenced array. More... | |
void | from_array (const ContainType &in) |
Overwrites this Coordinate's values with those pulled from the referenced array. More... | |
void | from_container (const madara::knowledge::containers::NativeDoubleVector &container) |
Imports the pose from a MADARA container. More... | |
void | from_container (const std::vector< double > &container) |
Imports the pose from a STL vector container. More... | |
double | get (int i) const |
Retrives i'th coordinate, 0-indexed, in order x, y, z, rx, ry, rz. More... | |
double | get (size_t i) const |
Get i'th value in this Coordinate. More... | |
double | get (size_t i) const |
Get i'th value in this Coordinate. More... | |
bool | is_location_set () const |
bool | is_location_zero () const |
bool | is_orientation_set () const |
Tests if the orientation/orientation has been set. More... | |
bool | is_orientation_zero () const |
Tests if all orientation information is zero. More... | |
bool | is_position_set () const |
Tests if the position is set (valid). More... | |
bool | is_position_zero () const |
Tests if all position information is zero. More... | |
bool | is_set () const |
Tests if this Pose is invalid; i.e., any values are INVAL_COORD. More... | |
bool | is_zero () const |
Tests if all pose information is zero. More... | |
uint64_t | nanos () const |
Get time as nanos since std::steady_clock epoch. More... | |
uint64_t | nanos (uint64_t v) |
Set time as nanos since std::steady_clock epoch. More... | |
double | norm () const |
Passthrough to Eigen vector norm method. More... | |
double | norm () const |
Passthrough to Eigen vector norm method. More... | |
void | normalize () |
Reduces this Coordinate to it's normalized form, should one exist. More... | |
OrientationVector | normalized () const |
Passthrough to Eigen vector normalized method. More... | |
PositionVector | normalized () const |
Passthrough to Eigen vector normalized method. More... | |
operator BasicVector< Derived2, units::absolute< units::length >> () const | |
operator BasicVector< Derived2, units::absolute< units::plane_angle >> () const | |
bool | operator== (const BasicPose &rhs) const |
Tests for exact equality. More... | |
double | secs () const |
Get time as seconds since std::steady_clock epoch. More... | |
double | secs (double v) |
Set time as seconds since std::steady_clock epoch. More... | |
StampedPose & | self () |
const StampedPose & | self () const |
double | set (int i, double val) |
Sets i'th coordinate, 0-indexed, in order x, y, z, rx, ry, rz. More... | |
double | set (size_t i, double v) |
Set i'th value in this Coordinate. More... | |
double | set (size_t i, double v) |
Set i'th value in this Coordinate. More... | |
int | size () const |
Get the number of values this coordinate type uses. More... | |
double | squaredNorm () const |
Passthrough to Eigen vector squaredNorm method. More... | |
double | squaredNorm () const |
Passthrough to Eigen vector squaredNorm method. More... | |
TimeValue | time () const |
Get time as std::chrono based TimeValue. More... | |
TimeValue | time (TimeValue v) |
Set time from std::chrono based TimeValue. More... | |
void | to_array (ContainType &out) const |
Outputs this Coordinates values to the referenced container. More... | |
void | to_array (ContainType &out) const |
Outputs this Coordinates values to the referenced container. More... | |
void | to_container (madara::knowledge::containers::NativeDoubleVector &container) const |
Saves the pose to a MADARA container. More... | |
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. More... | |
void | transform_this_to (const ReferenceFrame &new_frame) |
Transform this coordinate, in place, to a new reference frame. More... | |
derived_type WARN_UNUSED | transform_to (const ReferenceFrame &new_frame) const |
Copy and transform this coordinate to a new reference frame. More... | |
Static Public Member Functions | |
static constexpr bool | fixed () |
Is this coordinate a fixed vector? More... | |
static constexpr bool | fixed () |
Is this coordinate a fixed vector? More... | |
static constexpr bool | free () |
Is this coordinate a free vector? More... | |
static constexpr bool | free () |
Is this coordinate a free vector? More... | |
static std::string | name () |
Get the name of this coordinate type. More... | |
static constexpr bool | positional () |
Is this coordinate a positional one? More... | |
static constexpr bool | positional () |
Is this coordinate a positional one? More... | |
static constexpr bool | rotational () |
Is this coordinate a rotational one? More... | |
static constexpr bool | rotational () |
Is this coordinate a rotational one? More... | |
Private Types | |
using | Base = Stamped< Framed< BasicPose< StampedPose >>> |
Private Member Functions | |
StampedPose ()=default | |
StampedPose (const Position &pos) | |
StampedPose (const StampedPosition &pos) | |
StampedPose (const Orientation &ori) | |
StampedPose (const StampedOrientation &ori) | |
StampedPose (const Position &pos, const Orientation &ori) | |
StampedPose (const StampedPosition &pos, const StampedOrientation &ori) | |
operator StampedOrientation () const | |
Castig operator to extract StampedOrientation from this Pose. More... | |
operator StampedPosition () const | |
Casting operator to extract StampedPosition from this Pose. More... | |
Static Private Attributes | |
static constexpr const char * | type_name = "StampedPose" |
|
private |
|
inherited |
|
inherited |
|
inherited |
Definition at line 534 of file Coordinate.h.
|
inherited |
Definition at line 534 of file Coordinate.h.
|
privatedefault |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineinherited |
Tests if this Coordinate is within epsilon in distance (as defined by this Coordinate's reference frame's distance metric).
If the other Coordinate is in a different reference frame, it is first copied, and converted to this Coordinate's reference frame.
other | the other Coordinate to test against |
epsilon | the maximum distance permitted to return true |
|
inlineinherited |
Tests if this Coordinate is within epsilon in distance (as defined by this Coordinate's reference frame's distance metric).
If the other Coordinate is in a different reference frame, it is first copied, and converted to this Coordinate's reference frame.
other | the other Coordinate to test against |
epsilon | the maximum distance permitted to return true |
|
inherited |
|
inherited |
|
inherited |
Gets a reference to this object's Orientation part.
|
inherited |
Gets a const reference to this object's Orientation part.
|
inherited |
Gets a reference to this object's Position part.
|
inherited |
Gets a const reference to this object's Position part.
|
inherited |
Gets a reference to this object.
Useful for derived types.
|
inherited |
Gets a const reference to this object.
Useful for derived types.
|
inlineinherited |
Passthrough to Eigen vector cross method.
Definition at line 704 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector cross method.
Definition at line 704 of file Coordinate.h.
|
inherited |
Calculate distance from this Coordinate to a target.
If the target is in another reference frame, this and the target will be copied, and converted to their closest common frame.
Requres "ReferenceFrame.h"
target | the target Coordinate to calculate distance to |
unrelated_frames | thrown if the target's reference frame is not part of the same tree as the current one. |
undefined_transform | thrown if no conversion between two frames along the conversion path has been defined. |
|
inlineinherited |
|
inlineinherited |
Passthrough to Eigen vector dot method.
Definition at line 695 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector dot method.
Definition at line 695 of file Coordinate.h.
|
inlinestaticinherited |
Is this coordinate a fixed vector?
Definition at line 552 of file Coordinate.h.
|
inlinestaticinherited |
Is this coordinate a fixed vector?
Definition at line 552 of file Coordinate.h.
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
Is this coordinate a free vector?
Definition at line 549 of file Coordinate.h.
|
inlinestaticinherited |
Is this coordinate a free vector?
Definition at line 549 of file Coordinate.h.
|
inlineinherited |
Overwrites this Coordinate's values with those pulled from the referenced array.
These values will be within this object's current reference frame. The container must support operator[],
If the array's size is smaller than the cardinality of this coordinate type, the behavior is undefined. If it is larger, the extra elements are ignored.
ContainType | the type of the container; must support operator[] |
in | the container to pull new values from. |
Definition at line 627 of file Coordinate.h.
|
inlineinherited |
Overwrites this Coordinate's values with those pulled from the referenced array.
These values will be within this object's current reference frame. The container must support operator[],
If the array's size is smaller than the cardinality of this coordinate type, the behavior is undefined. If it is larger, the extra elements are ignored.
ContainType | the type of the container; must support operator[] |
in | the container to pull new values from. |
Definition at line 627 of file Coordinate.h.
|
inherited |
Imports the pose from a MADARA container.
container | the container to import from |
|
inherited |
Imports the pose from a STL vector container.
container | the container to import from |
|
inherited |
Retrives i'th coordinate, 0-indexed, in order x, y, z, rx, ry, rz.
i | the index |
std::range_error | if index is less than 0, or greater than 6 |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inherited |
|
inherited |
Tests if the orientation/orientation has been set.
|
inherited |
Tests if all orientation information is zero.
|
inherited |
Tests if the position is set (valid).
|
inherited |
Tests if all position information is zero.
|
inherited |
Tests if this Pose is invalid; i.e., any values are INVAL_COORD.
|
inherited |
Tests if all pose information is zero.
If true, is_position_zero and is_orientation_zero are also true
|
staticinherited |
Get the name of this coordinate type.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Passthrough to Eigen vector norm method.
Definition at line 714 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector norm method.
Definition at line 714 of file Coordinate.h.
|
inherited |
Reduces this Coordinate to it's normalized form, should one exist.
Typically useful for Coordinate types which incorporate angles.
Requres "ReferenceFrame.h"
|
inlineinherited |
Passthrough to Eigen vector normalized method.
Definition at line 730 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector normalized method.
Definition at line 730 of file Coordinate.h.
|
inlineinherited |
|
inlineinherited |
|
inlineprivate |
Castig operator to extract StampedOrientation from this Pose.
|
inlineprivate |
Casting operator to extract StampedPosition from this Pose.
|
inherited |
Tests for exact equality.
rhs | the other pose to test against |
|
inlinestaticinherited |
Is this coordinate a positional one?
Definition at line 543 of file Coordinate.h.
|
inlinestaticinherited |
Is this coordinate a positional one?
Definition at line 543 of file Coordinate.h.
|
inlinestaticinherited |
Is this coordinate a rotational one?
Definition at line 546 of file Coordinate.h.
|
inlinestaticinherited |
Is this coordinate a rotational one?
Definition at line 546 of file Coordinate.h.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
Sets i'th coordinate, 0-indexed, in order x, y, z, rx, ry, rz.
i | the index |
val | the new value |
std::range_error | if index is less than 0, or greater than 6 |
|
inlineinherited |
Set i'th value in this Coordinate.
No range checking!
v | the value to set to |
Definition at line 568 of file Coordinate.h.
|
inlineinherited |
Set i'th value in this Coordinate.
No range checking!
v | the value to set to |
Definition at line 568 of file Coordinate.h.
|
inherited |
Get the number of values this coordinate type uses.
|
inlineinherited |
Passthrough to Eigen vector squaredNorm method.
Definition at line 722 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector squaredNorm method.
Definition at line 722 of file Coordinate.h.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Outputs this Coordinates values to the referenced container.
This container type must support operator[] for setting by index.
If the array's size is smaller than the cardinality of this coordinate type, the behavior is undefined. If it is larger, the extra elements are not changed.
The MADARA DoubleVector and NativeDoubleVector types are supported.
ContainType | the type of the container; must support "set" |
out | the container to put this Coordinate's values into. |
Definition at line 606 of file Coordinate.h.
|
inlineinherited |
Outputs this Coordinates values to the referenced container.
This container type must support operator[] for setting by index.
If the array's size is smaller than the cardinality of this coordinate type, the behavior is undefined. If it is larger, the extra elements are not changed.
The MADARA DoubleVector and NativeDoubleVector types are supported.
ContainType | the type of the container; must support "set" |
out | the container to put this Coordinate's values into. |
Definition at line 606 of file Coordinate.h.
|
inherited |
Saves the pose to a MADARA container.
container | the container to save to |
|
inherited |
Returns a string of the values x, y, z, rx, ry, rz.
delimiter | delimiter between values |
unset_identifier | if true, include unset values |
|
inherited |
Transform this coordinate, in place, to a new reference frame.
Requres "ReferenceFrame.h"
new_frame | the frame to transform to |
unrelated_frames | thrown if the new reference frame is not part of the same tree as the current one. |
undefined_transform | thrown if no conversion between two frames along the conversion path has been defined. |
|
inherited |
Copy and transform this coordinate to a new reference frame.
Requres "ReferenceFrame.h"
new_frame | the frame to transform to |
unrelated_frames | thrown if the new reference frame is not part of the same tree as the current one. |
undefined_transform | thrown if no conversion between two frames along the conversion path has been defined. |
|
staticprivate |