Package edu.tufts.hrilab.map
Class PathPlanner
java.lang.Object
edu.tufts.hrilab.map.PathPlanner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 withgetAllPaths
(FloorMap floorMap, MapObject s, MapObject d) gets all paths from source to destination node in a graphstatic double
getPathDistanceFromRooms
(MapObject start, List<MapObject> path) computes the distance of a path given a list of rooms that make up the pathgetRoomPath
(FloorMap floorMap, MapObject start, MapObject end) gets path from start position to end pointgetShortestDistance
(FloorMap floorMap, MapObject src, MapObject dest) get shortest path (shortest qualified as lowest number of rooms in path) from room A to room B
-
Constructor Details
-
PathPlanner
public PathPlanner()
-
-
Method Details
-
getAllPaths
gets all paths from source to destination node in a graph- Parameters:
s
- source noded
- destination node- Returns:
- all path options
-
getPathDistanceFromRooms
computes the distance of a path given a list of rooms that make up the path- Parameters:
start
- starting locationpath
- list of rooms that constitute the path- Returns:
- distance path travels
-
getShortestDistance
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 indest
- color of destination room- Returns:
- List of rooms to achieve shortest path
-
getRoomPath
gets path from start position to end point- Parameters:
start
- start location MapObjectend
- 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 roomspadding
- how far away from doors to stop- Returns:
- list of poses representing same path as roomPath
-