9 m_positionHistory(200) {}
22 newPositionPoint.
speed = speedMillimeterPerSec;
23 newPositionPoint.
position = positionMillimeter;
43 newPositionPoint.
speed = speedMillimeterPerSec;
48 rclcpp::Duration timeIntervalNanoseconds = timestamp - lastPositionPoint.
timestamp;
49 double speed = (lastPositionPoint.
speed + speedMillimeterPerSec) / 2.f;
50 double drivenDistanceMillimeter = timeIntervalNanoseconds.nanoseconds() * speed / 1000000000.f;
53 std::shared_ptr<CarPose> lastPose = std::make_shared<CarPose>();
54 lastPose->orientation = lastPositionPoint.
orientation;
56 double orientationDiff = orientationRad - lastPositionPoint.
orientation;
71 Eigen::Rotation2Df lastOrientationRotMat(-lastPositionPoint.
orientation);
73 Eigen::Rotation2Df orientationDiffRotMat(-orientationDiff);
74 drivenDistanceVector = orientationDiffRotMat * drivenDistanceVector;
76 newPositionPoint.
position = lastPositionPoint.
position + drivenDistanceVector;
79 log_debug(
"[LOCALIZER] Position: ", newPositionPoint.
position[0],
",", newPositionPoint.
position[1],
"; Orientation: ", orientationRad);