Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. # Get distance between two Poses
  2. def get_distance(self, a, b):
  3. first = [a.position.x, a.position.y, a.position.z]
  4. second = [b.position.x, b.position.y, b.position.z]
  5. return distance.euclidean(first, second)
  6.  
  7. # distance.euclidean(a.position, b.position) causes the error "unsupported operand type(s) for -: 'Point' and 'Point'"
  8. # distance.euclidean(list(a.position), list(b.position)" causes "'Point' object is not iterable"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement