From 459a916c821db21512e6f5a798f7db4bedbd592c Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 15 Jan 2025 13:48:25 +0100 Subject: [PATCH] update --- nodes/odom_publisher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes/odom_publisher.cpp b/nodes/odom_publisher.cpp index ca8c7bc..16e13d1 100644 --- a/nodes/odom_publisher.cpp +++ b/nodes/odom_publisher.cpp @@ -42,8 +42,8 @@ int main(int argc, char** argv) { // Compute odometry based on subscribed velocity data double dt = (current_time - last_time).toSec(); - double delta_x = (vx * cos(th) - vy * sin(th)) * dt; - double delta_y = (vx * sin(th) + vy * cos(th)) * dt; + double delta_x = (vx * cos(th)) * dt; + double delta_y = (vx * sin(th)) * dt; double delta_th = vth * dt; x += delta_x;