Program Listing for File map-update.h

Return to documentation for file (common/vio-common/include/vio-common/map-update.h)


#include <memory>
#include <vio-common/vio-types.h>

namespace vio {

struct MapUpdate {

  // Map update states.
  int64_t timestamp_ns;
  EstimatorState vio_state;
  UpdateType map_update_type;
  std::shared_ptr<const SynchronizedNFrame> keyframe;

  // TODO(nico): find a nice way of making this one const as well (ctor maybe)
  Eigen::Matrix<int64_t, 1, Eigen::Dynamic> imu_timestamps;
  Eigen::Matrix<double, 6, Eigen::Dynamic> imu_measurements;

  ViNodeState vinode;
  ViNodeCovariance vinode_covariance;

  // Localization update states.
  common::LocalizationState localization_state;
  aslam::Transformation T_G_M;

  // TODO(nico): find a way of checking imu validity as well
  // NOTE(mfehr): we need to make this check independent of whether there is a
  // visual keyframe or not if we want to support mapping without vision.
  inline bool check() const {
    return static_cast<bool>(keyframe);

}  // namespace vio