32 explicit Odometry(
size_t velocity_rolling_window_size = 10);
34 bool update(
double left_vel,
double right_vel,
const rclcpp::Duration & dt);
35 void updateOpenLoop(
double linear,
double angular,
const rclcpp::Duration & dt);
38 double getX()
const {
return x_; }
39 double getY()
const {
return y_; }
40 double getHeading()
const {
return heading_; }
41 double getLinear()
const {
return linear_; }
42 double getAngular()
const {
return angular_; }
44 void setWheelParams(
double wheel_separation,
double wheel_radius);
45 void setVelocityRollingWindowSize(
size_t velocity_rolling_window_size);
48 using RollingMeanAccumulator = rcppmath::RollingMeanAccumulator<double>;
50 void integrateRungeKutta2(
double linear,
double angular);
51 void integrateExact(
double linear,
double angular);
52 void resetAccumulators();
68 size_t velocity_rolling_window_size_;
69 RollingMeanAccumulator linear_accumulator_;
70 RollingMeanAccumulator angular_accumulator_;