Don't add IMU data to 2D optimization problem. (#1754)
It was constantly added regardless of motion filtering. Since it's not used it can be just ignored. The method still needs to be there to satisfy the interface. Signed-off-by: Michael Grupp <grupp@magazino.eu>master
parent
9675d63926
commit
af00de3b3f
|
@ -175,7 +175,8 @@ OptimizationProblem2D::~OptimizationProblem2D() {}
|
||||||
|
|
||||||
void OptimizationProblem2D::AddImuData(const int trajectory_id,
|
void OptimizationProblem2D::AddImuData(const int trajectory_id,
|
||||||
const sensor::ImuData& imu_data) {
|
const sensor::ImuData& imu_data) {
|
||||||
imu_data_.Append(trajectory_id, imu_data);
|
// IMU data is not used in 2D optimization, so we ignore this part of the
|
||||||
|
// interface.
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptimizationProblem2D::AddOdometryData(
|
void OptimizationProblem2D::AddOdometryData(
|
||||||
|
@ -207,7 +208,7 @@ void OptimizationProblem2D::InsertTrajectoryNode(const NodeId& node_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptimizationProblem2D::TrimTrajectoryNode(const NodeId& node_id) {
|
void OptimizationProblem2D::TrimTrajectoryNode(const NodeId& node_id) {
|
||||||
imu_data_.Trim(node_data_, node_id);
|
empty_imu_data_.Trim(node_data_, node_id);
|
||||||
odometry_data_.Trim(node_data_, node_id);
|
odometry_data_.Trim(node_data_, node_id);
|
||||||
fixed_frame_pose_data_.Trim(node_data_, node_id);
|
fixed_frame_pose_data_.Trim(node_data_, node_id);
|
||||||
node_data_.Trim(node_id);
|
node_data_.Trim(node_id);
|
||||||
|
|
|
@ -94,7 +94,7 @@ class OptimizationProblem2D
|
||||||
return landmark_data_;
|
return landmark_data_;
|
||||||
}
|
}
|
||||||
const sensor::MapByTime<sensor::ImuData>& imu_data() const override {
|
const sensor::MapByTime<sensor::ImuData>& imu_data() const override {
|
||||||
return imu_data_;
|
return empty_imu_data_;
|
||||||
}
|
}
|
||||||
const sensor::MapByTime<sensor::OdometryData>& odometry_data()
|
const sensor::MapByTime<sensor::OdometryData>& odometry_data()
|
||||||
const override {
|
const override {
|
||||||
|
@ -128,7 +128,7 @@ class OptimizationProblem2D
|
||||||
MapById<NodeId, NodeSpec2D> node_data_;
|
MapById<NodeId, NodeSpec2D> node_data_;
|
||||||
MapById<SubmapId, SubmapSpec2D> submap_data_;
|
MapById<SubmapId, SubmapSpec2D> submap_data_;
|
||||||
std::map<std::string, transform::Rigid3d> landmark_data_;
|
std::map<std::string, transform::Rigid3d> landmark_data_;
|
||||||
sensor::MapByTime<sensor::ImuData> imu_data_;
|
sensor::MapByTime<sensor::ImuData> empty_imu_data_;
|
||||||
sensor::MapByTime<sensor::OdometryData> odometry_data_;
|
sensor::MapByTime<sensor::OdometryData> odometry_data_;
|
||||||
sensor::MapByTime<sensor::FixedFramePoseData> fixed_frame_pose_data_;
|
sensor::MapByTime<sensor::FixedFramePoseData> fixed_frame_pose_data_;
|
||||||
std::map<int, PoseGraphInterface::TrajectoryData> trajectory_data_;
|
std::map<int, PoseGraphInterface::TrajectoryData> trajectory_data_;
|
||||||
|
|
Loading…
Reference in New Issue