GAMS  1.4.0
gams::pose::PoseVector Class Reference

#include <Pose.h>

Inheritance diagram for gams::pose::PoseVector:
gams::pose::BasicPose< PoseVector > gams::pose::PositionVector gams::pose::OrientationVector gams::pose::BasicVector< PositionVector, units::absolute< units::length > > gams::pose::BasicVector< OrientationVector, units::absolute< units::plane_angle > >

Public Types

typedef BasicPose BaseType
 
using derived_type = PoseVector
 
using units_type = units::absolute< units::length >
 
using units_type = units::absolute< units::plane_angle >
 

Public Member Functions

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...
 
PositionVectoras_location_vec ()
 
const PositionVectoras_location_vec () const
 
OrientationVectoras_orientation_vec ()
 Gets a reference to this object's Orientation part. More...
 
const OrientationVectoras_orientation_vec () const
 Gets a const reference to this object's Orientation part. More...
 
PositionVectoras_position_vec ()
 Gets a reference to this object's Position part. More...
 
const PositionVectoras_position_vec () const
 Gets a const reference to this object's Position part. More...
 
BaseTypeas_vec ()
 Gets a reference to this object. More...
 
const BaseTypeas_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 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...
 
 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...
 
PoseVectorself ()
 
const PoseVectorself () 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...
 

Private Types

using Base = BasicPose< PoseVector >
 
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_
 

Static Private Attributes

static constexpr const char * type_name = "PoseVector"
 

Detailed Description

Definition at line 388 of file Pose.h.

Member Typedef Documentation

◆ Base

Definition at line 391 of file Pose.h.

◆ BaseType

Definition at line 282 of file Pose.h.

◆ derived_type

Definition at line 76 of file Pose.h.

◆ mixin

Definition at line 534 of file Coordinate.h.

◆ storage_mixin

◆ traits

◆ units_type [1/2]

◆ units_type [2/2]

Member Function Documentation

◆ approximately_equal()

bool gams::pose::BasicPose< PoseVector >::approximately_equal ( const BasicPose< Derived2 > &  other,
double  epsilon 
) const
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.

Parameters
otherthe other Coordinate to test against
epsilonthe maximum distance permitted to return true
Returns
true if the distance is less than or equal to epsilon

Definition at line 339 of file Pose.h.

◆ as_location_vec() [1/2]

PositionVector& gams::pose::BasicPose< PoseVector >::as_location_vec ( )
inherited

◆ as_location_vec() [2/2]

const PositionVector& gams::pose::BasicPose< PoseVector >::as_location_vec ( ) const
inherited

◆ as_orientation_vec() [1/2]

OrientationVector& gams::pose::BasicPose< PoseVector >::as_orientation_vec ( )
inherited

Gets a reference to this object's Orientation part.

Returns
reference to the OrientationVector

◆ as_orientation_vec() [2/2]

const OrientationVector& gams::pose::BasicPose< PoseVector >::as_orientation_vec ( ) const
inherited

Gets a const reference to this object's Orientation part.

Returns
const reference to the OrientationVector

◆ as_position_vec() [1/2]

PositionVector& gams::pose::BasicPose< PoseVector >::as_position_vec ( )
inherited

Gets a reference to this object's Position part.

Returns
reference to the PositionVector

◆ as_position_vec() [2/2]

const PositionVector& gams::pose::BasicPose< PoseVector >::as_position_vec ( ) const
inherited

Gets a const reference to this object's Position part.

Returns
const reference to the PositionVector

◆ as_vec() [1/2]

BaseType& gams::pose::BasicPose< PoseVector >::as_vec ( )
inherited

Gets a reference to this object.

Useful for derived types.

Returns
reference to this object.

◆ as_vec() [2/2]

const BaseType& gams::pose::BasicPose< PoseVector >::as_vec ( ) const
inherited

Gets a const reference to this object.

Useful for derived types.

Returns
const reference to this object.

◆ cross() [1/2]

PositionVector gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::cross ( const BasicVector< Other, Units > &  other) const
inlineinherited

Passthrough to Eigen vector cross method.

Definition at line 714 of file Coordinate.h.

◆ cross() [2/2]

OrientationVector gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::cross ( const BasicVector< Other, Units > &  other) const
inlineinherited

Passthrough to Eigen vector cross method.

Definition at line 714 of file Coordinate.h.

◆ distance_to()

double gams::pose::BasicPose< PoseVector >::distance_to ( const BasicPose< Derived2 > &  target) const
inlineinherited

Definition at line 349 of file Pose.h.

◆ dot() [1/2]

double gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::dot ( const BasicVector< Other, Units > &  other) const
inlineinherited

Passthrough to Eigen vector dot method.

Definition at line 705 of file Coordinate.h.

◆ dot() [2/2]

double gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::dot ( const BasicVector< Other, Units > &  other) const
inlineinherited

Passthrough to Eigen vector dot method.

Definition at line 705 of file Coordinate.h.

◆ fixed() [1/2]

static constexpr bool gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::fixed ( )
inlinestaticconstexprinherited

Is this coordinate a fixed vector?

Definition at line 561 of file Coordinate.h.

◆ fixed() [2/2]

static constexpr bool gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::fixed ( )
inlinestaticconstexprinherited

Is this coordinate a fixed vector?

Definition at line 561 of file Coordinate.h.

◆ free() [1/2]

static constexpr bool gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::free ( )
inlinestaticconstexprinherited

Is this coordinate a free vector?

Definition at line 558 of file Coordinate.h.

◆ free() [2/2]

static constexpr bool gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::free ( )
inlinestaticconstexprinherited

Is this coordinate a free vector?

Definition at line 558 of file Coordinate.h.

◆ from_array() [1/2]

void gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::from_array ( const ContainType &  in)
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.

Template Parameters
ContainTypethe type of the container; must support operator[]
Parameters
inthe container to pull new values from.

Definition at line 637 of file Coordinate.h.

◆ from_array() [2/2]

void gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::from_array ( const ContainType &  in)
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.

Template Parameters
ContainTypethe type of the container; must support operator[]
Parameters
inthe container to pull new values from.

Definition at line 637 of file Coordinate.h.

◆ from_container() [1/2]

void gams::pose::BasicPose< PoseVector >::from_container ( const madara::knowledge::containers::NativeDoubleVector &  container)
inherited

Imports the pose from a MADARA container.

Parameters
containerthe container to import from

◆ from_container() [2/2]

void gams::pose::BasicPose< PoseVector >::from_container ( const std::vector< double > &  container)
inherited

Imports the pose from a STL vector container.

Parameters
containerthe container to import from

◆ get() [1/3]

double gams::pose::BasicPose< PoseVector >::get ( int  i) const
inherited

Retrives i'th coordinate, 0-indexed, in order x, y, z, rx, ry, rz.

Parameters
ithe index
Returns
the i'th coordinate value
Exceptions
std::range_errorif index is less than 0, or greater than 6

◆ get() [2/3]

double gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::get ( size_t  i) const
inlineinherited

Get i'th value in this Coordinate.

No range checking!

Definition at line 569 of file Coordinate.h.

◆ get() [3/3]

double gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::get ( size_t  i) const
inlineinherited

Get i'th value in this Coordinate.

No range checking!

Definition at line 569 of file Coordinate.h.

◆ is_location_set()

bool gams::pose::BasicPose< PoseVector >::is_location_set ( ) const
inherited

◆ is_location_zero()

bool gams::pose::BasicPose< PoseVector >::is_location_zero ( ) const
inherited

◆ is_orientation_set()

bool gams::pose::BasicPose< PoseVector >::is_orientation_set ( ) const
inherited

Tests if the orientation/orientation has been set.

Returns
true if orientation has been set to something valid

◆ is_orientation_zero()

bool gams::pose::BasicPose< PoseVector >::is_orientation_zero ( ) const
inherited

Tests if all orientation information is zero.

Returns
true if all orientation information is zero

◆ is_position_set()

bool gams::pose::BasicPose< PoseVector >::is_position_set ( ) const
inherited

Tests if the position is set(valid).

Returns
true if position has been set to something valid

◆ is_position_zero()

bool gams::pose::BasicPose< PoseVector >::is_position_zero ( ) const
inherited

Tests if all position information is zero.

Returns
true if all position information is zero

◆ is_set()

bool gams::pose::BasicPose< PoseVector >::is_set ( ) const
inherited

Tests if this Pose is invalid; i.e., any values are INVAL_COORD.

Returns
true if at least one value is INVAL_COORD

◆ is_zero()

bool gams::pose::BasicPose< PoseVector >::is_zero ( ) const
inherited

Tests if all pose information is zero.

If true, is_position_zero and is_orientation_zero are also true

Returns
true if all pose information is zero

◆ name()

static std::string gams::pose::BasicPose< PoseVector >::name ( )
staticinherited

Get the name of this coordinate type.

Returns
"Pose"

◆ norm() [1/2]

double gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::norm ( ) const
inlineinherited

Passthrough to Eigen vector norm method.

Definition at line 724 of file Coordinate.h.

◆ norm() [2/2]

double gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::norm ( ) const
inlineinherited

Passthrough to Eigen vector norm method.

Definition at line 724 of file Coordinate.h.

◆ normalized() [1/2]

Passthrough to Eigen vector normalized method.

Definition at line 740 of file Coordinate.h.

◆ normalized() [2/2]

Passthrough to Eigen vector normalized method.

Definition at line 740 of file Coordinate.h.

◆ operator BasicVector< Derived2, units::absolute< units::length >>()

gams::pose::BasicPose< PoseVector >::operator BasicVector< Derived2, units::absolute< units::length >> ( ) const
inlineinherited

Definition at line 151 of file Pose.h.

◆ operator BasicVector< Derived2, units::absolute< units::plane_angle >>()

gams::pose::BasicPose< PoseVector >::operator BasicVector< Derived2, units::absolute< units::plane_angle >> ( ) const
inlineinherited

Definition at line 157 of file Pose.h.

◆ operator==()

bool gams::pose::BasicPose< PoseVector >::operator== ( const BasicPose< PoseVector > &  rhs) const
inherited

Tests for exact equality.

Parameters
rhsthe other pose to test against
Returns
true if all values equal corresponding values in other pose

◆ positional()

static constexpr bool gams::pose::BasicPose< PoseVector >::positional ( )
inlinestaticconstexprinherited

Is this coordinate a positional one?

Definition at line 142 of file Pose.h.

◆ rotational()

static constexpr bool gams::pose::BasicPose< PoseVector >::rotational ( )
inlinestaticconstexprinherited

Is this coordinate a rotational one?

Definition at line 145 of file Pose.h.

◆ self() [1/2]

PoseVector & gams::pose::BasicPose< PoseVector >::self ( )
inlineinherited

Definition at line 147 of file Pose.h.

◆ self() [2/2]

const PoseVector & gams::pose::BasicPose< PoseVector >::self ( ) const
inlineinherited

Definition at line 148 of file Pose.h.

◆ set() [1/3]

double gams::pose::BasicPose< PoseVector >::set ( int  i,
double  val 
)
inherited

Sets i'th coordinate, 0-indexed, in order x, y, z, rx, ry, rz.

Parameters
ithe index
valthe new value
Returns
the new i'th coordinate value
Exceptions
std::range_errorif index is less than 0, or greater than 6

◆ set() [2/3]

double gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::set ( size_t  i,
double  v 
)
inlineinherited

Set i'th value in this Coordinate.

No range checking!

Parameters
ithe index of the coordinate
vthe value to set to
Returns
the new value

Definition at line 578 of file Coordinate.h.

◆ set() [3/3]

double gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::set ( size_t  i,
double  v 
)
inlineinherited

Set i'th value in this Coordinate.

No range checking!

Parameters
ithe index of the coordinate
vthe value to set to
Returns
the new value

Definition at line 578 of file Coordinate.h.

◆ size()

int gams::pose::BasicPose< PoseVector >::size ( void  ) const
inherited

Get the number of values this coordinate type uses.

Returns
6

◆ squaredNorm() [1/2]

double gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::squaredNorm ( ) const
inlineinherited

Passthrough to Eigen vector squaredNorm method.

Definition at line 732 of file Coordinate.h.

◆ squaredNorm() [2/2]

double gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::squaredNorm ( ) const
inlineinherited

Passthrough to Eigen vector squaredNorm method.

Definition at line 732 of file Coordinate.h.

◆ to_array() [1/2]

void gams::pose::BasicVector< OrientationVector , units::absolute< units::plane_angle > >::to_array ( ContainType &  out) const
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.

Template Parameters
ContainTypethe type of the container; must support "set"
Parameters
outthe container to put this Coordinate's values into.

Definition at line 616 of file Coordinate.h.

◆ to_array() [2/2]

void gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::to_array ( ContainType &  out) const
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.

Template Parameters
ContainTypethe type of the container; must support "set"
Parameters
outthe container to put this Coordinate's values into.

Definition at line 616 of file Coordinate.h.

◆ to_container()

void gams::pose::BasicPose< PoseVector >::to_container ( madara::knowledge::containers::NativeDoubleVector &  container) const
inherited

Saves the pose to a MADARA container.

Parameters
containerthe container to save to

◆ to_string()

std::string gams::pose::BasicPose< PoseVector >::to_string ( const std::string &  delimiter = ", ",
const std::string &  unset_identifier = "<unset>" 
) const
inherited

Returns a string of the values x, y, z, rx, ry, rz.

Parameters
delimiterdelimiter between values
unset_identifierif true, include unset values
Returns
stringified version of the Pose

Member Data Documentation

◆ type_name

constexpr const char* gams::pose::PoseVector::type_name = "PoseVector"
staticconstexprprivate

Definition at line 394 of file Pose.h.

◆ vec_

Eigen::Vector3d gams::pose::BasicVector< PositionVector , units::absolute< units::length > >::vec_
privateinherited

Definition at line 530 of file Coordinate.h.


The documentation for this class was generated from the following file: