From 94a1139c1ee51938951ef081f6942d6603e9928c Mon Sep 17 00:00:00 2001 From: TiaSinghania Date: Thu, 9 Jan 2025 09:59:18 -0800 Subject: [PATCH] published nand gps seqnum --- rb_ws/src/buggy/buggy/serial/ros_to_bnyahaj.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rb_ws/src/buggy/buggy/serial/ros_to_bnyahaj.py b/rb_ws/src/buggy/buggy/serial/ros_to_bnyahaj.py index 292f5a2..974ef87 100644 --- a/rb_ws/src/buggy/buggy/serial/ros_to_bnyahaj.py +++ b/rb_ws/src/buggy/buggy/serial/ros_to_bnyahaj.py @@ -84,6 +84,9 @@ def __init__(self, teensy_name): self.rc_uplink_qual_publisher = self.create_publisher( UInt8, "/debug/rc_uplink_quality", 1 ) + self.nand_gps_seqnum_publisher = self.create_publisher( + Int32, "/debug/NAND_gps_seqnum", 1 + ) # SERIAL DEBUG PUBLISHERS self.roundtrip_time_publisher = self.create_publisher( @@ -105,14 +108,13 @@ def __init__(self, teensy_name): self.nand_gps_acc_publisher = self.create_publisher( Float64, "/debug/gps_accuracy", 1 ) - self.nand_gps_seqnum_publisher = self.create_publisher( - Int32, "/debug/gps_seqnum", 1 - ) + self.nand_gps_time_publisher = self.create_publisher( UInt64, "/debug/gps_time", 1 ) if self.self_name == "SC": + # SC SENSOR PUBLISHERS self.sc_velocity_publisher = self.create_publisher( Float64, "/sensors/velocity", 1 @@ -121,6 +123,7 @@ def __init__(self, teensy_name): Float64, "/sensors/steering_angle", 1 ) + # RADIO DATA PUBLISHER self.observed_nand_odom_publisher = self.create_publisher( Odometry, "/NAND_raw_state", 1 ) @@ -224,7 +227,8 @@ def reader_thread(self): odom.pose.pose.position.x = packet.nand_east_gps odom.pose.pose.position.y = packet.nand_north_gps self.observed_nand_odom_publisher.publish(odom) - self.get_logger().debug(f'Radio Received NAND GPS Seqnum: {packet.gps_seqnum}') + self.nand_gps_seqnum_publisher.publish(packet.gps_seqnum) +