diff --git a/predicators/spot_utils/perception/object_perception.py b/predicators/spot_utils/perception/object_perception.py index 4fc9b89340..4898f4bc84 100644 --- a/predicators/spot_utils/perception/object_perception.py +++ b/predicators/spot_utils/perception/object_perception.py @@ -197,13 +197,11 @@ def vlm_predicate_batch_classify( # Update the atoms with the results if get_dict: + # Return all ground atoms with True/False/None return {atom: result for atom, result in zip(atoms, results)} else: - hold_atoms = set() - for atom, result in zip(atoms, results): - if result: - hold_atoms.add(atom) - return hold_atoms + # Only return True ground atoms + return {atom for atom, result in zip(atoms, results) if result} def get_vlm_atom_combinations(objects: Sequence[Object], diff --git a/predicators/spot_utils/skills/spot_find_objects.py b/predicators/spot_utils/skills/spot_find_objects.py index 824a6a4eb8..fb7083cffb 100644 --- a/predicators/spot_utils/skills/spot_find_objects.py +++ b/predicators/spot_utils/skills/spot_find_objects.py @@ -90,7 +90,7 @@ def _find_objects_with_choreographed_moves( for atom, result in vlm_atom_dict.items(): if all_vlm_atom_dict[atom] is None and result is not None: all_vlm_atom_dict[atom] = result - print(f"Calculated VLM atoms: {all_vlm_atom_dict}") + print(f"Calculated VLM atoms: {dict(all_vlm_atom_dict)}") else: # No VLM predicates or no objects found yet pass