RussTedrake / manipulation

Course notes for MIT manipulation class
BSD 3-Clause "New" or "Revised" License
411 stars 121 forks source link

update iris test to handle hyperplanes in different order #221

Closed anthonysimeonov closed 1 year ago

anthonysimeonov commented 1 year ago

This change is Reviewable

RussTedrake commented 1 year ago

manipulation/exercises/trajectories/test_taskspace_iris.py line 107 at r1 (raw file):

        # loop through and assign each returned hyperplane to
        # the closest solution hyperplane, based on angle
        # (allows them to be returned in different orders)

seems really complicated. For this problem each A has two columns, right? And we want to check the that the A_pred (normalized row by row) matches A_sol (normalized) up to some permutation of rows? Could you just sort both by e.g. the first column of A and achieve the same thing?

(and I guess A_sol , b_sol could be stored here in the sorted order, rather than sorting every time we run the test)?

anthonysimeonov commented 1 year ago

That's definitely better, updated to reflect this suggestion.