Skip to content

Commit f51cbb5

Browse files
committed
Add a comment block explaining the poses, add the space, numeral, cancel semaphore signals + "TD" referee signal (needed for the driving example)
1 parent ea53799 commit f51cbb5

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

turtlebot4_vision_tutorials/turtlebot4_vision_tutorials/pose_detection.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@
3232

3333
POSE_DETECT_ENABLE = True
3434

35+
# keys:
36+
# (right, left) where each value is the angle with the horiziontal
37+
# quantized into 8 regions
38+
# Human facing camera
39+
#
40+
# R 0 0 L
41+
# 1 7
42+
# O
43+
# 2 +--+--+ 6
44+
# | \|/ |
45+
# 3 | +++ | 5
46+
# | |
47+
# 4 | | 4
48+
# -+ +-
3549
SEMAPHORE_FLAG = {
3650
(4, 7): 'E', (4, 6): 'F', (4, 5): 'G', (2, 3): 'H',
3751
(3, 4): 'A', (2, 4): 'B', (1, 4): 'C', (0, 4): 'D',
@@ -40,6 +54,13 @@
4054
(2, 7): 'Q', (2, 6): 'R', (2, 5): 'S', (1, 0): 'T',
4155
(1, 7): 'U', (0, 5): 'V', (7, 6): 'W', (7, 5): 'X',
4256
(1, 6): 'Y', (5, 6): 'Z',
57+
58+
# Extended semaphore signals
59+
(0, 7): '#', (4, 4): ' ', (1, 5): 'DEL',
60+
61+
# Not official semaphore, but allow the "touchdown" referee signal
62+
# with both arms held vertically above the head
63+
(0, 0): 'TD',
4364
}
4465

4566
# Semaphore letters that indicate to drive left
@@ -66,7 +87,8 @@
6687
FORWARD_LETTERS = [
6788
'T',
6889
'U',
69-
'#'
90+
'#',
91+
'TD',
7092
]
7193

7294
KEYPOINT_DICT = {

0 commit comments

Comments
 (0)