mirror of
https://github.com/bjoernellens1/cps_rmp220_support.git
synced 2025-01-18 23:56:59 +00:00
Update encoder_odom_publisher.py
This commit is contained in:
parent
877eaa1e13
commit
e687300e88
@ -4,7 +4,7 @@ import rospy
|
|||||||
import tf
|
import tf
|
||||||
from nav_msgs.msg import Odometry
|
from nav_msgs.msg import Odometry
|
||||||
from std_msgs.msg import Header
|
from std_msgs.msg import Header
|
||||||
from segway_msgs.msg import EncoderTicks # Replace with actual message type
|
from segway_msgs.msg import ticks_fb # Correct message import
|
||||||
import math
|
import math
|
||||||
|
|
||||||
class EncoderOdometry:
|
class EncoderOdometry:
|
||||||
@ -28,8 +28,8 @@ class EncoderOdometry:
|
|||||||
self.odom_pub = rospy.Publisher("/odom_new", Odometry, queue_size=10)
|
self.odom_pub = rospy.Publisher("/odom_new", Odometry, queue_size=10)
|
||||||
self.odom_broadcaster = tf.TransformBroadcaster()
|
self.odom_broadcaster = tf.TransformBroadcaster()
|
||||||
|
|
||||||
# ROS subscriber
|
# ROS subscriber to /ticks_fb topic
|
||||||
rospy.Subscriber("/ticks_fb", EncoderTicks, self.ticks_callback)
|
rospy.Subscriber("/ticks_fb", ticks_fb, self.ticks_callback)
|
||||||
|
|
||||||
rospy.spin()
|
rospy.spin()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user