GAMS
1.4.0
|
Underlying template for all Pose types, including PoseVector, Pose, and StampedPose See PositionVector and OrientationVector for representation deatils. More...
#include <Pose.h>
Public Types | |
using | Base = BasicVector< PositionVector, units::absolute< units::length > > |
using | Base = BasicVector< OrientationVector, units::absolute< units::plane_angle > > |
typedef BasicPose | BaseType |
using | derived_type = Derived |
using | units_type = units::absolute< units::plane_angle > |
using | units_type = units::absolute< units::length > |
Public Member Functions | |
BasicPose () | |
Default constructor. More... | |
BasicPose (const madara::knowledge::containers::DoubleVector &vec) | |
Constructor from MADARA DoubleVector. More... | |
BasicPose (const madara::knowledge::containers::DoubleVector &vec_loc, const madara::knowledge::containers::DoubleVector &vec_rot) | |
Constructor from two MADARA DoubleVectors, for position and orientation. More... | |
BasicPose (const madara::knowledge::containers::NativeDoubleVector &vec) | |
Constructor from MADARA NativeDoubleVector. More... | |
BasicPose (const madara::knowledge::containers::NativeDoubleVector &vec_loc, const madara::knowledge::containers::NativeDoubleVector &vec_rot) | |
Constructor from two MADARA NativeDoubleVector, for position/orientation. More... | |
BasicPose (const OrientationVector &rot) | |
Construct a BasicPose from a OrientationVector. More... | |
BasicPose (const PositionVector &pos) | |
Construct a BasicPose from a PositionVector. More... | |
BasicPose (const PositionVector &pos, const OrientationVector &rot) | |
Construct from individual PositionVector and OrientationVector. More... | |
BasicPose (double x, double y) | |
Constructs a BasicPose from individual position values. More... | |
BasicPose (double x, double y, double z) | |
Constructs a BasicPose from individual position values. More... | |
BasicPose (double x, double y, double z, double rx, double ry, double rz) | |
Constructs a BasicPose from individual position and orientation values. More... | |
template<typename Derived2 > | |
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... | |
template<typename Derived2 > | |
double | distance_to (const BasicPose< Derived2 > &target) const |
double | dot (const BasicVector< Other, units::absolute< units::length > > &other) const |
Passthrough to Eigen vector dot method. More... | |
double | dot (const BasicVector< Other, units::absolute< units::plane_angle > > &other) const |
Passthrough to Eigen vector dot method. 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... | |
double | norm () const |
Passthrough to Eigen vector norm method. More... | |
double | norm () const |
Passthrough to Eigen vector norm method. More... | |
PositionVector | normalized () const |
Passthrough to Eigen vector normalized method. More... | |
OrientationVector | normalized () const |
Passthrough to Eigen vector normalized method. More... | |
template<typename Derived2 > | |
operator BasicVector< Derived2, units::absolute< units::length >> () const | |
template<typename Derived2 > | |
operator BasicVector< Derived2, units::absolute< units::plane_angle >> () const | |
bool | operator== (const BasicPose &rhs) const |
Tests for exact equality. More... | |
Derived & | self () |
const Derived & | 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... | |
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... | |
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 | rotational () |
Is this coordinate a rotational one? More... | |
Static Public Attributes | |
static constexpr const char * | type_name = "Position" "Vector" |
static constexpr const char * | type_name = "Orientation" "Vector" |
Private Types | |
using | mixin = typename unit_traits< units::absolute< units::length > >::template mixin< PositionVector > |
using | storage_mixin = typename unit_traits< units::absolute< units::length > >::storage_mixin |
using | traits = unit_traits< units::absolute< units::length > > |
Private Attributes | |
Eigen::Vector3d | vec_ |
Underlying template for all Pose types, including PoseVector, Pose, and StampedPose See PositionVector and OrientationVector for representation deatils.
|
inherited |
Definition at line 1220 of file Coordinate.h.
|
inherited |
Definition at line 1225 of file Coordinate.h.
typedef BasicPose gams::pose::BasicPose< Derived >::BaseType |
using gams::pose::BasicPose< Derived >::derived_type = Derived |
|
privateinherited |
Definition at line 534 of file Coordinate.h.
|
privateinherited |
Definition at line 533 of file Coordinate.h.
|
privateinherited |
Definition at line 532 of file Coordinate.h.
|
inherited |
Definition at line 543 of file Coordinate.h.
|
inherited |
Definition at line 543 of file Coordinate.h.
|
inline |
|
inline |
gams::pose::BasicPose< Derived >::BasicPose | ( | double | x, |
double | y, | ||
double | z, | ||
double | rx, | ||
double | ry, | ||
double | rz | ||
) |
Constructs a BasicPose from individual position and orientation values.
x | position along x-axis |
y | position along y-axis |
z | position along z-axis |
rx | length of orientation vector along x-axis |
ry | length of orientation vector along y-axis |
rz | length of orientation vector along z-axis |
gams::pose::BasicPose< Derived >::BasicPose | ( | const PositionVector & | pos | ) |
Construct a BasicPose from a PositionVector.
Orientation info will be all zeros(is_orientation_zero() == true)
loc | the PositionVector to get position info from. |
gams::pose::BasicPose< Derived >::BasicPose | ( | const OrientationVector & | rot | ) |
Construct a BasicPose from a OrientationVector.
Position info will be all zeros(is_position() == true)
rot | the OrientationVector to get position info from. |
gams::pose::BasicPose< Derived >::BasicPose | ( | const PositionVector & | pos, |
const OrientationVector & | rot | ||
) |
Construct from individual PositionVector and OrientationVector.
loc | the PositionVector |
rot | the OrientationVector |
gams::pose::BasicPose< Derived >::BasicPose | ( | ) |
Default constructor.
All values will be INVAL_COORD
|
explicit |
Constructor from MADARA DoubleVector.
vec | the vector to get values from(index 0, 1, 2, 3, 4, 5 go to x, y, z, rx, ry, rz) |
|
explicit |
Constructor from MADARA NativeDoubleVector.
vec | the vector to get values from(index 0, 1, 2, 3, 4, 5 go to x, y, z, rx, ry, rz) |
|
explicit |
Constructor from two MADARA DoubleVectors, for position and orientation.
vec_loc | position values from(0, 1, 2 into x, y, z) |
vec_rot | orientation values from(0, 1, 2 into rx, ry, rz) |
|
explicit |
Constructor from two MADARA NativeDoubleVector, for position/orientation.
vec_loc | position values from(0, 1, 2 into x, y, z) |
vec_rot | orientation values from(0, 1, 2 into rx, ry, rz) |
|
inline |
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 |
PositionVector& gams::pose::BasicPose< Derived >::as_location_vec | ( | ) |
const PositionVector& gams::pose::BasicPose< Derived >::as_location_vec | ( | ) | const |
OrientationVector& gams::pose::BasicPose< Derived >::as_orientation_vec | ( | ) |
Gets a reference to this object's Orientation part.
const OrientationVector& gams::pose::BasicPose< Derived >::as_orientation_vec | ( | ) | const |
Gets a const reference to this object's Orientation part.
PositionVector& gams::pose::BasicPose< Derived >::as_position_vec | ( | ) |
Gets a reference to this object's Position part.
const PositionVector& gams::pose::BasicPose< Derived >::as_position_vec | ( | ) | const |
Gets a const reference to this object's Position part.
BaseType& gams::pose::BasicPose< Derived >::as_vec | ( | ) |
Gets a reference to this object.
Useful for derived types.
const BaseType& gams::pose::BasicPose< Derived >::as_vec | ( | ) | const |
Gets a const reference to this object.
Useful for derived types.
|
inlineinherited |
Passthrough to Eigen vector cross method.
Definition at line 714 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector cross method.
Definition at line 714 of file Coordinate.h.
|
inline |
|
inlineinherited |
Passthrough to Eigen vector dot method.
Definition at line 705 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector dot method.
Definition at line 705 of file Coordinate.h.
|
inlinestaticconstexprinherited |
Is this coordinate a fixed vector?
Definition at line 561 of file Coordinate.h.
|
inlinestaticconstexprinherited |
Is this coordinate a fixed vector?
Definition at line 561 of file Coordinate.h.
|
inlinestaticconstexprinherited |
Is this coordinate a free vector?
Definition at line 558 of file Coordinate.h.
|
inlinestaticconstexprinherited |
Is this coordinate a free vector?
Definition at line 558 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 637 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 637 of file Coordinate.h.
void gams::pose::BasicPose< Derived >::from_container | ( | const madara::knowledge::containers::NativeDoubleVector & | container | ) |
Imports the pose from a MADARA container.
container | the container to import from |
void gams::pose::BasicPose< Derived >::from_container | ( | const std::vector< double > & | container | ) |
Imports the pose from a STL vector container.
container | the container to import from |
double gams::pose::BasicPose< Derived >::get | ( | int | i | ) | const |
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 |
bool gams::pose::BasicPose< Derived >::is_location_set | ( | ) | const |
bool gams::pose::BasicPose< Derived >::is_location_zero | ( | ) | const |
bool gams::pose::BasicPose< Derived >::is_orientation_set | ( | ) | const |
Tests if the orientation/orientation has been set.
bool gams::pose::BasicPose< Derived >::is_orientation_zero | ( | ) | const |
Tests if all orientation information is zero.
bool gams::pose::BasicPose< Derived >::is_position_set | ( | ) | const |
Tests if the position is set(valid).
bool gams::pose::BasicPose< Derived >::is_position_zero | ( | ) | const |
Tests if all position information is zero.
bool gams::pose::BasicPose< Derived >::is_set | ( | ) | const |
Tests if this Pose is invalid; i.e., any values are INVAL_COORD.
bool gams::pose::BasicPose< Derived >::is_zero | ( | ) | const |
Tests if all pose information is zero.
If true, is_position_zero and is_orientation_zero are also true
|
static |
Get the name of this coordinate type.
|
inlineinherited |
Passthrough to Eigen vector norm method.
Definition at line 724 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector norm method.
Definition at line 724 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector normalized method.
Definition at line 740 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector normalized method.
Definition at line 740 of file Coordinate.h.
|
inline |
|
inline |
bool gams::pose::BasicPose< Derived >::operator== | ( | const BasicPose< Derived > & | rhs | ) | const |
Tests for exact equality.
rhs | the other pose to test against |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inline |
|
inline |
double gams::pose::BasicPose< Derived >::set | ( | int | i, |
double | val | ||
) |
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!
i | the index of the coordinate |
v | the value to set to |
Definition at line 578 of file Coordinate.h.
|
inlineinherited |
Set i'th value in this Coordinate.
No range checking!
i | the index of the coordinate |
v | the value to set to |
Definition at line 578 of file Coordinate.h.
int gams::pose::BasicPose< Derived >::size | ( | ) | const |
Get the number of values this coordinate type uses.
|
inlineinherited |
Passthrough to Eigen vector squaredNorm method.
Definition at line 732 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector squaredNorm method.
Definition at line 732 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 616 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 616 of file Coordinate.h.
void gams::pose::BasicPose< Derived >::to_container | ( | madara::knowledge::containers::NativeDoubleVector & | container | ) | const |
Saves the pose to a MADARA container.
container | the container to save to |
std::string gams::pose::BasicPose< Derived >::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.
delimiter | delimiter between values |
unset_identifier | if true, include unset values |
|
staticconstexprinherited |
Definition at line 1220 of file Coordinate.h.
|
staticconstexprinherited |
Definition at line 1225 of file Coordinate.h.
|
privateinherited |
Definition at line 530 of file Coordinate.h.