aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/utils/tobii_stream_arcube_display.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/argaze/utils/tobii_stream_arcube_display.py b/src/argaze/utils/tobii_stream_arcube_display.py
index 8224d4a..255961a 100644
--- a/src/argaze/utils/tobii_stream_arcube_display.py
+++ b/src/argaze/utils/tobii_stream_arcube_display.py
@@ -23,14 +23,13 @@ def main():
parser.add_argument('-t', '--tobii_ip', metavar='TOBII_IP', type=str, default=None, help='tobii glasses ip')
parser.add_argument('-c', '--camera_calibration', metavar='CAM_CALIB', type=str, default=None, help='json camera calibration filepath')
parser.add_argument('-p', '--aruco_tracker_configuration', metavar='TRACK_CONFIG', type=str, default=None, help='json aruco tracker configuration filepath')
- parser.add_argument('-ac', '--aruco_cube', metavar='ARUCO_CUBE', type=str, help='json arcube description filepath')
- parser.add_argument('-to', '--tolerance', metavar='TOLERANCE', type=float, default=1, help='arcube face pose estimation tolerance')
+ parser.add_argument('-ac', '--aruco_cube', metavar='ARUCO_CUBE', type=str, help='json aruco_cube description filepath')
parser.add_argument('-w', '--window', metavar='DISPLAY', type=bool, default=True, help='enable window display', action=argparse.BooleanOptionalAction)
args = parser.parse_args()
# Load ArUcoCube
- arcube = ArUcoCube.ArUcoCube(args.aruco_cube)
- arcube.print_cache()
+ aruco_cube = ArUcoCube.ArUcoCube(args.aruco_cube)
+ aruco_cube.print_cache()
# Create tobii controller (with auto discovery network process if no ip argument is provided)
print('\nLooking for a Tobii Glasses Pro 2 device ...')
@@ -64,14 +63,14 @@ def main():
raise UserWarning('.json camera calibration filepath required. Use -c option.')
# Create aruco tracker
- aruco_tracker = ArUcoTracker.ArUcoTracker(arcube.dictionary, arcube.marker_size, aruco_camera)
+ aruco_tracker = ArUcoTracker.ArUcoTracker(aruco_cube.dictionary, aruco_cube.marker_size, aruco_camera)
# Load specific configuration file
if args.aruco_tracker_configuration != None:
aruco_tracker.load_configuration_file(args.aruco_tracker_configuration)
- print(f'ArUcoTracker configuration for markers detection:')
+ print(f'\nArUcoTracker configuration for markers detection:')
aruco_tracker.print_configuration()
# Init head pose tracking
@@ -140,17 +139,17 @@ def main():
raise UserWarning('No marker detected')
# Estimate cube pose from tracked markers
- valid = arcube.estimate_pose(aruco_tracker.get_tracked_markers())
+ valid = aruco_cube.estimate_pose(aruco_tracker.get_tracked_markers())
# Draw markers pose estimation
aruco_tracker.draw_tracked_markers(visu_frame.matrix)
# Draw cube pose estimation
- arcube.draw(visu_frame.matrix, aruco_camera.get_K(), aruco_camera.get_D())
+ aruco_cube.draw(visu_frame.matrix, aruco_camera.get_K(), aruco_camera.get_D())
# Warn about cube pose validity
if not valid:
-
+
raise UserWarning('Cube pose is not validated.')
# Pose estimation error