Skip to content

Commit

Permalink
#553 Testing and fix errors for calibration without additional tfs. W…
Browse files Browse the repository at this point in the history
…orking just fine
  • Loading branch information
JorgeFernandes-Git committed Mar 15, 2023
1 parent a996890 commit d8b1c24
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions atom_evaluation/scripts/ground_truth_frame_evaluation
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,26 @@ def argToTargetFrame(arg, train_dataset):
return target_frame

def evaluateSourceFrame(source_frame, train_dataset):
if source_frame in train_dataset['calibration_config']['additional_tfs']:
transform_key = generateKey(train_dataset['calibration_config']['additional_tfs'][source_frame]['parent_link'],
train_dataset['calibration_config']['additional_tfs'][source_frame]['child_link'])
source_child = train_dataset['calibration_config']['additional_tfs'][source_frame]['child_link']

elif source_frame in train_dataset['calibration_config']['sensors']:
transform_key = generateKey(train_dataset['calibration_config']['sensors'][source_frame]['parent_link'],
train_dataset['calibration_config']['sensors'][source_frame]['child_link'])
source_child = train_dataset['calibration_config']['sensors'][source_frame]['child_link']
if checkAdditionalTfs(train_dataset):
if source_frame in train_dataset['calibration_config']['additional_tfs']:
transform_key = generateKey(train_dataset['calibration_config']['additional_tfs'][source_frame]['parent_link'],
train_dataset['calibration_config']['additional_tfs'][source_frame]['child_link'])
source_child = train_dataset['calibration_config']['additional_tfs'][source_frame]['child_link']
elif source_frame in train_dataset['calibration_config']['sensors']:
transform_key = generateKey(train_dataset['calibration_config']['sensors'][source_frame]['parent_link'],
train_dataset['calibration_config']['sensors'][source_frame]['child_link'])
source_child = train_dataset['calibration_config']['sensors'][source_frame]['child_link']
else:
print(f'Source frame {Fore.RED}{source_frame}{Style.RESET_ALL} in not a known frame. Use names matching the ones on the {Fore.RED}config.yaml{Style.RESET_ALL} calibration file')
sys.exit()
else:
print(f'Source frame {Fore.RED}{source_frame}{Style.RESET_ALL} in not a known frame!')
if source_frame in train_dataset['calibration_config']['sensors']:
transform_key = generateKey(train_dataset['calibration_config']['sensors'][source_frame]['parent_link'],
train_dataset['calibration_config']['sensors'][source_frame]['child_link'])
source_child = train_dataset['calibration_config']['sensors'][source_frame]['child_link']
else:
print(f'Source frame {Fore.RED}{source_frame}{Style.RESET_ALL} in not a known frame. Use names matching the ones on the {Fore.RED}config.yaml{Style.RESET_ALL} calibration file')
sys.exit()

return transform_key, source_child

Expand Down

0 comments on commit d8b1c24

Please sign in to comment.