From d52e8f11e2698dbb6ad9c82ec4aa44e6e43ac701 Mon Sep 17 00:00:00 2001
From: Joan Sola <jsola@iri.upc.edu>
Date: Sat, 9 Apr 2022 12:24:29 +0200
Subject: [PATCH] Some sensible tuning

---
 yaml/demo_visual_odometry_euroc.yaml |  5 ++---
 yaml/processor_visual_odometry.yaml  | 10 +++++++---
 yaml/solver.yaml                     |  6 +++---
 yaml/tree_manager_sliding.yaml       |  2 +-
 4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/yaml/demo_visual_odometry_euroc.yaml b/yaml/demo_visual_odometry_euroc.yaml
index 707d1b9..0be3673 100644
--- a/yaml/demo_visual_odometry_euroc.yaml
+++ b/yaml/demo_visual_odometry_euroc.yaml
@@ -3,9 +3,8 @@ config:
   debug:
     profiling: true
     profiling_file: "~/wolf_demo_visual_odometry_profiling.txt"
-    print_problem: false
+    print_problem: true
     print_depth: 2            # only if print_problem
-    print_state: false         # only if print_problem
     print_constr_by: false     # only if print_problem
     print_metric: false        # only if print_problem
     print_state_blocks: false  # only if print_problem
@@ -13,7 +12,7 @@ config:
 
   problem:
     node_rate: 100
-    follow: "tree_manager_full_history.yaml"
+    follow: "tree_manager_sliding.yaml"
     frame_structure: "PO"
     dimension: 3
     prior:
diff --git a/yaml/processor_visual_odometry.yaml b/yaml/processor_visual_odometry.yaml
index c749065..541cf9c 100644
--- a/yaml/processor_visual_odometry.yaml
+++ b/yaml/processor_visual_odometry.yaml
@@ -5,12 +5,16 @@ algorithm:
 klt_params:
     tracker_width: 21
     tracker_height: 21
-    nlevels_pyramids: 3
+    nlevels_pyramids: 2
     klt_max_err: 0.2
 
 fast_params:
     threshold_fast: 30
     non_max_suppresion: true
 
-min_nb_tracks: 200
-max_nb_tracks: 400
+min_nb_tracks: 30
+max_nb_tracks: 50
+
+std_pix: 1
+
+min_track_length_for_landmark: 3
diff --git a/yaml/solver.yaml b/yaml/solver.yaml
index f7d5455..546f3ce 100644
--- a/yaml/solver.yaml
+++ b/yaml/solver.yaml
@@ -1,11 +1,11 @@
 minimizer: "LEVENBERG_MARQUARDT"
 interrupt_on_problem_change: false
-min_num_iterations: 4
+min_num_iterations: 1
 max_num_iterations: 20
 function_tolerance: 1e-7
 gradient_tolerance: 1e-9
 use_nonmonotonic_steps: false
-period: 0.3                     # note: this must be smaller (i.e. faster) than the KF period in processor_tracker_landmark_apriltag.yaml
-n_threads: 2
+period: 0.5                     
+n_threads: 8
 compute_cov: false
 verbose: 0
\ No newline at end of file
diff --git a/yaml/tree_manager_sliding.yaml b/yaml/tree_manager_sliding.yaml
index 6ee8b76..520fde4 100644
--- a/yaml/tree_manager_sliding.yaml
+++ b/yaml/tree_manager_sliding.yaml
@@ -1,6 +1,6 @@
 tree_manager:
   type: TreeManagerSlidingWindow
   n_fix_first_frames: 1
-  n_frames: 15
+  n_frames: 5
   viral_remove_empty_parent: true
 #  type: "none"
\ No newline at end of file
-- 
GitLab