From d7358d9b1b2d2227c0301a55edf407ed81627ef5 Mon Sep 17 00:00:00 2001 From: Michael Boulet Date: Wed, 3 Feb 2016 17:40:45 -0500 Subject: [PATCH] twist (velocity) in odometry message should be in the child (vehicle) coordinate frame --- vesc_ackermann/src/vesc_to_odom.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vesc_ackermann/src/vesc_to_odom.cpp b/vesc_ackermann/src/vesc_to_odom.cpp index f7fd86e..95c5abe 100644 --- a/vesc_ackermann/src/vesc_to_odom.cpp +++ b/vesc_ackermann/src/vesc_to_odom.cpp @@ -105,9 +105,9 @@ void VescToOdom::vescStateCallback(const vesc_msgs::VescStateStamped::ConstPtr& odom->pose.covariance[7] = 0.2; ///< y odom->pose.covariance[35] = 0.4; ///< yaw - // Velocity - odom->twist.twist.linear.x = x_dot; - odom->twist.twist.linear.y = y_dot; + // Velocity ("in the coordinate frame given by the child_frame_id") + odom->twist.twist.linear.x = current_speed; + odom->twist.twist.linear.y = 0.0; odom->twist.twist.angular.z = current_angular_velocity; // Velocity uncertainty