32 std::map<mrpt::system::TTimeStamp, mrpt::poses::CPose3D> old_path;
35 for (
const auto&
p : old_path)
37 m_path[
p.first] =
p.second.asTPose();
77 yaw[0] = p1.second.yaw;
78 pitch[0] = p1.second.pitch;
79 roll[0] = p1.second.roll;
80 yaw[1] = p2.second.yaw;
81 pitch[1] = p2.second.pitch;
82 roll[1] = p2.second.roll;
83 yaw[2] = p3.second.yaw;
84 pitch[2] = p3.second.pitch;
85 roll[2] = p3.second.roll;
86 yaw[3] = p4.second.yaw;
87 pitch[3] = p4.second.pitch;
88 roll[3] = p4.second.roll;
120 td, ts[1], yaw[1], ts[2], yaw[2],
true);
124 td, ts[1],
roll[1], ts[2],
roll[2],
true);
131 math::leastSquareLinearFit<double, decltype(ts), 4>(td, ts, X);
133 math::leastSquareLinearFit<double, decltype(ts), 4>(td, ts, Y);
135 math::leastSquareLinearFit<double, decltype(ts), 4>(td, ts, Z);
137 math::leastSquareLinearFit<double, decltype(ts), 4>(
140 math::leastSquareLinearFit<double, decltype(ts), 4>(
141 td, ts,
pitch,
true);
143 math::leastSquareLinearFit<double, decltype(ts), 4>(
153 math::leastSquareLinearFit<double, decltype(ts), 4>(td, ts, Z);
155 math::leastSquareLinearFit<double, decltype(ts), 4>(
158 math::leastSquareLinearFit<double, decltype(ts), 4>(
159 td, ts,
pitch,
true);
161 math::leastSquareLinearFit<double, decltype(ts), 4>(
171 math::leastSquareLinearFit<double, decltype(ts), 4>(td, ts, Z);
174 math::leastSquareLinearFit<double, decltype(ts), 4>(
175 td, ts,
pitch,
true);
177 math::leastSquareLinearFit<double, decltype(ts), 4>(
184 const double ratio = (td - ts[1]) / (ts[2] - ts[1]);
186 TPose3D(0, 0, 0, yaw[1],
pitch[1],
roll[1]),
187 TPose3D(0, 0, 0, yaw[2],
pitch[2],
roll[2]), ratio, out_interp);
200 const double ratio = (td - ts[1]) / (ts[2] - ts[1]);
202 TPose3D(0, 0, 0, yaw[1],
pitch[1],
roll[1]),
203 TPose3D(0, 0, 0, yaw[2],
pitch[2],
roll[2]), ratio, out_interp);