Skip to content

Commit bd034fd

Browse files
committed
Auto-detect Android correctly in sai-cli process
1 parent a6677c0 commit bd034fd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

python/cli/process/process.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def define_args(parser):
1414
parser.add_argument("--distance_quantile", help="Max point distance filter quantile (0 = disabled)", type=float, default=0.99)
1515
parser.add_argument("--key_frame_distance", help="Minimum distance between keyframes (meters)", type=float, default=0.05)
1616
parser.add_argument('--no_icp', action='store_true')
17-
parser.add_argument('--device_preset', choices=['none', 'oak-d', 'k4a', 'realsense', 'android-tof', 'ios-tof', 'orbbec-astra2', 'orbbec-femto'], help="Automatically detected in most cases")
17+
parser.add_argument('--device_preset', choices=['none', 'oak-d', 'k4a', 'realsense', 'android', 'android-tof', 'ios-tof', 'orbbec-astra2', 'orbbec-femto'], help="Automatically detected in most cases")
1818
parser.add_argument('--fast', action='store_true', help='Fast but lower quality settings')
1919
parser.add_argument('--mono', action='store_true', help='Monocular mode: disable ToF and stereo data')
2020
parser.add_argument('--image_format', type=str, default='jpg', help="Color image format (use 'png' for top quality)")
@@ -474,13 +474,13 @@ def detect_device_preset(input_dir):
474474
vioConfigYaml = f"{input_dir}/vio_config.yaml"
475475
if os.path.exists(vioConfigYaml):
476476
with open(vioConfigYaml) as file:
477+
supported = ['oak-d', 'k4a', 'realsense', 'orbbec-astra2', 'orbbec-femto', 'android', 'android-tof']
477478
for line in file:
478479
if "parameterSets" in line:
479-
if "oak-d" in line: device = "oak-d"
480-
if "k4a" in line: device = "k4a"
481-
if "realsense" in line: device = "realsense"
482-
if "orbbec-astra2" in line: device = "orbbec-astra2"
483-
if "orbbec-femto" in line: device = "orbbec-femto"
480+
for d in supported:
481+
if d in line:
482+
device = d
483+
break
484484
if device: break
485485
return (device, cameras)
486486

0 commit comments

Comments
 (0)