feat: add fps/landmark debugging
This commit is contained in:
19
main.py
19
main.py
@@ -199,7 +199,7 @@ def run(name: str, map_name: str, ref_min_distance: float):
|
||||
vis_manager.update_display()
|
||||
vis_manager.pause(0.2)
|
||||
|
||||
last_proc_times = proc_time[-10:]
|
||||
last_proc_times = proc_time[-30:]
|
||||
print(F"\nImage #{i}")
|
||||
print("Average FPS:", 1 / last_proc_times.mean())
|
||||
print("Pilot coords:", pilot.pos)
|
||||
@@ -278,6 +278,20 @@ def parse_args():
|
||||
help='Минимальное расстояние между эталонами'
|
||||
)
|
||||
|
||||
# Место проведения симуляции
|
||||
parser.add_argument(
|
||||
'--debug-fps',
|
||||
action='store_true',
|
||||
help='Включить отладку FPS'
|
||||
)
|
||||
|
||||
# Место проведения симуляции
|
||||
parser.add_argument(
|
||||
'--debug-landmark',
|
||||
action='store_true',
|
||||
help='Включить отладку эталонов'
|
||||
)
|
||||
|
||||
# Парсим аргументы
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -298,6 +312,9 @@ if __name__ == "__main__":
|
||||
lon: float = args.lon
|
||||
rmd: float = args.ref_min_distance
|
||||
|
||||
constants.DEBUG_FPS = args.debug_fps
|
||||
constants.DEBUG_LANDMARK = args.debug_landmark
|
||||
|
||||
if mode == 'build' or mode == 'standalone':
|
||||
build(name, ref, lat, lon)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user