Update encoder_odom_publisher.py

This commit is contained in:
bjoernellens1 2025-01-16 11:29:46 +01:00 committed by GitHub
parent da1e43f7b9
commit 3eb3410094
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,6 +98,15 @@ class EncoderOdometry:
odom.twist.twist.linear.x = v
odom.twist.twist.angular.z = omega
# Include Covariance Matrix
# Include covariance
odom_normalized.pose.covariance = [0.01, 0, 0, 0, 0, 0,
0, 0.01, 0, 0, 0, 0,
0, 0, 0.01, 0, 0, 0,
0, 0, 0, 0.01, 0, 0,
0, 0, 0, 0, 0.01, 0,
0, 0, 0, 0, 0, 0.01]
# Publish odometry to /odom_new
rospy.logdebug("Publishing Odometry message.")
self.odom_pub.publish(odom)