26 std::cout <<
"Nr iterations: " <<
iterations <<
'\n' 30 <<
"error: " <<
error << std::endl;
36 std::cout <<
" smoother lag: " <<
smootherLag_ << std::endl;
48 for(
const auto& key_timestamp: timestamps) {
50 KeyTimestampMap::iterator keyIter =
keyTimestampMap_.find(key_timestamp.first);
55 std::pair<TimestampKeyMap::iterator,TimestampKeyMap::iterator>
range =
timestampKeyMap_.equal_range(keyIter->second);
56 TimestampKeyMap::iterator timeIter = range.first;
57 while(timeIter->second != key_timestamp.first) {
63 timestampKeyMap_.insert(TimestampKeyMap::value_type(key_timestamp.second, key_timestamp.first));
65 keyIter->second = key_timestamp.second;
70 timestampKeyMap_.insert(TimestampKeyMap::value_type(key_timestamp.second, key_timestamp.first));
83 if(iter->second ==
key) {
108 keys.push_back(
iter->second);
116 TimestampKeyMap::const_iterator begin =
timestampKeyMap_.upper_bound(timestamp);
118 keys.push_back(
iter->second);
const gtsam::Symbol key('X', 0)
void updateKeyTimestampMap(const KeyTimestampMap &newTimestamps)
size_t iterations
The number of optimizer iterations performed.
std::map< Key, double > KeyTimestampMap
Typedef for a Key-Timestamp map/database.
size_t linearVariables
The number of variables that must keep a constant linearization point.
double error
The final factor graph error.
KeyTimestampMap keyTimestampMap_
double getCurrentTimestamp() const
iterator iter(handle obj)
size_t intermediateSteps
The number of intermediate steps performed within the optimization. For L-M, this is the number of la...
void eraseKeyTimestampMap(const KeyVector &keys)
virtual void print(const std::string &s="FixedLagSmoother:\, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
size_t nonlinearVariables
The number of variables that can be relinearized.
KeyVector findKeysAfter(double timestamp) const
const KeyTimestampMap & timestamps() const
TimestampKeyMap timestampKeyMap_
Double_ range(const Point2_ &p, const Point2_ &q)
static EIGEN_DEPRECATED const end_t end
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
bool equal(const T &obj1, const T &obj2, double tol)
std::uint64_t Key
Integer nonlinear key type.
virtual bool equals(const FixedLagSmoother &rhs, double tol=1e-9) const
KeyVector findKeysBefore(double timestamp) const