perf(simulation): reuse support surface within an observation
This commit is contained in:
@@ -119,10 +119,11 @@ class TerrainObservation:
|
||||
request['body_contact_height_m'], monitor=self.monitor)
|
||||
physical = points.copy()
|
||||
ground_at = time.monotonic()
|
||||
self.support_obstacles.revalidate(points, pose, request['body_contact_height_m'],
|
||||
monitor=self.monitor)
|
||||
# Both checks use the same immutable terrain and pose in this transaction.
|
||||
surface = self.support_obstacles.revalidate(points, pose, request['body_contact_height_m'],
|
||||
monitor=self.monitor)
|
||||
self.support_obstacles.observe_ahead(points, pose, request['body_contact_height_m'],
|
||||
monitor=self.monitor, speed_mps=float(request['max_speed_mps']))
|
||||
monitor=self.monitor, speed_mps=float(request['max_speed_mps']), surface=surface)
|
||||
support_at = time.monotonic()
|
||||
candidates = self.detections.observed(request)
|
||||
ground = current[ground[:,3] == 1]
|
||||
|
||||
Reference in New Issue
Block a user