Class PathPlanner

java.lang.Object
edu.tufts.hrilab.map.PathPlanner

public class PathPlanner extends Object
  • Constructor Details

    • PathPlanner

      public PathPlanner()
  • Method Details

    • getAllPaths

      public static List<List<MapObject>> getAllPaths(FloorMap floorMap, MapObject s, MapObject d)
      gets all paths from source to destination node in a graph
      Parameters:
      s - source node
      d - destination node
      Returns:
      all path options
    • getPathDistanceFromRooms

      public static double getPathDistanceFromRooms(MapObject start, List<MapObject> path)
      computes the distance of a path given a list of rooms that make up the path
      Parameters:
      start - starting location
      path - list of rooms that constitute the path
      Returns:
      distance path travels
    • getShortestDistance

      public static List<MapObject> getShortestDistance(FloorMap floorMap, MapObject src, MapObject dest)
      get shortest path (shortest qualified as lowest number of rooms in path) from room A to room B
      Parameters:
      src - Color of room you are in
      dest - color of destination room
      Returns:
      List of rooms to achieve shortest path
    • getRoomPath

      public static List<MapObject> getRoomPath(FloorMap floorMap, MapObject start, MapObject end)
      gets path from start position to end point
      Parameters:
      start - start location MapObject
      end - end location MapObject
      Returns:
      List of poses to go to to acheive path
    • convertRoomPathToPathActions

      public static List<PathAction> convertRoomPathToPathActions(FloorMap floorMap, List<MapObject> roomPath, boolean canOpenDoors, double padding)
      turns a list of rooms to go to into a list of poses to get there with
      Parameters:
      roomPath - list of MapObjects representing rooms
      padding - how far away from doors to stop
      Returns:
      list of poses representing same path as roomPath