added mesh surface arrows
This commit is contained in:
@@ -87,35 +87,6 @@ class FingerPipeline:
|
||||
if self.runtime is not None:
|
||||
self.runtime.tactile.reset()
|
||||
|
||||
def _read_frame_view(self, tactile, unrolled) -> FingerFrameView:
|
||||
fps, flow, vnormal, depth_map, centroid, fnormal, fshearx, fsheary = tactile.read_info(
|
||||
tactile.info.FPS,
|
||||
tactile.info.VRAW,
|
||||
tactile.info.VNORMAL,
|
||||
tactile.info.DEPTH,
|
||||
tactile.info.CENTROID,
|
||||
tactile.info.FNORMAL,
|
||||
tactile.info.FSHEARX,
|
||||
tactile.info.FSHEARY,
|
||||
)
|
||||
return FingerFrameView(
|
||||
timestamp=time.time() - self._start_time,
|
||||
fps=float(fps),
|
||||
unrolled=unrolled,
|
||||
flow=flow,
|
||||
vnormal=vnormal,
|
||||
depth_map=depth_map,
|
||||
img=np.array([]),
|
||||
contour=np.array([]),
|
||||
centroid=centroid,
|
||||
fnormal=float(fnormal),
|
||||
fshearx=float(fshearx),
|
||||
fsheary=float(fsheary),
|
||||
centroid_found=bool(tactile.raw_sensor.centroid_found),
|
||||
mask_coverage=float(tactile.mask_stats["coverage"]),
|
||||
raw_frame=tactile.frame,
|
||||
)
|
||||
|
||||
def tick(self) -> FingerFrameView | None:
|
||||
frame, _timings = self.tick_timed()
|
||||
return frame
|
||||
@@ -165,7 +136,11 @@ class FingerPipeline:
|
||||
self.profiler.record("contact", timings.contact_ms)
|
||||
|
||||
t0 = time.perf_counter()
|
||||
view = self._read_frame_view(tactile, unrolled)
|
||||
view = FingerFrameView.from_tactile(
|
||||
tactile,
|
||||
unrolled,
|
||||
timestamp=time.time() - self._start_time,
|
||||
)
|
||||
timings.read_info_ms = (time.perf_counter() - t0) * 1000.0
|
||||
if profile:
|
||||
self.profiler.record("read_info", timings.read_info_ms)
|
||||
|
||||
Reference in New Issue
Block a user