GAMS  1.2.2
gams::pose::ReferenceFrameVersion Class Reference

For internal use. More...

#include <ReferenceFrame.h>

Inheritance diagram for gams::pose::ReferenceFrameVersion:

Public Member Functions

template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
 ReferenceFrameVersion (P &&origin, uint64_t timestamp=-1)
 Constructor from an origin, and optional timestamp. More...
 
template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
 ReferenceFrameVersion (const ReferenceFrameType *type, P &&origin, uint64_t timestamp=-1)
 Constructor from a type, an origin, and optional timestamp. More...
 
template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
 ReferenceFrameVersion (std::string name, P &&origin, uint64_t timestamp=-1)
 Constructor from a id, an origin, and optional timestamp. More...
 
template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
 ReferenceFrameVersion (const ReferenceFrameType *type, std::string name, P &&origin, uint64_t timestamp=-1)
 Constructor from a type, id, an origin, and optional timestamp. More...
 
template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
 ReferenceFrameVersion (std::shared_ptr< ReferenceFrameIdentity > ident, const ReferenceFrameType *type, P &&origin, uint64_t timestamp=-1)
 Constructor from an existing ReferenceFrameIdentity, an origin, and optional timestamp. More...
 
bool has_id () const
 Does this frame have an ID? Frames gain an ID either at construction, or lazily as needed (by having the id() method, or save* methods called). More...
 
const std::string & id () const
 Get the ID string of this frame. More...
 
const std::string * id_ptr () const
 Get the ID string of this frame. More...
 
const ReferenceFrameIdentityident () const
 Get the ReferenceFrameIdentity object associated with this frame, creating one with random ID if none exists. More...
 
ReferenceFrame interpolate (const ReferenceFrame &other, ReferenceFrame parent, uint64_t time) const
 Interpolate a frame between the given frame; use the given parent. More...
 
bool interpolated () const
 Returns true if this frame was interpolated from two stored frames. More...
 
std::string key (const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT) const
 Returns the key that save() will use to store this frame. More...
 
ReferenceFrame move (Position new_origin) const
 Creates a new ReferenceFrame with modified origin. More...
 
ReferenceFrame move (const Position &new_origin, uint64_t timestamp) const
 Creates a new ReferenceFrame with modified origin and timestamp. More...
 
Posemut_origin ()
 Gets the origin of this Frame. More...
 
const char * name () const
 Returns a human-readable name for the reference frame type. More...
 
bool operator!= (const ReferenceFrame &other) const
 Inequality operator. More...
 
bool operator!= (const ReferenceFrameVersion &other) const
 Inequality operator. More...
 
bool operator== (const ReferenceFrame &other) const
 Equality operator. More...
 
bool operator== (const ReferenceFrameVersion &other) const
 Equality operator. More...
 
ReferenceFrame orient (Orientation new_origin) const
 Creates a new ReferenceFrame with modified origin. More...
 
ReferenceFrame orient (const Orientation &new_origin, uint64_t timestamp) const
 Creates a new ReferenceFrame with modified origin and timestamp. More...
 
const Poseorigin () const
 Gets the origin of this Frame. More...
 
ReferenceFrame origin_frame () const
 Gets the parent frame (the one the origin is within). More...
 
ReferenceFrame pose (Pose new_origin) const
 Creates a new ReferenceFrame with modified origin. More...
 
ReferenceFrame pose (const Pose &new_origin, uint64_t timestamp) const
 Creates a new ReferenceFrame with modified origin and timestamp. More...
 
void save (madara::knowledge::KnowledgeBase &kb, uint64_t expiry, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT) const
 Save this ReferenceFrame to the knowledge base, The saved frames will be marked with their timestamp for later retrieval. More...
 
void save (madara::knowledge::KnowledgeBase &kb, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT) const
 Save this ReferenceFrame to the knowledge base, The saved frames will be marked with their timestamp for later retrieval. More...
 
void save_as (madara::knowledge::KnowledgeBase &kb, std::string key, uint64_t expiry, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT) const
 Save this ReferenceFrame to the knowledge base, with a specific key value. More...
 
void save_as (madara::knowledge::KnowledgeBase &kb, std::string key, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT) const
 Save this ReferenceFrame to the knowledge base, with a specific key value. More...
 
uint64_t timestamp () const
 Get the timestamp assigned to this frame. More...
 
ReferenceFrame timestamp (uint64_t timestamp) const
 Clone the this frame, but with new timestamp. More...
 
const ReferenceFrameTypetype () const
 Retrieve the frame type object for this frame. More...
 

Static Public Member Functions

static const std::string & default_prefix ()
 
template<typename ForwardIterator >
static uint64_t latest_common_timestamp (madara::knowledge::KnowledgeBase &kb, ForwardIterator begin, ForwardIterator end, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT)
 Get the latest available timestamp in the knowledge base common to all the given ids. More...
 
template<typename Container >
static uint64_t latest_common_timestamp (madara::knowledge::KnowledgeBase &kb, const Container &ids, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT)
 Get the latest available timestamp in the knowledge base common to all the given ids. More...
 
static uint64_t latest_timestamp (madara::knowledge::KnowledgeBase &kb, const std::string &id, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT)
 Get the latest available timestamp in the knowledge base for the given id. More...
 
static ReferenceFrame load (madara::knowledge::KnowledgeBase &kb, const std::string &id, uint64_t timestamp=-1, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT)
 Load a single ReferenceFrame, by ID and timestamp, interpolated if applicable. More...
 
static ReferenceFrame load_exact (madara::knowledge::KnowledgeBase &kb, const std::string &id, uint64_t timestamp=-1, uint64_t parent_timestamp=-1, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT)
 Load a single ReferenceFrame, by ID and timestamp. More...
 
template<typename ForwardIterator >
static std::vector< ReferenceFrameload_tree (madara::knowledge::KnowledgeBase &kb, ForwardIterator begin, ForwardIterator end, uint64_t timestamp=-1, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT)
 Load ReferenceFrames, by ID, and their common ancestors. More...
 
template<typename Container >
static std::vector< ReferenceFrameload_tree (madara::knowledge::KnowledgeBase &kb, const Container &ids, uint64_t timestamp=-1, const FrameEvalSettings &settings=FrameEvalSettings::DEFAULT)
 Load ReferenceFrames, by ID, and their common ancestors. More...
 

Private Member Functions

bool check_consistent () const
 

Static Private Member Functions

template<typename T >
static uint64_t init_timestamp (uint64_t given, const T &p)
 

Private Attributes

std::shared_ptr< ReferenceFrameIdentityident_
 
bool interpolated_ = false
 
Pose origin_
 
uint64_t timestamp_ = -1
 
const ReferenceFrameTypetype_
 

Friends

template<typename CoordType >
class Coordinate
 New coordinate types which are frame-dependant can inherit from this class. More...
 

Detailed Description

For internal use.

Use ReferenceFrame or FrameStore instead.

Represents a specific frame version; internal implementation of ReferenceFrame, behind a shared_ptr.

Definition at line 285 of file ReferenceFrame.h.

Constructor & Destructor Documentation

template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
gams::pose::ReferenceFrameVersion::ReferenceFrameVersion ( P &&  origin,
uint64_t  timestamp = -1 
)
inlineexplicit

Constructor from an origin, and optional timestamp.

Will be constructed with Cartesian type, and a random id.

Template Parameters
aCoordinate type convertible to Pose
Parameters
originthe origin of this frame, relative to another frame.
timestampthe timestamp of this frame. By default, will be treated as "always most current".

Definition at line 319 of file ReferenceFrame.h.

template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
gams::pose::ReferenceFrameVersion::ReferenceFrameVersion ( const ReferenceFrameType type,
P &&  origin,
uint64_t  timestamp = -1 
)
inline

Constructor from a type, an origin, and optional timestamp.

Will be constructed with a random id.

Template Parameters
aCoordinate type convertible to Pose
Parameters
typea pointer to a ReferenceFrameType struct; typically, either Cartesian, or GPS.
originthe origin of this frame, relative to another frame.
timestampthe timestamp of this frame. By default, will be treated as "always most current".

Definition at line 340 of file ReferenceFrame.h.

template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
gams::pose::ReferenceFrameVersion::ReferenceFrameVersion ( std::string  name,
P &&  origin,
uint64_t  timestamp = -1 
)
inline

Constructor from a id, an origin, and optional timestamp.

Will be constructed with Cartesian type.

Template Parameters
aCoordinate type convertible to Pose
Parameters
ida string identifier for this frame.
originthe origin of this frame, relative to another frame.
timestampthe timestamp of this frame. By default, will be treated as "always most current".

Definition at line 360 of file ReferenceFrame.h.

template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
gams::pose::ReferenceFrameVersion::ReferenceFrameVersion ( const ReferenceFrameType type,
std::string  name,
P &&  origin,
uint64_t  timestamp = -1 
)
inline

Constructor from a type, id, an origin, and optional timestamp.

Template Parameters
aCoordinate type convertible to Pose
Parameters
typea pointer to a ReferenceFrameType struct; typically, either Cartesian, or GPS.
ida string identifier for this frame.
originthe origin of this frame, relative to another frame.
timestampthe timestamp of this frame. By default, will be treated as "always most current".

Definition at line 382 of file ReferenceFrame.h.

template<typename P , typename std::enable_if< supports_transform_to< P >::value, void * >::type = nullptr>
gams::pose::ReferenceFrameVersion::ReferenceFrameVersion ( std::shared_ptr< ReferenceFrameIdentity ident,
const ReferenceFrameType type,
P &&  origin,
uint64_t  timestamp = -1 
)
inline

Constructor from an existing ReferenceFrameIdentity, an origin, and optional timestamp.

Typical users should not use this constructor.

Template Parameters
aCoordinate type convertible to Pose
Parameters
identshared_ptr to a ReferenceFrameIdentity, which holds type and id information.
ida string identifier for this frame.
originthe origin of this frame, relative to another frame.
timestampthe timestamp of this frame. By default, will be treated as "always most current".

Definition at line 406 of file ReferenceFrame.h.

Member Function Documentation

bool gams::pose::ReferenceFrameVersion::check_consistent ( ) const
private
static const std::string& gams::pose::ReferenceFrameVersion::default_prefix ( )
inlinestatic

Definition at line 635 of file ReferenceFrame.h.

bool gams::pose::ReferenceFrameVersion::has_id ( ) const
inline

Does this frame have an ID? Frames gain an ID either at construction, or lazily as needed (by having the id() method, or save* methods called).

This method can be useful to prevent, e.g., logging code from incurring the overhead of generating an ID for an ephemeral frame.

Returns
true if this frame already has an ID, false if not

Definition at line 594 of file ReferenceFrame.h.

const std::string& gams::pose::ReferenceFrameVersion::id ( ) const
inline

Get the ID string of this frame.

Generates a random ID for this frame if it doesn't already have one. This ID will not change until this frame is destructed.

Definition at line 582 of file ReferenceFrame.h.

const std::string* gams::pose::ReferenceFrameVersion::id_ptr ( ) const
inline

Get the ID string of this frame.

Will not generate an ID if this frame doesn't have one. In that case, returns nullptr.

Returns
nullptr has_id() is false; otherwise, a pointer to the result of id()

Definition at line 605 of file ReferenceFrame.h.

const ReferenceFrameIdentity& gams::pose::ReferenceFrameVersion::ident ( ) const
inline

Get the ReferenceFrameIdentity object associated with this frame, creating one with random ID if none exists.

Definition at line 420 of file ReferenceFrame.h.

template<typename T >
static uint64_t gams::pose::ReferenceFrameVersion::init_timestamp ( uint64_t  given,
const T &  p 
)
inlinestaticprivate

Definition at line 297 of file ReferenceFrame.h.

ReferenceFrame gams::pose::ReferenceFrameVersion::interpolate ( const ReferenceFrame other,
ReferenceFrame  parent,
uint64_t  time 
) const
inline

Interpolate a frame between the given frame; use the given parent.

Note: no sanity checking is done. Ensure that parent has a compatible timestamp, and that this and other are the same frame at different times.

Parameters
otherthe other frame to interpolate towards.
parentthe parent the returned frame will have.
timethe timestamp to interpolate at.
Returns
the interpolated frame.

Definition at line 900 of file ReferenceFrame.h.

bool gams::pose::ReferenceFrameVersion::interpolated ( ) const
inline

Returns true if this frame was interpolated from two stored frames.

If this frame is itself stored, it will no longer be considered as interpolated.

Definition at line 631 of file ReferenceFrame.h.

std::string gams::pose::ReferenceFrameVersion::key ( const FrameEvalSettings settings = FrameEvalSettings::DEFAULT) const
inline

Returns the key that save() will use to store this frame.

Definition at line 642 of file ReferenceFrame.h.

template<typename ForwardIterator >
static uint64_t gams::pose::ReferenceFrameVersion::latest_common_timestamp ( madara::knowledge::KnowledgeBase &  kb,
ForwardIterator  begin,
ForwardIterator  end,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
)
inlinestatic

Get the latest available timestamp in the knowledge base common to all the given ids.

Will return -1 if no common timestamp is available.

Parameters
kbthe knowledge base to search
beginiterator which derences to std::string
endending iterator
Template Parameters
ForwardIteratora ForwardIterator type such as std::vector::iterator
Returns
the latest timestamp for the id in kb. If timestamp -1 is available, that will be returned.

Definition at line 747 of file ReferenceFrame.h.

template<typename Container >
static uint64_t gams::pose::ReferenceFrameVersion::latest_common_timestamp ( madara::knowledge::KnowledgeBase &  kb,
const Container &  ids,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
)
inlinestatic

Get the latest available timestamp in the knowledge base common to all the given ids.

Will return -1 if no common timestamp is available.

Parameters
kbthe knowledge base to search
containercontainer of std::string
Template Parameters
Containera container type (such as std::vector)
Returns
the latest timestamp for the id in kb. If timestamp -1 is available, that will be returned.

Definition at line 780 of file ReferenceFrame.h.

static uint64_t gams::pose::ReferenceFrameVersion::latest_timestamp ( madara::knowledge::KnowledgeBase &  kb,
const std::string &  id,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
)
static

Get the latest available timestamp in the knowledge base for the given id.

Parameters
kbthe knowledge base to search
idthe id to search for
Returns
the latest timestamp for the id in kb. If timestamp -1 is available, that will be returned.
static ReferenceFrame gams::pose::ReferenceFrameVersion::load ( madara::knowledge::KnowledgeBase &  kb,
const std::string &  id,
uint64_t  timestamp = -1,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
)
static

Load a single ReferenceFrame, by ID and timestamp, interpolated if applicable.

Parameters
idthe ID of the frame to load
timestampif -1, gets the latest frame (no interpolation) Otherwise, gets the frame at a specified timestamp, interpolated necessary.
Returns
the loaded ReferenceFrame, or an invalid frame if none exists.
static ReferenceFrame gams::pose::ReferenceFrameVersion::load_exact ( madara::knowledge::KnowledgeBase &  kb,
const std::string &  id,
uint64_t  timestamp = -1,
uint64_t  parent_timestamp = -1,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
)
static

Load a single ReferenceFrame, by ID and timestamp.

Will not interpolate. Returns an invalid frame if none exists with given ID and timestamp.

Parameters
idthe ID of the frame to load
timestampof frame to load. -1 is matched exactly; it will only return a frame if one with that timestamp exists.
parent_timsteamptimestamp of parent to load. Parent is loaded using load()
Returns
the loaded ReferenceFrame, or an invalid frame if none exists.
template<typename ForwardIterator >
static std::vector<ReferenceFrame> gams::pose::ReferenceFrameVersion::load_tree ( madara::knowledge::KnowledgeBase &  kb,
ForwardIterator  begin,
ForwardIterator  end,
uint64_t  timestamp = -1,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
)
inlinestatic

Load ReferenceFrames, by ID, and their common ancestors.

Will interpolate frames to ensure the returned frames all have a common timestamp.

Template Parameters
aForwardIterator, of item type std::string
Parameters
beginbeginning iterator
endending iterator
timestampif -1, the latest possible tree will be returned. Otherwise, the specified timestamp will be returned.
Returns
a vector of ReferenceFrames, each corresponding to the input IDs, in the same order. If the timestamp specified cannot be satisfied, returns an empty vector.

Definition at line 807 of file ReferenceFrame.h.

template<typename Container >
static std::vector<ReferenceFrame> gams::pose::ReferenceFrameVersion::load_tree ( madara::knowledge::KnowledgeBase &  kb,
const Container &  ids,
uint64_t  timestamp = -1,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
)
inlinestatic

Load ReferenceFrames, by ID, and their common ancestors.

Will interpolate frames to ensure the returned frames all have a common timestamp.

Template Parameters
aContainer, supporting cbegin() and cend(), of item type std::string
Parameters
idsa Container of ids
timestampif -1, the latest possible tree will be returned. Otherwise, the specified timestamp will be returned.
Returns
a vector of ReferenceFrames, each corresponding to the input IDs, in the same order. If the timestamp specified cannot be satisfied, returns an empty vector.

Definition at line 854 of file ReferenceFrame.h.

ReferenceFrame gams::pose::ReferenceFrameVersion::move ( Position  new_origin) const
inline

Creates a new ReferenceFrame with modified origin.

Parameters
new_originthe new origin
Returns
the new ReferenceFrame with new origin

Definition at line 474 of file ReferenceFrame.h.

ReferenceFrame gams::pose::ReferenceFrameVersion::move ( const Position new_origin,
uint64_t  timestamp 
) const
inline

Creates a new ReferenceFrame with modified origin and timestamp.

Parameters
new_originthe new origin
timestampthe new timestamp
Returns
the new ReferenceFrame with new origin and timestamp

Definition at line 507 of file ReferenceFrame.h.

Pose& gams::pose::ReferenceFrameVersion::mut_origin ( )
inline

Gets the origin of this Frame.

Returns
the Pose which is the origin within this frame's parent, or, a Pose within this own frame, with all zeros for coordinates, if this frame has no parent.

Definition at line 454 of file ReferenceFrame.h.

const char* gams::pose::ReferenceFrameVersion::name ( ) const
inline

Returns a human-readable name for the reference frame type.

Returns
the name reference frame type (e.g., GPS, Cartesian)

Definition at line 573 of file ReferenceFrame.h.

bool gams::pose::ReferenceFrameVersion::operator!= ( const ReferenceFrame other) const

Inequality operator.

Parameters
otherthe frame to compare to.
Returns
false if both frames are the same object (i.e., same address). Otherwise, frames are not considered equal (returns true).
bool gams::pose::ReferenceFrameVersion::operator!= ( const ReferenceFrameVersion other) const

Inequality operator.

Parameters
otherthe frame to compare to.
Returns
false if both frames are the same object (i.e., same address). Otherwise, frames are not considered equal (returns true).
bool gams::pose::ReferenceFrameVersion::operator== ( const ReferenceFrame other) const

Equality operator.

Parameters
otherthe frame to compare to.
Returns
true if both frames are the same object (i.e., same address). Otherwise, frames are not considered equal (returns false).
bool gams::pose::ReferenceFrameVersion::operator== ( const ReferenceFrameVersion other) const

Equality operator.

Parameters
otherthe frame to compare to.
Returns
true if both frames are the same object (i.e., same address). Otherwise, frames are not considered equal (returns false).
ReferenceFrame gams::pose::ReferenceFrameVersion::orient ( Orientation  new_origin) const
inline

Creates a new ReferenceFrame with modified origin.

Parameters
new_originthe new origin
Returns
the new ReferenceFrame with new origin

Definition at line 484 of file ReferenceFrame.h.

ReferenceFrame gams::pose::ReferenceFrameVersion::orient ( const Orientation new_origin,
uint64_t  timestamp 
) const
inline

Creates a new ReferenceFrame with modified origin and timestamp.

Parameters
new_originthe new origin
timestampthe new timestamp
Returns
the new ReferenceFrame with new origin and timestamp

Definition at line 519 of file ReferenceFrame.h.

const Pose& gams::pose::ReferenceFrameVersion::origin ( ) const
inline

Gets the origin of this Frame.

Returns
the Pose which is the origin within this frame's parent, or, a Pose within this own frame, with all zeros for coordinates, if this frame has no parent.

Definition at line 443 of file ReferenceFrame.h.

ReferenceFrame gams::pose::ReferenceFrameVersion::origin_frame ( ) const
inline

Gets the parent frame (the one the origin is within).

Will be *this if no parent frame.

Definition at line 528 of file ReferenceFrame.h.

ReferenceFrame gams::pose::ReferenceFrameVersion::pose ( Pose  new_origin) const
inline

Creates a new ReferenceFrame with modified origin.

Parameters
new_originthe new origin
Returns
the new ReferenceFrame with new origin

Definition at line 464 of file ReferenceFrame.h.

ReferenceFrame gams::pose::ReferenceFrameVersion::pose ( const Pose new_origin,
uint64_t  timestamp 
) const
inline

Creates a new ReferenceFrame with modified origin and timestamp.

Parameters
new_originthe new origin
timestampthe new timestamp
Returns
the new ReferenceFrame with new origin and timestamp

Definition at line 495 of file ReferenceFrame.h.

void gams::pose::ReferenceFrameVersion::save ( madara::knowledge::KnowledgeBase &  kb,
uint64_t  expiry,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
) const
inline

Save this ReferenceFrame to the knowledge base, The saved frames will be marked with their timestamp for later retrieval.

If timestamp is -1, it will always be treated as the most recent frame.

Parameters
kbthe KnowledgeBase to store into
expiryuse this expiry time instead of the one set on this ID

Definition at line 657 of file ReferenceFrame.h.

void gams::pose::ReferenceFrameVersion::save ( madara::knowledge::KnowledgeBase &  kb,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
) const
inline

Save this ReferenceFrame to the knowledge base, The saved frames will be marked with their timestamp for later retrieval.

If timestamp is -1, it will always be treated as the most recent frame.

Parameters
kbthe KnowledgeBase to store into

Definition at line 672 of file ReferenceFrame.h.

void gams::pose::ReferenceFrameVersion::save_as ( madara::knowledge::KnowledgeBase &  kb,
std::string  key,
uint64_t  expiry,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
) const

Save this ReferenceFrame to the knowledge base, with a specific key value.

Parameters
kbthe KnowledgeBase to save to
keya key prefix to save with
expiryuse this expiry time instead of the one set on this ID
void gams::pose::ReferenceFrameVersion::save_as ( madara::knowledge::KnowledgeBase &  kb,
std::string  key,
const FrameEvalSettings settings = FrameEvalSettings::DEFAULT 
) const
inline

Save this ReferenceFrame to the knowledge base, with a specific key value.

Parameters
kbthe KnowledgeBase to save to
keya key prefix to save with

Definition at line 882 of file ReferenceFrame.h.

uint64_t gams::pose::ReferenceFrameVersion::timestamp ( ) const
inline

Get the timestamp assigned to this frame.

Definition at line 612 of file ReferenceFrame.h.

ReferenceFrame gams::pose::ReferenceFrameVersion::timestamp ( uint64_t  timestamp) const
inline

Clone the this frame, but with new timestamp.

Returns
the new frame object

Definition at line 621 of file ReferenceFrame.h.

const ReferenceFrameType* gams::pose::ReferenceFrameVersion::type ( ) const
inline

Retrieve the frame type object for this frame.

Mostly useful for comparing to the pose::Cartesian or pose::GPS instances to test what kind of frame this is.

Returns
a pointer to this frames ReferenceFrameType

Definition at line 434 of file ReferenceFrame.h.

Friends And Related Function Documentation

template<typename CoordType >
friend class Coordinate
friend

New coordinate types which are frame-dependant can inherit from this class.

Pass the type of the child class as CoordType

New coordinate types must: – Inherit from Coordinate, and pass itself as template parameter – Inherit from a base class which does not inherit from Coordinate – That base class must: – Have a typedef BaseType which refers to itself – Implement operator== – Implement the following methods: static std::string name() // return the type's name static int size() // return # of values in representation double get(int i) const // return ith value of representation bool operator==(const BaseType &rhs) const BaseType &as_vec() // return *this const BaseType &as_vec() const // return *this

Additionally, new coordinate types should either: – Specialize the ReferenceFrame::*_within_frame templates; OR – Add new overloads for transform_to_origin, transform_from_origin, do_normalize, and calc_distance virtual methods in ReferenceFrame, and add transformation logic for those methods in the various frames

Definition at line 940 of file ReferenceFrame.h.

Member Data Documentation

std::shared_ptr<ReferenceFrameIdentity> gams::pose::ReferenceFrameVersion::ident_
mutableprivate

Definition at line 289 of file ReferenceFrame.h.

bool gams::pose::ReferenceFrameVersion::interpolated_ = false
mutableprivate

Definition at line 293 of file ReferenceFrame.h.

Pose gams::pose::ReferenceFrameVersion::origin_
private

Definition at line 292 of file ReferenceFrame.h.

uint64_t gams::pose::ReferenceFrameVersion::timestamp_ = -1
private

Definition at line 291 of file ReferenceFrame.h.

const ReferenceFrameType* gams::pose::ReferenceFrameVersion::type_
private

Definition at line 290 of file ReferenceFrame.h.


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