Fix concurrent access of current groups
This commit is contained in:
@@ -42,7 +42,7 @@ class LidarCache():
|
||||
# Batch over scans, so we don't need to do our own batching to determine groups
|
||||
# TODO: Implement custom batching, as iter_scans can be unreliable
|
||||
for scan in self.lidar.iter_scans(min_len=self.measurements):
|
||||
print('Got %d measurments' % (len(scan)))
|
||||
print('Got %d measurements' % (len(scan)))
|
||||
if len(scan) < self.measurements:
|
||||
# Poor scan, likely since it was the first scan.
|
||||
continue
|
||||
@@ -90,7 +90,8 @@ class LidarCache():
|
||||
@property
|
||||
def current_scan(self):
|
||||
pointScan = tracker_pb.PointScan()
|
||||
for group in self.currentGroups:
|
||||
tempGroups = self.currentGroups
|
||||
for group in tempGroups:
|
||||
for point in group.get_points():
|
||||
pointScan.points.append(tracker_pb.Point(
|
||||
angle=point[1], distance=point[2], group_number=group.number))
|
||||
|
||||
Reference in New Issue
Block a user