|
def | __init__ (self, solver, Manager manager, theParams=ParamPlanner) |
|
def | adapt (self, meaBoard, visibleMask, theImageMea, rLoc_hand=None, COMPLETE_PLAN=True, SAVED_PLAN=True, RUN_SOLVER=True, PLAN_WITH_TRACKBOARD=True) |
|
def | adapt_simulator (self, meaBoard, rLoc_hand=None, COMPLETE_PLAN=True, SAVED_PLAN=True, RUN_SOLVER=True) |
|
def | measure (self, img) |
|
def | process (self, input, rLoc_hand=None, visibleMask=None, theImageMea=None, COMPLETE_PLAN=True, SAVED_PLAN=True, RUN_SOLVER=True, planOnTrack=False) |
|
◆ __init__()
@brief Work like a wrapper of solver & manager in the test script.
Args:
solver: The solver instance.
manager: The manager instance.
theParams: The params.
◆ adapt()
def adapt |
( |
|
self, |
|
|
|
meaBoard, |
|
|
|
visibleMask, |
|
|
|
theImageMea, |
|
|
|
rLoc_hand = None , |
|
|
|
COMPLETE_PLAN = True , |
|
|
|
SAVED_PLAN = True , |
|
|
|
RUN_SOLVER = True , |
|
|
|
PLAN_WITH_TRACKBOARD = True |
|
) |
| |
@brief Update the tracked board/history and generate the action plan for the robot.
Args:
meaBoard: The measured board for the current view. Contains pieces at all the working area (include solution area)
visibleMask: The mask image for the visible area.
theImageMea: The original processed RGB image from the surveillance system.
rLoc_hand: The location of the hand.
COMPLETE_PLAN: Whether to generate the complete plan.
SAVED_PLAN: Use the saved plan (self.plan) or not.
RUN_SOLVER: Run solver or not.
Returns:
plan: The action plan.
◆ adapt_simulator()
def adapt_simulator |
( |
|
self, |
|
|
|
meaBoard, |
|
|
|
rLoc_hand = None , |
|
|
|
COMPLETE_PLAN = True , |
|
|
|
SAVED_PLAN = True , |
|
|
|
RUN_SOLVER = True |
|
) |
| |
@brief Update the tracked board/history and generate the action plan for the robot.
Still with the old pick & place idea (not working on the real cases).
Todo: To be compatible with the old version. Maybe integrated later.
Args:
meaBoard: The measured board for the current view.
visibleMask: The mask image for the visible area.
rLoc_hand: The location of the hand.
COMPLETE_PLAN: Whether to generate the complete plan.
SAVED_PLAN: Use the saved plan (self.plan) or not.
RUN_SOLVER: Run solver or not.
Returns:
plan: The action plan.
◆ measure()
def measure |
( |
|
self, |
|
|
|
img |
|
) |
| |
@brief Process the input image to get the measured board.
Args:
img: The input image.
Returns:
meaBoard: The measured board instance.
◆ process()
def process |
( |
|
self, |
|
|
|
input, |
|
|
|
rLoc_hand = None , |
|
|
|
visibleMask = None , |
|
|
|
theImageMea = None , |
|
|
|
COMPLETE_PLAN = True , |
|
|
|
SAVED_PLAN = True , |
|
|
|
RUN_SOLVER = True , |
|
|
|
planOnTrack = False |
|
) |
| |
@brief Draft the action plan given the measured board.
@note In principle, the process is not triggered by key but should be called every processing time
Args:
input: A measured board or RGB image.
rLoc_hand: The location of the hand.
visibleMask: The mask of the visible area on the table (puzzle included).
theImageMea: The original processed RGB image from the surveillance system.
COMPLETE_PLAN: Whether to plan the whole sequence.
SAVED_PLAN: Use the saved plan (self.plan) or not. NOTE: this option overwrite the COMPLETE_PLAN option.
(i.e. If this is True, then the COMPLETE_PLAN will be set to true)
RUN_SOLVER: Whether to compute the solver to get the next action plan.
Otherwise, only the board will be recognized and updated.
Returns:
plan: The action plan for the simulator to perform
◆ displayBoard
◆ loc_history
◆ manager
◆ params
◆ record
◆ solver
◆ status_history
◆ theManager_intra
The documentation for this class was generated from the following file:
- /home/pvela/python/puzzle_solver/puzzle/simulator/planner.py