38 explicit Odometry(
size_t velocity_rolling_window_size = 10);
41 void init(
const rclcpp::Time & time);
43 "Replaced by bool update_from_pos(double left_pos, double right_pos, double "
45 bool update(
double left_pos,
double right_pos,
const rclcpp::Time & time);
47 "Replaced by bool update_from_vel(double left_vel, double right_vel, double "
49 bool updateFromVelocity(
double left_vel,
double right_vel,
const rclcpp::Time & time);
51 "Replaced by bool try_update_open_loop(double linear_vel, double angular_vel, double "
53 void updateOpenLoop(
double linear,
double angular,
const rclcpp::Time & time);
55 bool update_from_pos(
double left_pos,
double right_pos,
double dt);
56 bool update_from_vel(
double left_vel,
double right_vel,
double dt);
57 bool try_update_open_loop(
double linear_vel,
double angular_vel,
double dt);
58 void setOdometry(
double x,
double y,
double heading);
59 [[deprecated(
"Use setOdometry(0.0, 0.0, 0.0) instead")]]
void resetOdometry();
61 double getX()
const {
return x_; }
62 double getY()
const {
return y_; }
63 double getHeading()
const {
return heading_; }
64 double getLinear()
const {
return linear_; }
65 double getAngular()
const {
return angular_; }
67 void setWheelParams(
double wheel_separation,
double left_wheel_radius,
double right_wheel_radius);
68 void setVelocityRollingWindowSize(
size_t velocity_rolling_window_size);
72#if RCPPUTILS_VERSION_MAJOR >= 2 && RCPPUTILS_VERSION_MINOR >= 6
73 using RollingMeanAccumulator = rcpputils::RollingMeanAccumulator<double>;
75 using RollingMeanAccumulator = rcppmath::RollingMeanAccumulator<double>;
78 [[deprecated(
"Replaced by void integrate(double linear_vel, double angular_vel, double dt).")]]
79 void integrateRungeKutta2(
double linear,
double angular);
80 [[deprecated(
"Replaced by void integrate(double linear_vel, double angular_vel, double dt).")]]
81 void integrateExact(
double linear,
double angular);
83 void integrate(
double linear_vel,
double angular_vel,
double dt);
84 void resetAccumulators();
87 rclcpp::Time timestamp_;
99 double wheel_separation_;
100 double left_wheel_radius_;
101 double right_wheel_radius_;
104 double left_wheel_old_pos_;
105 double right_wheel_old_pos_;
108 size_t velocity_rolling_window_size_;
109 RollingMeanAccumulator linear_accumulator_;
110 RollingMeanAccumulator angular_accumulator_;