From 78dd507200e31ef4e6a883f800aae63d9c0d9c89 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Wed, 31 Dec 2025 12:28:04 +0000 Subject: [PATCH] Update last*velocities --- .../src/steering_controllers_library.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/steering_controllers_library/src/steering_controllers_library.cpp b/steering_controllers_library/src/steering_controllers_library.cpp index 4e5b2a9d6c..beae04762e 100644 --- a/steering_controllers_library/src/steering_controllers_library.cpp +++ b/steering_controllers_library/src/steering_controllers_library.cpp @@ -517,9 +517,13 @@ controller_interface::return_type SteeringControllersLibrary::update_reference_f controller_interface::return_type SteeringControllersLibrary::update_and_write_commands( const rclcpp::Time & time, const rclcpp::Duration & period) { - update_odometry(period); auto logger = get_node()->get_logger(); + // store current ref (for open loop odometry) and update odometry + last_linear_velocity_ = reference_interfaces_[0]; + last_angular_velocity_ = reference_interfaces_[1]; + update_odometry(period); + // MOVE ROBOT // Limit velocities and accelerations: