From c314bb90a21a7280ef4e97e6e61f01e857b137b6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 15 Jan 2025 13:58:13 +0100 Subject: [PATCH] update --- nodes/odom_publisher.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nodes/odom_publisher.cpp b/nodes/odom_publisher.cpp index 23a2382..e323d55 100644 --- a/nodes/odom_publisher.cpp +++ b/nodes/odom_publisher.cpp @@ -82,4 +82,13 @@ int main(int argc, char** argv) { // Set the velocity odom.child_frame_id = "base_link"; - odom.twist.twist + odom.twist.twist.linear.x = vx; + odom.twist.twist.linear.y = 0.0; // No lateral velocity + odom.twist.twist.angular.z = vth; + + odom_pub.publish(odom); + + last_time = current_time; + r.sleep(); + } +}