1. tuned arrow mesh drawing

2. centralixzed arrow config in layout.py
3. seperate mesh render and display resolution to speed up (~40 fps)
This commit is contained in:
ykcheungab
2026-06-19 14:28:28 +08:00
parent 3fd9b839a9
commit 2e5c047d1e
19 changed files with 980 additions and 147 deletions
+4 -2
View File
@@ -4,7 +4,7 @@ from __future__ import annotations
from orisys.finger.viewer import UVMeshViewer
from .contact_arrow import ContactArrowOverlay, DEFAULT_NORMAL_FORCE_SCALE
from .contact_arrow import ContactArrowOverlay, ContactArrowStyle, DEFAULT_CONTACT_ARROW_STYLE
class FingerMeshViewer(UVMeshViewer):
@@ -21,7 +21,8 @@ class FingerMeshViewer(UVMeshViewer):
value_max=None,
window_width: int = 1024,
window_height: int = 1024,
normal_force_scale: float = DEFAULT_NORMAL_FORCE_SCALE,
contact_arrow_style: ContactArrowStyle | None = None,
normal_force_scale: float | None = None,
show_contact_arrow: bool = True,
):
super().__init__(
@@ -36,6 +37,7 @@ class FingerMeshViewer(UVMeshViewer):
)
self._contact_arrow = ContactArrowOverlay(
mesh,
style=contact_arrow_style or DEFAULT_CONTACT_ARROW_STYLE,
normal_force_scale=normal_force_scale,
enabled=show_contact_arrow,
)