pyrobosim.navigation.occupancy_grid.OccupancyGrid.has_straight_line_connection

OccupancyGrid.has_straight_line_connection(pointA, pointB)

Checks if 2 points can be connected in a straight line.

Parameters:
  • pointA ((int, int)) – The source point in the grid

  • pointB ((int, int)) – The destination point in the grid

Returns:

(True, last_point) if pointA can be connected to pointB, else (False, last_point), last_point is the last point that can be reached from the source in a straight line towards the destination. If pointA and pointB are connectable last_point will be pointB.

Return type:

(bool, (int, int))