GAMS  1.4.0
ReferenceFrame.h File Reference

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

#include "gams/GamsExport.h"
#include "gams/CPP11_compat.h"
#include <vector>
#include <string>
#include <cstring>
#include <sstream>
#include <utility>
#include <memory>
#include <stdexcept>
#include <mutex>
#include "ReferenceFrameFwd.h"
#include "CartesianFrame.h"
#include "Pose.h"
#include "Quaternion.h"
#include "madara/knowledge/EvalSettings.h"
#include "gams/exceptions/ReferenceFrameException.h"
#include "ReferenceFrame.inl"

Go to the source code of this file.

Classes

class  gams::pose::FrameStore
 Class for storing and loading frames in a given KnowledgeBase, using given settings, with a set expiry. More...
 
class  gams::pose::ReferenceFrameArena
 
class  gams::pose::ReferenceFrameIdentity
 For internal use. More...
 
class  gams::pose::ReferenceFrameVersion
 For internal use. More...
 
class  gams::pose::undefined_transform
 Thrown when an attempt is made to transform between two frame types, and there's not transform defined. More...
 
class  gams::pose::unrelated_frames
 Thrown when an an attempt is made to transform between frames that do not belong to the same frame tree. More...
 

Namespaces

 gams
 Contains all GAMS-related tools, classes and code.
 
 gams::pose
 Provides position and orientation primitives.
 
 gams::pose::impl
 Private implementation details.
 
 gams::pose::simple_rotate
 For internal use.
 

Functions

double gams::pose::simple_rotate::calc_angle (const ReferenceFrameType *self, double rx1, double ry1, double rz1, double rx2, double ry2, double rz2)
 Calculates smallest angle between two AngularVectors. More...
 
void gams::pose::default_normalize_angular (const ReferenceFrameType *, double &, double &, double &)
 Returns a default normalized angular. More...
 
void gams::pose::default_normalize_linear (const ReferenceFrameType *, double &, double &, double &)
 Returns a default normalized positional. More...
 
void gams::pose::default_normalize_pose (const ReferenceFrameType *self, double &x, double &y, double &z, double &rx, double &ry, double &rz)
 Returns a default normalized pose. More...
 
GAMS_EXPORT const ReferenceFrame * gams::pose::find_common_frame (const ReferenceFrame *from, const ReferenceFrame *to, std::vector< const ReferenceFrame * > *to_stack=nullptr)
 Helper function to find the common frame between two frames. More...
 
 gams::pose::MADARA_MAKE_VAL_SUPPORT_TEST (nano_timestamp, x,(x.nanos(), x.nanos(0UL)))
 Type trait to detect stamped types. More...
 
static std::string & gams::pose::impl::make_kb_key (std::string &prefix, const std::string &id)
 
static std::string & gams::pose::impl::make_kb_key (std::string &prefix, const std::string &id, uint64_t timestamp)
 
static std::string & gams::pose::impl::make_kb_key (std::string &prefix, uint64_t timestamp)
 
void gams::pose::simple_rotate::orient_linear_vec (double &x, double &y, double &z, double rx, double ry, double rz, bool reverse=false)
 Rotates a LinearVector according to a AngularVector. More...
 
void gams::pose::simple_rotate::transform_angular_from_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double orx, double ory, double orz, double &rx, double &ry, double &rz)
 Transform AngularVector in-place from its origin frame. More...
 
void gams::pose::simple_rotate::transform_angular_to_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double orx, double ory, double orz, double &rx, double &ry, double &rz)
 Transform AngularVector in-place into its origin frame from this frame. More...
 
void gams::pose::simple_rotate::transform_pose_from_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double ox, double oy, double oz, double orx, double ory, double orz, double &x, double &y, double &z, double &rx, double &ry, double &rz, bool fixed)
 Transform pose in-place from its origin frame Simply applies linear and angular transforms independantly. More...
 
void gams::pose::simple_rotate::transform_pose_to_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double ox, double oy, double oz, double orx, double ory, double orz, double &x, double &y, double &z, double &rx, double &ry, double &rz, bool fixed)
 Transform pose in-place into its origin frame from this frame. More...
 
uint64_t gams::pose::try_get_nano_time (uint64_t def)
 Base case: return default. More...
 
template<typename T , typename... Args>
auto gams::pose::try_get_nano_time (uint64_t def, const T &, Args &&... args) -> typename std::enable_if<!supports_nano_timestamp< T >::value, uint64_t >::type
 If T doesn't support nanos(), recurse to remaining args. More...
 
template<typename T , typename... Args>
auto gams::pose::try_get_nano_time (uint64_t, const T &v, Args &&...) -> typename std::enable_if< supports_nano_timestamp< T >::value, uint64_t >::type
 If T supports nanos(), call it and return value. More...
 

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 base reference Frame class

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 forward declarations for ReferenceFrame objects

Definition in file ReferenceFrame.h.