Incorrect comment at PathPlanning/HybridAStar/Car.py
TripodNet opened this issue · 1 comments
TripodNet commented
Describe the bug
Comment content of return value inside rectangle_check function is incorrect.
Expected behavior
def rectangle_check(x, y, yaw, ox, oy):
# transform obstacles to base link frame
rot = rot_mat_2d(yaw)
for iox, ioy in zip(ox, oy):
tx = iox - x
ty = ioy - y
converted_xy = np.stack([tx, ty]).T @ rot
rx, ry = converted_xy[0], converted_xy[1]
if not (rx > LF or rx < -LB or ry > W / 2.0 or ry < -W / 2.0):
return False # no collision --> should be changed to # colllision
return True # collision --> should be changed to # no colllision
Screenshots
Location 1 should be # collision and location 2 should be # no collision.

Desktop (please complete the following information):
- Python 3.10
- WIN10 22H2
AtsushiSakai commented
PR is wellcome