Skip to content

Commit

Permalink
Fixed covariance issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Buggy committed Apr 3, 2023
1 parent 950f198 commit 67cee23
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rb_ws/src/buggy/scripts/auton/autonsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self, trajectory, controller, brake_controller) -> None:
"auton/debug/distance", Float64, queue_size=1
)

self.auton_rate = 1000
self.auton_rate = 100
self.rosrate = rospy.Rate(self.auton_rate)

self.tick_caller()
Expand All @@ -94,7 +94,8 @@ def tick_caller(self):
(self.msg.pose.covariance[0] ** 2 + self.msg.pose.covariance[7] ** 2 > 1**2)):
# Covariance larger than one meter. We definitely can't trust the pose
rospy.sleep(0.001)

print("Waiting for Covariance to be better: ", rospy.get_rostime())
print("done checking covariance")
while (not rospy.is_shutdown()): # start the actual control loop
self.tick()
self.ticks += 1
Expand Down Expand Up @@ -156,7 +157,7 @@ def tick(self):
print("\n\nStarting Controller: " + str(arg_ctrl) + "\n\n")
print("\n\nStarting at distance: " + str(arg_start_dist) + "\n\n")

trajectory = Trajectory("/rb_ws/src/buggy/paths/buggycourse_safe_1.json")
trajectory = Trajectory("/rb_ws/src/buggy/paths/frew_parkinglot_1.json")
# calculate starting index
start_index = trajectory.get_index_from_distance(start_dist)

Expand Down

0 comments on commit 67cee23

Please sign in to comment.