Interbotix / interbotix_ros_toolboxes

Support-level ROS Packages for Interbotix Robots
BSD 3-Clause "New" or "Revised" License
29 stars 68 forks source link

Crash on get_set_landmarks function in Landmark #36

Closed wermthib closed 2 years ago

wermthib commented 2 years ago

When I first ran the nav_to_landmark script, I got an error TypeError: unhashable type: 'Landmark'.

By looking at the log file and the code, the line that threw the error is this one

def get_set_landmarks(self):
        """returns the list of seen landmarks

        :return: list of seen landmarks in the Collection
        :rtype: list of Landmarks
        """
        return set([l for l in self.data.values() if l.tf_set_])

I don't know why Landmark is not hashable on my pc, but I replaced set with list to fix the issue and it worked fine.

lukeschmitt-tr commented 2 years ago

@wermthib Thanks for reporting this!

Please see if the changes in 82ded8c solve the issue. The changes haven't been merged into main yet, so just replace landmarks.py with the file on the devel branch.

wermthib commented 2 years ago

@LSinterbotix Yes it works! Thanks!