NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
loc_pose_factor.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 #ifndef GRAPH_FACTORS_LOC_POSE_FACTOR_H_
20 #define GRAPH_FACTORS_LOC_POSE_FACTOR_H_
21 
22 #include <gtsam/geometry/Pose3.h>
23 #include <gtsam/slam/PriorFactor.h>
24 
25 namespace gtsam {
26 // Allows for differentiation between loc pose factors and other pose priors, perhaps
27 // added as starting priors or marginalization factors
28 class LocPoseFactor : public PriorFactor<Pose3> {
29  private:
30  typedef PriorFactor<Pose3> Base;
31 
32  public:
33  typedef typename boost::shared_ptr<LocPoseFactor> shared_ptr;
34 
36 
37  virtual ~LocPoseFactor() {}
38 
39  LocPoseFactor(Key key, const Pose3& prior, const SharedNoiseModel& model = nullptr) : Base(key, prior, model) {}
40 
41  LocPoseFactor(Key key, const Pose3& prior, const Matrix& covariance) : Base(key, prior, covariance) {}
42 
43  private:
46  template <class ARCHIVE>
47  void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
48  ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
49  }
50 };
51 } // namespace gtsam
52 
53 #endif // GRAPH_FACTORS_LOC_POSE_FACTOR_H_
gtsam::LocPoseFactor::LocPoseFactor
LocPoseFactor(Key key, const Pose3 &prior, const SharedNoiseModel &model=nullptr)
Definition: loc_pose_factor.h:39
gtsam::LocPoseFactor::LocPoseFactor
LocPoseFactor(Key key, const Pose3 &prior, const Matrix &covariance)
Definition: loc_pose_factor.h:41
gtsam::LocPoseFactor::shared_ptr
boost::shared_ptr< LocPoseFactor > shared_ptr
Definition: loc_pose_factor.h:33
gtsam::LocPoseFactor
Definition: loc_pose_factor.h:28
gtsam
Definition: cumulative_factor.h:26
gtsam::LocPoseFactor::access
friend class boost::serialization::access
Serialization function.
Definition: loc_pose_factor.h:45
gtsam::LocPoseFactor::~LocPoseFactor
virtual ~LocPoseFactor()
Definition: loc_pose_factor.h:37
gtsam::LocPoseFactor::LocPoseFactor
LocPoseFactor()
Definition: loc_pose_factor.h:35