Skip to content

Commit 9241f80

Browse files
committed
Add limb_names to map limb ID to a human-readable string
1 parent a99253c commit 9241f80

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

df3d/skeleton_fly.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ class Tracked(Enum):
9494
9,
9595
]
9696

97+
limb_names = [
98+
"RF_leg",
99+
"RM_leg",
100+
"RH_leg",
101+
"R_antenna",
102+
"stripe",
103+
"LF_leg",
104+
"LM_leg",
105+
"LH_leg",
106+
"L_antenna",
107+
"stripe",
108+
]
109+
97110
__limb_visible_left = [
98111
True,
99112
True,
@@ -220,6 +233,8 @@ def is_limb_visible_mid(limb_id):
220233

221234

222235
def camera_see_limb(camera_id, limb_id):
236+
if isinstance(limb_id, str):
237+
limb_id = limb_names.index(limb_id)
223238
if camera_id < 3:
224239
return is_limb_visible_left(limb_id)
225240
elif camera_id == 3:

0 commit comments

Comments
 (0)