Main MRPT website > C++ reference
MRPT logo
alloc_keyframe.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2015, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
12 namespace mrpt { namespace srba {
13 
14 /** Append an empty new keyframe to the data structures
15  * \return The ID of the new KF.
16  * \note Runs in O(1)
17  */
18 template <class KF2KF_POSE_TYPE,class LM_TYPE,class OBS_TYPE,class RBA_OPTIONS>
20 {
21  // ==== Assign a free ID to the new KF : O(1) ====
22  const TKeyFrameID new_kf_id = rba_state.keyframes.size();
23 
24  // ==== Create new KF struct: insert at end of std::map<> : O(1) ====
25  rba_state.keyframes.push_back( keyframe_info() );
26  //keyframe_info &kfi_new = rba_state.keyframes.back();
27  return new_kf_id;
28 }
29 
30 
31 } } // end NS
TKeyFrameID alloc_keyframe()
Users normally won't need to call this directly.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Information per key-frame needed for RBA.
Definition: srba_types.h:453
uint64_t TKeyFrameID
Numeric IDs for key-frames (KFs)
Definition: srba_types.h:31



Page generated by Doxygen 1.8.9.1 for MRPT 1.3.0 SVN: at Sun Sep 13 03:55:12 UTC 2015