Improvements in odometry kinematics

This commit is contained in:
Alexander Lampalzer 2022-06-08 23:42:43 +02:00
parent 4a9367629f
commit b3eb01ad6e

View file

@ -63,10 +63,10 @@ OdometryController::OdometryController() {
// Forward and Rotational velocity have already been integrated.
auto dist_forward = (distance_right + distance_left) / 2.0;
auto dist_rot = (distance_right + distance_left) / ROBOT_ARBOR_LENGTH_M;
auto dist_rot = (distance_right - distance_left) / ROBOT_ARBOR_LENGTH_M;
auto x = dist_forward * -sin(dist_rot);
auto y = dist_forward * cos(dist_rot);
auto x = dist_forward * cos(dist_rot);
auto y = dist_forward * sin(dist_rot);
auto theta = dist_rot;
auto new_x_position = current_odometry.get_x_position();