|
IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
|
Priority-driven approach to puzzle solving. More...


Public Member Functions | |
| def | __init__ (self, CfgSolver cfgSolver) |
| Constructor for Priority Solver instance. More... | |
| def | computePlacePlan (self, StatePuzzleScene scene, ImageRGBD rgbd) |
| Computes a custom place plan. More... | |
| def | getNextAction (self, ImageRGBD rgbd=None, StatePuzzleScene scene=None) |
| Return the next action to execute from current solver state. More... | |
| def | getNextOperation (self, StatePuzzleScene scene, ImageRGBD rgbd) |
| Compute the composite priority of each operation and return the operation with highest composite priority. More... | |
| def | reset_solver (self) |
| Reset the solver state and mode. More... | |
| def | updatePriorities (self) |
| Update priorities by snagging from ROS1 dynamic parameter server. More... | |
Public Member Functions inherited from Base | |
| def | checkIDplaceability (self, solID) |
| Checks if piece with solID can be placed must have an adjacent placed piece, or should be on an edge/corner. More... | |
| def | createMeasuredBoard (self, ImageRGBD rgbd, StatePuzzleScene scene, List[int] zones) |
| Take in raw inputs and create (generic) board measurement. More... | |
| def | createSolutionBoard (self, int zone_to_match) |
| Create a solution board based on the zone we want to match against. More... | |
| def | getNextAction (self) |
| Return the next action to execute from current solver state. More... | |
| def | getSequentialPlan (self, measured_board, solution_board, numPieces) |
| Generate a sequential placement plan by sorting matched pieces by solution ID. More... | |
| def | isBoardSolved (self) |
| Check if all puzzle pieces are in place. More... | |
| def | isPieceThere (self, meaPiece, StatePuzzleScene scene) |
| Check if the measured piece is actually present in the scene by analyzing the segmentation mask. More... | |
| def | performMatching (self, Arrangement measured_board, SolutionBoard solution_board) |
| Perform correspondence tracking to find a piece to direct place. More... | |
| def | reset_estimate_board (self) |
| Set the estimate board to all pieces unsolved, based on the solution board. More... | |
| def | updateSolutionRegEstimate (self, StatePuzzleScene scene) |
| Review pieces in solution region and update estimate. More... | |
Public Attributes | |
| dir_place_pty | |
| mode | |
| PIECES_BEFORE_LOOK | |
| place_pty | |
| sort_pty | |
| state | |
| zones_to_estimate | |
Public Attributes inherited from Base | |
| board_estimate | |
| Board estimate from state history. More... | |
| cfgMatching | |
| Correspondences configs. More... | |
| correspondence_tracker | |
| Puzzle piece correspondence tracker. More... | |
| display | |
| Debug display. More... | |
| imRegions | |
| Region definitions for puzzle zones. More... | |
| mode | |
| Higher level mode regulating activities. More... | |
| puzzle_params | |
| Puzzle-specific parameters for arrangement building. More... | |
| reference_board | |
| Solution reference. More... | |
| state | |
| Internal activity state. More... | |
| verbose | |
| Verbosity level. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from Base | |
| int | NUM_ZONES = 4 |
| int | SOL = 5 |
| int | UNORGANIZED = 6 |
Priority-driven approach to puzzle solving.
Each action type is assigned a score with the highest score winning. The scores are established from an action priority specification. The action types are: sort, place, direct place, and look at scene. The look at scene action includes a request for the human worker to move their hand out of the scene.
| def __init__ | ( | self, | |
| CfgSolver | cfgSolver | ||
| ) |
Constructor for Priority Solver instance.
| [in] | cfgSolver | Configuration for the solver, including reference board and parameters. |
Reimplemented from Base.
Reimplemented in Priority_Tending_Solver.
| def computePlacePlan | ( | self, | |
| StatePuzzleScene | scene, | ||
| ImageRGBD | rgbd | ||
| ) |
Computes a custom place plan.
Starts by filling in pieces from most populated zones to least populated zones.
| def getNextAction | ( | self, | |
| ImageRGBD | rgbd = None, |
||
| StatePuzzleScene | scene = None |
||
| ) |
Return the next action to execute from current solver state.
| [in] | rgbd | RGBD image for the current scene. |
| [in] | scene | Current scene state. |
Reimplemented in Priority_Tending_Solver, and Permute_Solver.
| def getNextOperation | ( | self, | |
| StatePuzzleScene | scene, | ||
| ImageRGBD | rgbd | ||
| ) |
Compute the composite priority of each operation and return the operation with highest composite priority.
| [in] | rgbd | RGBD image for the current scene. |
| [in] | scene | Current scene state. |
Reimplemented in Priority_Tending_Solver, and Permute_Solver.
| def reset_solver | ( | self | ) |
Reset the solver state and mode.
Reimplemented from Base.
Reimplemented in Priority_Tending_Solver, and Permute_Solver.
| def updatePriorities | ( | self | ) |
Update priorities by snagging from ROS1 dynamic parameter server.
| dir_place_pty |
| mode |
| PIECES_BEFORE_LOOK |
| place_pty |
| sort_pty |
| state |
| zones_to_estimate |