2009-12-18 05:23:50 +08:00
|
|
|
/**
|
2010-01-08 23:32:45 +08:00
|
|
|
* @file Pose3Factor.H
|
|
|
|
* @authors Frank Dellaert, Viorela Ila
|
|
|
|
**/
|
2009-12-18 05:23:50 +08:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <map>
|
2010-01-08 23:32:45 +08:00
|
|
|
#include "BetweenFactor.h"
|
2009-12-18 05:23:50 +08:00
|
|
|
#include "Pose3.h"
|
|
|
|
|
|
|
|
namespace gtsam {
|
|
|
|
|
2010-01-10 21:55:55 +08:00
|
|
|
/**
|
|
|
|
* A config specifically for 3D poses
|
|
|
|
*/
|
2010-01-08 23:32:45 +08:00
|
|
|
class Pose3Config: public std::map<std::string, Pose3> {
|
2009-12-18 05:23:50 +08:00
|
|
|
|
2009-12-18 09:24:28 +08:00
|
|
|
public:
|
2009-12-18 05:23:50 +08:00
|
|
|
|
2010-01-08 23:32:45 +08:00
|
|
|
const Pose3& get(std::string key) const {
|
|
|
|
const_iterator it = find(key);
|
|
|
|
if (it == end()) throw std::invalid_argument("invalid key");
|
|
|
|
return it->second;
|
2009-12-18 09:24:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
2009-12-18 05:23:50 +08:00
|
|
|
|
2010-01-10 21:55:55 +08:00
|
|
|
/**
|
|
|
|
* A Factor for 3D pose measurements
|
|
|
|
* This is just a typedef now
|
|
|
|
*/
|
2010-01-08 23:32:45 +08:00
|
|
|
typedef BetweenFactor<Pose3, Pose3Config> Pose3Factor;
|
2009-12-18 05:23:50 +08:00
|
|
|
|
2010-01-08 23:32:45 +08:00
|
|
|
} /// namespace gtsam
|