Skip to content

Commit

Permalink
fixed single gps callback -set last_pose instead of last msg
Browse files Browse the repository at this point in the history
  • Loading branch information
nehakankanala committed Apr 2, 2024
1 parent 6229e0c commit c9efc2f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/localization/gps_linearization.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,10 @@ def single_gps_callback(self, msg: NavSatFix):
if not self.use_dop_covariance:
msg.position_covariance = self.config_gps_covariance



print("using single callback")
# print("using single callback")

if self.last_imu_msg is not None:
self.last_gps_msg = self.get_linearized_pose_in_world(msg, self.last_imu_msg, self.ref_coord)
self.last_pose = self.get_linearized_pose_in_world(msg, self.last_imu_msg, self.ref_coord)
self.publish_pose()


Expand All @@ -97,8 +95,7 @@ def duo_gps_callback(self, right_gps_msg: NavSatFix, left_gps_msg: NavSatFix):
:param msg: The NavSatFix message containing GPS data that was just received
TODO: Handle invalid PVTs
"""

print("using duo gps")
# print("using duo gps")
if np.any(np.isnan([right_gps_msg.latitude, right_gps_msg.longitude, right_gps_msg.altitude])):
return
if np.any(np.isnan([left_gps_msg.latitude, left_gps_msg.longitude, left_gps_msg.altitude])):
Expand Down

0 comments on commit c9efc2f

Please sign in to comment.