GAMS
1.4.0
|
#include <Pose.h>
Public Types | |
using | Base = Framed< BasicPose< Pose > > |
typedef BasicPose | BaseType |
using | derived_type = typename Impl::derived_type |
using | units_type = units::absolute< units::plane_angle > |
using | units_type = units::absolute< units::length > |
Public Member Functions | |
Pose ()=default | |
Pose (const Orientation &ori) | |
Pose (const Position &pos) | |
Pose (const Position &pos, const Orientation &ori) | |
Pose (const StampedOrientation &ori) | |
Pose (const StampedPosition &pos) | |
Pose (const StampedPosition &pos, const StampedOrientation &ori) | |
double | angle_to (const Orientation &target) const |
Finds angle to the target; transforms target to this frame if needed. More... | |
template<typename U > | |
double | angle_to (const Orientation &target, U u) const |
Finds angle to the target; transforms target to this frame if needed. More... | |
double | angle_to (const Pose &target) const |
Finds angle to the target; transforms target to this frame if needed. More... | |
template<typename U > | |
double | angle_to (const Pose &target, U u) const |
Finds angle to the target; transforms target to this frame if needed. 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... | |
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... | |
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 | distance_to (const derived_type &target) const |
Calculate distance from this Coordinate to a target. More... | |
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... | |
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... | |
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... | |
template<typename Derived2 > | |
operator BasicVector< Derived2, units::absolute< units::length >> () const | |
template<typename Derived2 > | |
operator BasicVector< Derived2, units::absolute< units::plane_angle >> () const | |
operator Orientation () const | |
Castig operator to extract Orientation from this Pose. More... | |
operator Position () const | |
Casting operator to extract Position from this Pose. More... | |
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... | |
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 | rotational () |
Is this coordinate a rotational one? More... | |
Static Public Attributes | |
static constexpr const char * | type_name = "Pose" |
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 | |
ReferenceFrame | frame_ |
Eigen::Vector3d | vec_ |
|
inherited |
|
inherited |
|
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.
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
double gams::pose::Pose::angle_to | ( | const Orientation & | target | ) | const |
Finds angle to the target; transforms target to this frame if needed.
target | the target orientation |
double gams::pose::Pose::angle_to | ( | const Orientation & | target, |
U | u | ||
) | const |
Finds angle to the target; transforms target to this frame if needed.
target | the target orientation |
double gams::pose::Pose::angle_to | ( | const Pose & | target | ) | const |
Finds angle to the target; transforms target to this frame if needed.
target | the pose with the target orientation |
double gams::pose::Pose::angle_to | ( | const Pose & | target, |
U | u | ||
) | const |
Finds angle to the target; transforms target to this frame if needed.
target | the pose with the target orientation |
|
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 714 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector cross method.
Definition at line 714 of file Coordinate.h.
|
inlineinherited |
|
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 |
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.
|
inlineinherited |
Getter for the ReferenceFrame this Coordinate belongs to.
|
inlineinherited |
Setter for the ReferenceFrame this Coordinate belongs to.
Any further calculations using this Coordinate will use this frame.
Not thread-safe.
new_frame | the frame the Coordinate will now belong to |
|
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.
|
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 |
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.
|
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 740 of file Coordinate.h.
|
inlineinherited |
Passthrough to Eigen vector normalized method.
Definition at line 740 of file Coordinate.h.
|
inlineinherited |
|
inlineinherited |
gams::pose::Pose::operator Orientation | ( | ) | const |
Castig operator to extract Orientation from this Pose.
gams::pose::Pose::operator Position | ( | ) | const |
|
inherited |
Tests for exact equality.
rhs | the other pose to test against |
|
inlinestaticconstexprinherited |
|
inlinestaticconstexprinherited |
|
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!
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.
|
inherited |
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.
|
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. |
|
privateinherited |
|
staticconstexpr |
|
privateinherited |
Definition at line 530 of file Coordinate.h.