GAMS  1.4.0
Coordinate.h File Reference

Copyright (c) 2015 Carnegie Mellon University. More...

#include "ReferenceFrame.h"
#include "gams/GamsExport.h"
#include <string>
#include <cfloat>
#include <utility>
#include "gams/CPP11_compat.h"
#include "madara/knowledge/containers/DoubleVector.h"
#include "madara/knowledge/containers/NativeDoubleVector.h"
#include "ReferenceFrameFwd.h"
#include "Coordinate.inl"
#include "Framed.h"
#include "Stamped.h"

Go to the source code of this file.

Classes

struct  gams::pose::units::absolute< T >
 Tag that coordinate is a fixed vector, not free. More...
 
struct  gams::pose::units::acceleration
 
class  gams::pose::Acceleration
 
class  gams::pose::AccelerationVector
 
struct  gams::pose::units::angular_acceleration
 
struct  gams::pose::units::angular_velocity
 
class  gams::pose::AngularAcceleration
 
class  gams::pose::AngularAccelerationVector
 
class  gams::pose::AngularVelocity
 
class  gams::pose::AngularVelocityVector
 
struct  gams::pose::units::base_of< T >
 Trait to strip absolute off a unit tag. More...
 
struct  gams::pose::units::base_of< absolute< T > >
 
struct  gams::pose::basic_positional_mixin< Derived >
 Internal use. More...
 
struct  gams::pose::basic_rotational_mixin< Derived >
 Internal use. More...
 
class  gams::pose::BasicVector< Derived, Units >
 For internal use. The underlying template for all coordinate types. More...
 
struct  gams::pose::common_rotational_mixin< Derived >
 Internal use. More...
 
struct  gams::pose::default_positional_unit_traits
 Internal use. More...
 
struct  gams::pose::default_rotational_unit_traits
 Internal use. More...
 
struct  gams::pose::default_unit_traits
 Internal use. More...
 
class  gams::pose::Displacement
 
class  gams::pose::DisplacementVector
 
struct  gams::pose::fixed_into_free< T >
 Helper struct for defining which fixed coordinate types map to which free vector coordinate types. More...
 
struct  gams::pose::fixed_into_free< Orientation >
 
struct  gams::pose::fixed_into_free< OrientationVector >
 
struct  gams::pose::fixed_into_free< Position >
 
struct  gams::pose::fixed_into_free< PositionVector >
 
struct  gams::pose::fixed_into_free< StampedOrientation >
 
struct  gams::pose::fixed_into_free< StampedPosition >
 
struct  gams::pose::is_positional< T >
 
struct  gams::pose::is_rotational< T >
 
struct  gams::pose::units::length
 
struct  gams::pose::unit_traits< units::angular_velocity >::mixin
 
struct  gams::pose::unit_traits< units::velocity >::mixin
 
struct  gams::pose::unit_traits< units::acceleration >::mixin
 
struct  gams::pose::unit_traits< units::length >::mixin
 
struct  gams::pose::unit_traits< units::absolute< units::length > >::mixin
 
struct  gams::pose::unit_traits< units::absolute< units::plane_angle > >::mixin
 
struct  gams::pose::unit_traits< units::plane_angle >::mixin
 
struct  gams::pose::unit_traits< units::angular_acceleration >::mixin
 
class  gams::pose::Orientation
 
class  gams::pose::OrientationVector
 
struct  gams::pose::units::plane_angle
 
class  gams::pose::Position
 
class  gams::pose::PositionVector
 
class  gams::pose::Rotation
 
class  gams::pose::RotationVector
 
struct  gams::pose::units::same_base< L, R >
 Trait to compare types, ignoring absolute. More...
 
class  gams::pose::StampedAcceleration
 
class  gams::pose::StampedAngularAcceleration
 
class  gams::pose::StampedAngularVelocity
 
class  gams::pose::StampedDisplacement
 
class  gams::pose::StampedOrientation
 
class  gams::pose::StampedPosition
 
class  gams::pose::StampedRotation
 
class  gams::pose::StampedVelocity
 
class  gams::pose::default_rotational_unit_traits::storage_mixin
 
class  gams::pose::default_unit_traits::storage_mixin
 
struct  gams::pose::unit_traits< Units >
 Helper trait to customize BasicVector based on unit. More...
 
struct  gams::pose::unit_traits< units::absolute< units::length > >
 
struct  gams::pose::unit_traits< units::absolute< units::plane_angle > >
 
struct  gams::pose::unit_traits< units::acceleration >
 
struct  gams::pose::unit_traits< units::angular_acceleration >
 
struct  gams::pose::unit_traits< units::angular_velocity >
 
struct  gams::pose::unit_traits< units::length >
 
struct  gams::pose::unit_traits< units::plane_angle >
 
struct  gams::pose::unit_traits< units::velocity >
 
class  gams::pose::Velocity
 
struct  gams::pose::units::velocity
 
class  gams::pose::VelocityVector
 

Namespaces

 gams
 Contains all GAMS-related tools, classes and code.
 
 gams::pose
 Provides position and orientation primitives.
 
 gams::pose::units
 Type tags to indicate the dimension a coordinate lies within.
 

Macros

#define GAMS_POSE_MAKE_BINARY_VEC_SCALAR_OP(op)
 Generates Eigen passthroughs for binary ops betwen vector and scalar. More...
 
#define GAMS_POSE_MAKE_COMPOSITE_VEC_SCALAR_OP(op)
 Generates composite assignment operators for Coordinates, using Eigen. More...
 
#define GAMS_POSE_MAKE_COMPOSITE_VECS_OP(op)
 Generates Eigen passthroughs on vectors. More...
 
#define GAMS_POSE_MAKE_COORDINATE_TYPE(name, units)
 Creates the three variants for each coordinate type: {Coordinate}Vector: just the coordinate values alone {Coordinate}: values plus a bound frame Stamped{Coordinate}: values, frame, and timestamp. More...
 
#define GAMS_POSE_MAKE_VEC_SCALAR_OPS(op)
 
#define INVAL_COORD   DBL_MAX
 

Functions

template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator!= (const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
 Inequality operator for coordinates. More...
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator!= (const Framed< BasicVector< LDerived, Units >> &lhs, const Framed< BasicVector< RDerived, Units >> &rhs)
 Inequality operator for Framed coordinates. More...
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator!= (const Stamped< Framed< BasicVector< LDerived, Units >>> &lhs, const Stamped< Framed< BasicVector< RDerived, Units >>> &rhs)
 Inequality operator for Framed and Stamped coordinates. More...
 
template<typename Derived , typename Units , typename Scalar >
auto gams::pose::operator* (const BasicVector< Derived, Units > &vec, Scalar scalar) -> typename std::enable_if< std::is_arithmetic< Scalar >::value &&BasicVector< Derived, Units >::free(), typename BasicVector< Derived, Units >::derived_type >::type
 
template<typename Derived , typename Units , typename Scalar >
auto gams::pose::operator* (Scalar scalar, const BasicVector< Derived, Units > &vec) -> decltype(vec *scalar)
 
template<typename Derived , typename Units , typename Scalar >
auto gams::pose::operator*= (BasicVector< Derived, Units > &vec, Scalar scalar) -> typename std::enable_if< std::is_arithmetic< Scalar >::value &&BasicVector< Derived, Units >::free(), typename BasicVector< Derived, Units >::derived_type & >::type
 
template<typename LDerived , typename LUnits , typename RDerived , typename RUnits >
auto gams::pose::operator+ (const BasicVector< LDerived, LUnits > &lhs, const BasicVector< RDerived, RUnits > &rhs) -> typename std::enable_if< RDerived::free(), LDerived >::type
 Pass through to Eigen operator- on vectors, if RHS is free. More...
 
template<typename LDerived , typename RDerived , typename Units >
auto gams::pose::operator+= (BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs) -> typename std::enable_if< unit_traits< Units >::positional &&unit_traits< Units >::free, LDerived & >::type
 
template<typename LDerived , typename RDerived , typename Units >
auto gams::pose::operator+= (BasicVector< LDerived, Units > &lhs, const Eigen::MatrixBase< RDerived > &rhs) -> typename std::enable_if< unit_traits< Units >::positional, LDerived & >::type
 
template<typename LDerived , typename RDerived , typename Units >
auto gams::pose::operator+= (BasicVector< LDerived, units::absolute< Units >> &lhs, const BasicVector< RDerived, Units > &rhs) -> typename std::enable_if< unit_traits< Units >::positional &&unit_traits< Units >::free, LDerived & >::type
 
template<typename LDerived , typename LUnits , typename RDerived , typename RUnits >
auto gams::pose::operator- (const BasicVector< LDerived, LUnits > &lhs, const BasicVector< RDerived, RUnits > &rhs) -> typename std::enable_if< LDerived::free() &&RDerived::free(), LDerived >::type
 Pass through to Eigen operator- on vectors, for free types. More...
 
template<typename LDerived , typename RDerived , typename Units >
auto gams::pose::operator-= (BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs) -> typename std::enable_if< unit_traits< Units >::positional &&unit_traits< Units >::free, LDerived & >::type
 
template<typename LDerived , typename RDerived , typename Units >
auto gams::pose::operator-= (BasicVector< LDerived, Units > &lhs, const Eigen::MatrixBase< RDerived > &rhs) -> typename std::enable_if< unit_traits< Units >::positional, LDerived & >::type
 
template<typename LDerived , typename RDerived , typename Units >
auto gams::pose::operator-= (BasicVector< LDerived, units::absolute< Units >> &lhs, const BasicVector< RDerived, Units > &rhs) -> typename std::enable_if< unit_traits< Units >::positional &&unit_traits< Units >::free, LDerived & >::type
 
template<typename Derived , typename Units , typename Scalar >
auto gams::pose::operator/ (const BasicVector< Derived, Units > &vec, Scalar scalar) -> typename std::enable_if< std::is_arithmetic< Scalar >::value &&BasicVector< Derived, Units >::free(), typename BasicVector< Derived, Units >::derived_type >::type
 
template<typename Derived , typename Units , typename Scalar >
auto gams::pose::operator/ (Scalar scalar, const BasicVector< Derived, Units > &vec) -> decltype(vec/scalar)
 
template<typename Derived , typename Units , typename Scalar >
auto gams::pose::operator/= (BasicVector< Derived, Units > &vec, Scalar scalar) -> typename std::enable_if< std::is_arithmetic< Scalar >::value &&BasicVector< Derived, Units >::free(), typename BasicVector< Derived, Units >::derived_type & >::type
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator< (const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator< (const Framed< BasicVector< LDerived, Units >> &lhs, const Framed< BasicVector< RDerived, Units >> &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator< (const Stamped< Framed< BasicVector< LDerived, Units >>> &lhs, const Stamped< Framed< BasicVector< RDerived, Units >>> &rhs)
 
template<typename Derived , typename Units >
std::ostream & gams::pose::operator<< (std::ostream &o, const BasicVector< Derived, Units > &v)
 
std::ostream & gams::pose::operator<< (std::ostream &o, const Eigen::Vector3d &v)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator<= (const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator<= (const Framed< BasicVector< LDerived, Units >> &lhs, const Framed< BasicVector< RDerived, Units >> &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator<= (const Stamped< Framed< BasicVector< LDerived, Units >>> &lhs, const Stamped< Framed< BasicVector< RDerived, Units >>> &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator== (const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
 Equality operator for coordinates. More...
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator== (const Framed< BasicVector< LDerived, Units >> &lhs, const Framed< BasicVector< RDerived, Units >> &rhs)
 Equality operator for Framed coordinates. More...
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator== (const Stamped< Framed< BasicVector< LDerived, Units >>> &lhs, const Stamped< Framed< BasicVector< RDerived, Units >>> &rhs)
 Equality operator for Framed and Stamped coordinates. More...
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator> (const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator> (const Framed< BasicVector< LDerived, Units >> &lhs, const Framed< BasicVector< RDerived, Units >> &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator> (const Stamped< Framed< BasicVector< LDerived, Units >>> &lhs, const Stamped< Framed< BasicVector< RDerived, Units >>> &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator>= (const BasicVector< LDerived, Units > &lhs, const BasicVector< RDerived, Units > &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator>= (const Framed< BasicVector< LDerived, Units >> &lhs, const Framed< BasicVector< RDerived, Units >> &rhs)
 
template<typename LDerived , typename RDerived , typename Units >
bool gams::pose::operator>= (const Stamped< Framed< BasicVector< LDerived, Units >>> &lhs, const Stamped< Framed< BasicVector< RDerived, Units >>> &rhs)
 
Eigen::Vector3d gams::pose::quat_to_axis_angle (const Eigen::Quaterniond &quat)
 

Detailed Description

Copyright (c) 2015 Carnegie Mellon University.

All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following acknowledgments and disclaimers.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The names "Carnegie Mellon University," "SEI" and/or "Software Engineering Institute" shall not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact permi.nosp@m.ssio.nosp@m.n@sei.nosp@m..cmu.nosp@m..edu.
  4. Products derived from this software may not be called "SEI" nor may "SEI" appear in their names without prior written permission of permi.nosp@m.ssio.nosp@m.n@sei.nosp@m..cmu.nosp@m..edu.
  5. Redistributions of any form whatsoever must retain the following acknowledgment:

    This material is based upon work funded and supported by the Department of Defense under Contract No. FA8721-05-C-0003 with Carnegie Mellon University for the operation of the Software Engineering Institute, a federally funded research and development center. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the United States Department of Defense.

    NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.

    This material has been approved for public release and unlimited distribution.

Author
James Edmondson jedmo.nosp@m.ndso.nosp@m.n@gma.nosp@m.il.c.nosp@m.om

This file contains the Position, Orientation, and Pose classes

Definition in file Coordinate.h.

Macro Definition Documentation

◆ GAMS_POSE_MAKE_BINARY_VEC_SCALAR_OP

#define GAMS_POSE_MAKE_BINARY_VEC_SCALAR_OP (   op)
Value:
template<typename Derived, typename Units, typename Scalar> \
inline auto operator op(const BasicVector<Derived, Units> &vec, Scalar scalar) -> \
typename std::enable_if<std::is_arithmetic<Scalar>::value && \
BasicVector<Derived, Units>::free(), \
typename BasicVector<Derived, Units>::derived_type>::type \
{ \
typename BasicVector<Derived, Units>::derived_type ret = vec.self(); \
ret op##= scalar; \
return ret; \
} \
\
template<typename Derived, typename Units, typename Scalar> \
inline auto operator op(Scalar scalar, const BasicVector<Derived, Units> &vec) -> \
decltype(vec op scalar) \
{ \
return vec op scalar; \
}

Generates Eigen passthroughs for binary ops betwen vector and scalar.

Definition at line 808 of file Coordinate.h.

◆ GAMS_POSE_MAKE_COMPOSITE_VEC_SCALAR_OP

#define GAMS_POSE_MAKE_COMPOSITE_VEC_SCALAR_OP (   op)
Value:
template<typename Derived, typename Units, typename Scalar> \
inline auto operator op##=(BasicVector<Derived, Units> &vec, Scalar scalar) -> \
typename std::enable_if<std::is_arithmetic<Scalar>::value && \
BasicVector<Derived, Units>::free(), \
typename BasicVector<Derived, Units>::derived_type&>::type \
{ \
vec.vec() op##= scalar; \
return vec.self(); \
}

Generates composite assignment operators for Coordinates, using Eigen.

Definition at line 796 of file Coordinate.h.

◆ GAMS_POSE_MAKE_COMPOSITE_VECS_OP

#define GAMS_POSE_MAKE_COMPOSITE_VECS_OP (   op)

Generates Eigen passthroughs on vectors.

Definition at line 835 of file Coordinate.h.

◆ GAMS_POSE_MAKE_COORDINATE_TYPE

#define GAMS_POSE_MAKE_COORDINATE_TYPE (   name,
  units 
)

Creates the three variants for each coordinate type: {Coordinate}Vector: just the coordinate values alone {Coordinate}: values plus a bound frame Stamped{Coordinate}: values, frame, and timestamp.

Definition at line 1133 of file Coordinate.h.

◆ GAMS_POSE_MAKE_VEC_SCALAR_OPS

#define GAMS_POSE_MAKE_VEC_SCALAR_OPS (   op)
Value:
GAMS_POSE_MAKE_BINARY_VEC_SCALAR_OP(op)
#define GAMS_POSE_MAKE_COMPOSITE_VEC_SCALAR_OP(op)
Generates composite assignment operators for Coordinates, using Eigen.
Definition: Coordinate.h:796

Definition at line 827 of file Coordinate.h.

◆ INVAL_COORD

#define INVAL_COORD   DBL_MAX

Definition at line 78 of file Coordinate.h.