From 2977f0dd0c27dd3d9639a39289b68917b4ae1d64 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 7 Nov 2024 21:20:27 -0500 Subject: [PATCH] Rm imported GreedyESP depending on cholesky utils. --- examples/g2o_experiment.py | 11 +++-------- mac/solvers/__init__.py | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/examples/g2o_experiment.py b/examples/g2o_experiment.py index df28510..9b9c240 100644 --- a/examples/g2o_experiment.py +++ b/examples/g2o_experiment.py @@ -6,7 +6,7 @@ from pose_graph_utils import split_edges, read_g2o_file, plot_poses, rpm_to_mac, RelativePoseMeasurement, poses_ate_tran, poses_rpe_rot # MAC requirements -from mac.solvers import MAC, NaiveGreedy, GreedyESP +from mac.solvers import MAC, NaiveGreedy from mac.utils.graphs import Edge from mac.utils.rounding import round_madow @@ -272,6 +272,7 @@ def to_sesync_format(measurements): # Make a GreedyEig Solver if run_greedy: + from mac.solvers.greedy_esp import GreedyESP greedy_esp = GreedyESP(odom_edges, lc_edges, num_poses, lazy=True) ############################# @@ -334,14 +335,8 @@ def to_sesync_format(measurements): # point solution every time. madow_times.append(solve_time + (end - start) - rtime) - # Solve the relaxed maximum algebraic connectivity augmentation problem. + # Solve the greedy k-edge selection problem if run_greedy: - # start = timer() - # greedy_eig_result, _ = greedy_eig.subset(num_lc) - # end = timer() - # greedy_eig_times.append(end - start) - # greedy_eig_results.append(greedy_eig_result) - num_lcs = [int(pct_lc * len(lc_measurements)) for pct_lc in percent_lc] greedy_esp_results, _, greedy_esp_times = greedy_esp.subsets_lazy(num_lcs, verbose=True) pass diff --git a/mac/solvers/__init__.py b/mac/solvers/__init__.py index a8bad2c..b54ea33 100644 --- a/mac/solvers/__init__.py +++ b/mac/solvers/__init__.py @@ -1,3 +1,2 @@ from .mac import MAC from .baseline import NaiveGreedy -from .greedy_esp import GreedyESP