Skip to content

Commit

Permalink
fix EKF + PF config issues; fix PF NN bug in reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
misko committed Nov 4, 2024
1 parent 3c085b7 commit 01a8651
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 74 deletions.
128 changes: 60 additions & 68 deletions spf/model_training_and_inference/models/ekf_and_pf_config.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,60 @@
run_EKF_single_theta_single_radio:
phi_std: [20, 10.0, 5.0, 2.5,1.0]
p: [10.0, 5.0, 2.5, 1.0,0.5,0.1]
noise_std: [0.1, 0.01, 0.001, 0.0001,0.00001,0.0005,0.0002]
dynamic_R: [0.0]

run_EKF_single_theta_single_radio:
phi_std: [0.0]
p: [10.0, 5.0, 2.5, 1.0,0.5,0.1]
noise_std: [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.0005,0.0002]
dynamic_R: [1.0, 0.1]


run_EKF_single_theta_dual_radio:
phi_std: [20, 14,12,10.0,8, 5.0, 2.5,1.0]
p: [10.0, 5.0, 2.5, 1.0, 0.5, 0.1]
noise_std: [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.0005,0.0002]
dynamic_R: [0.0]

run_EKF_single_theta_dual_radio:
phi_std: [0.0]
p: [10.0, 5.0, 2.5, 1.0, 0.5, 0.1]
noise_std: [0.1, 0.01, 0.001, 0.0001,0.00001, 0.0005, 0.0002]
dynamic_R: [1.0,0.1]


#run_EKF_xy_dual_radio:
# phi_std: [10.0, 5.0, 2.5, 1.0]
# p: [10.0, 5.0, 2.5, 1.0]
# noise_std: [20.0, 10.0, 5.0]
# dynamic_R: [0.0]
#
#run_EKF_xy_dual_radio:
# p: [10.0, 5.0, 2.5, 1.0]
# noise_std: [20.0, 10.0, 5.0]
# dynamic_R: [1.0]

run_PF_single_theta_single_radio:
N: [128, 128 * 4, 128 * 8, 128 * 16]
theta_err: [0.1, 0.01, 0.001, 0.0001, 0.2, 0.002,0.0005, 0.05, 0.02, 0.075]
theta_dot_err: [0.001, 0.0001, 0.01, 0.1,0.2, 0.002, 0.0005]

run_PF_single_theta_dual_radio:
N: [128, 128 * 4, 128 * 8, 128 * 16]
theta_err: [0.1, 0.01, 0.001,0.0001, 0.2,0.002,0.0005, 0.05, 0.02, 0.075]
theta_dot_err: [0.001, 0.0001, 0.01, 0.1,0.2, 0.002, 0.0005]

#run_PF_xy_dual_radio:
# N: [128, 128 * 4, 128 * 8, 128 * 16, 128 * 32]
# pos_err: [1000, 100, 50, 30, 15, 5, 0.5]
# vel_err: [50, 5, 0.5, 0.05, 0.01, 0.001]


run_PF_single_theta_single_radio_NN:
config_fn: ["/home/mouse9911/gits/spf/nov2_checkpoints/paired_checkpoints_inputdo0p3/config.yml"]
checkpoint_fn: ["/home/mouse9911/gits/spf/nov2_checkpoints/paired_checkpoints_inputdo0p3/best.pth"]
inference_cache: ["/mnt/4tb_ssd/inference_cache/"]
N: [128, 128 * 4, 128 * 8, 128 * 16]
theta_err: [0.1, 0.01, 0.001, 0.0001, 0.2, 0.002,0.0005, 0.05, 0.02, 0.075]
theta_dot_err: [0.001, 0.0001, 0.01, 0.1,0.2, 0.002, 0.0005]

run_PF_single_theta_dual_radio_NN:
config_fn: ["/home/mouse9911/gits/spf/nov2_checkpoints/paired_checkpoints_inputdo0p3/config.yml"]
checkpoint_fn: ["/home/mouse9911/gits/spf/nov2_checkpoints/paired_checkpoints_inputdo0p3/best.pth"]
inference_cache: ["/mnt/4tb_ssd/inference_cache/"]
N: [128, 128 * 4, 128 * 8, 128 * 16]
theta_err: [0.1, 0.01, 0.001,0.0001, 0.2,0.002,0.0005, 0.05, 0.02, 0.075]
theta_dot_err: [0.001, 0.0001, 0.01, 0.1,0.2, 0.002, 0.0005]
runs:
- run_EKF_single_theta_single_radio:
phi_std: [20, 10.0, 5.0, 2.5,1.0]
p: [10.0, 5.0, 2.5, 1.0,0.5,0.1]
noise_std: [0.1, 0.01, 0.001, 0.0001,0.00001,0.0005,0.0002]
dynamic_R: [0.0]
- run_EKF_single_theta_single_radio:
phi_std: [0.0]
p: [10.0, 5.0, 2.5, 1.0,0.5,0.1]
noise_std: [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.0005,0.0002]
dynamic_R: [1.0, 0.1]
- run_EKF_single_theta_dual_radio:
phi_std: [20, 14,12,10.0,8, 5.0, 2.5,1.0]
p: [10.0, 5.0, 2.5, 1.0, 0.5, 0.1]
noise_std: [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.0005,0.0002,0.000001]
dynamic_R: [0.0]
- run_EKF_single_theta_dual_radio:
phi_std: [0.0]
p: [10.0, 5.0, 2.5, 1.0, 0.5, 0.1]
noise_std: [0.1, 0.01, 0.001, 0.0001,0.00001, 0.0005, 0.0002,0.000001]
dynamic_R: [1.0,0.1]
- run_PF_single_theta_single_radio:
N: [128, 128 * 4, 128 * 8, 128 * 16, 128 * 32]
theta_err: [0.1, 0.01, 0.001, 0.0001, 0.2, 0.002,0.0005, 0.05, 0.02, 0.075]
theta_dot_err: [0.001, 0.0001, 0.01, 0.1,0.2, 0.002, 0.0005]
- run_PF_single_theta_dual_radio:
N: [128, 128 * 4, 128 * 8, 128 * 16, 128 * 32]
theta_err: [0.1, 0.01, 0.001,0.0001, 0.2,0.002,0.0005, 0.05, 0.02, 0.075]
theta_dot_err: [0.001, 0.0001, 0.01, 0.1,0.2, 0.002, 0.0005]
- run_PF_single_theta_single_radio_NN:
config_fn: ["/home/mouse9911/gits/spf/nov2_checkpoints/paired_checkpoints_inputdo0p3/config.yml"]
checkpoint_fn: ["/home/mouse9911/gits/spf/nov2_checkpoints/paired_checkpoints_inputdo0p3/best.pth"]
inference_cache: ["/mnt/4tb_ssd/inference_cache/"]
N: [128, 128 * 4, 128 * 8, 128 * 16, 128 * 32]
theta_err: [0.1, 0.01, 0.001, 0.0001, 0.2, 0.002,0.0005, 0.05, 0.02, 0.075]
theta_dot_err: [0.001, 0.0001, 0.01, 0.1,0.2, 0.002, 0.0005]
- run_PF_single_theta_dual_radio_NN:
config_fn: ["/home/mouse9911/gits/spf/nov2_checkpoints/paired_checkpoints_inputdo0p3/config.yml"]
checkpoint_fn: ["/home/mouse9911/gits/spf/nov2_checkpoints/paired_checkpoints_inputdo0p3/best.pth"]
inference_cache: ["/mnt/4tb_ssd/inference_cache/"]
N: [128, 128 * 4, 128 * 8, 128 * 16, 128 * 32]
theta_err: [0.1, 0.01, 0.001,0.0001, 0.2,0.002,0.0005, 0.05, 0.02, 0.075]
theta_dot_err: [0.001, 0.0001, 0.01, 0.1,0.2, 0.002, 0.0005]

#run_PF_xy_dual_radio:
# N: [128, 128 * 4, 128 * 8, 128 * 16, 128 * 32]
# pos_err: [1000, 100, 50, 30, 15, 5, 0.5]
# vel_err: [50, 5, 0.5, 0.05, 0.01, 0.001]


#run_EKF_xy_dual_radio:
# phi_std: [10.0, 5.0, 2.5, 1.0]
# p: [10.0, 5.0, 2.5, 1.0]
# noise_std: [20.0, 10.0, 5.0]
# dynamic_R: [0.0]
#
#run_EKF_xy_dual_radio:
# p: [10.0, 5.0, 2.5, 1.0]
# noise_std: [20.0, 10.0, 5.0]
# dynamic_R: [1.0]
12 changes: 6 additions & 6 deletions spf/scripts/run_filters_on_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def run_PF_single_theta_dual_radio_NN(
metrics["runtime"] = time.time() - start_time
return [
{
"type": "PF_single_theta_dual_radio",
"type": "PF_single_theta_dual_radio_NN",
"theta_err": theta_err,
"theta_dot_err": theta_dot_err,
"N": N,
Expand Down Expand Up @@ -379,11 +379,12 @@ def config_to_job_params(config):
return jobs


def config_to_jobs(config):
def config_to_jobs(list_config):
jobs = []
for fn_key, fn_config in config.items():
fn = fn_key_to_fn[fn_key]
jobs += [(fn, job_params) for job_params in config_to_job_params(fn_config)]
for config in list_config["runs"]:
for fn_key, fn_config in config.items():
fn = fn_key_to_fn[fn_key]
jobs += [(fn, job_params) for job_params in config_to_job_params(fn_config)]
return jobs


Expand Down Expand Up @@ -478,7 +479,6 @@ def get_parser():

random.seed(args.seed)
random.shuffle(jobs_per_ds_fn)

# one job per dataset
# jobs = [
# {
Expand Down

0 comments on commit 01a8651

Please sign in to comment.