How would you apply standard data structures and algorithms to solve a robotics engineering problem?
Implement a shortest-path solver for a rectangular occupancy grid using standard algorithmic techniques. Cells with 0 are traversable, and cells with 1 are blocked. Return a shortest four-directional path from start to goal, inclusive, or an empty list if no path exists.
Function: def shortest_path(grid, start, goal)
Input shapes: grid is a non-empty list of equal-length row lists, and start and goal are [row, column] lists. The output is a list of [row, column] lists.
def shortest_path(grid, start, goal):