fix path errors
This commit is contained in:
@@ -7,6 +7,10 @@ from pathlib import Path
|
||||
import numpy as np
|
||||
|
||||
DEFAULT_FINGER_VIZ_POSE = "sensors/finger/assets/visualization/world_to_cam.npy"
|
||||
_LEGACY_FINGER_VIZ_POSES = {
|
||||
"assets/finger/visualization/world_to_cam.npy",
|
||||
DEFAULT_FINGER_VIZ_POSE,
|
||||
}
|
||||
|
||||
|
||||
def _finger_bundle_viz_pose_candidates() -> list[Path]:
|
||||
@@ -63,8 +67,9 @@ def resolve_viz_pose_path(path: str | Path | None = None) -> Path:
|
||||
here = Path(__file__).resolve()
|
||||
candidates: list[Path] = []
|
||||
|
||||
# Prefer the sensors/finger bundle for the default (and matching relative) path.
|
||||
if path is None or raw.as_posix() == DEFAULT_FINGER_VIZ_POSE or not raw.is_absolute():
|
||||
# Prefer the sensors/finger bundle for default / legacy relative paths.
|
||||
posix = raw.as_posix()
|
||||
if path is None or posix in _LEGACY_FINGER_VIZ_POSES or not raw.is_absolute():
|
||||
candidates.extend(_finger_bundle_viz_pose_candidates())
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user