Task planning
mir_task_planning generates task plan using classical planner.
This module provides
ros independent wrapping for planners (currently
mercuryandlama) in/common/planner_wrapper/.Based on the
plannerrequested, this module executes a shell command as mentioned in config file (see Configuration). This generates a bunch of files in/tmp/plan/directory. The wrapper parses the most optimal plan file and returns as a list of string. Remaining files are deleted for a fresh start for next request.ros wrapper on top of the previously mentioned module is available in
/rosfolder. The ros wrapper is implemented as anActionServer.Upon request from an
ActionClientcontainingdomain_file,problem_file,plannerandmode, the server tries to plan with those provided configuration and returns aCompletePlan.domain_file- file path of domain file (it should be a.pddlfile)problem_file- file path of problem file (it should be a.pddlfile)planner- name of planner to use (lamaormercury)mode-PlanGoal.NORMALorPlanGoal.FAST(fast mode implies that first plan found will be returned. No further optimisation will be performed by the planner.Note
This should only be use when a small number of goals are provided as it will produce a very bad and non optimal plan.
Requirements
-
Note
g++-multilibis needed to install these packages.
Usage
Without ROS
python planner_wrapper.pyWith ROS
roscore roslaunch mir_task_planning task_planner.launch roslaunch mir_task_planning task_planner_client_test.launch
Configuration
# shell commands to execute planners
planner_commands:
# all CAPS words will be replaced in the code
mercury:
command: 'timeout TIMELIMIT EXECUTABLE DOMAIN PROBLEM FILENAME'
rospkg_name: 'mercury_planner'
executable_path: 'build/Mercury-fixed/seq-sat-mercury/plan'
lama:
command: 'EXECUTABLE --search-time-limit TIMELIMIT --alias seq-sat-lama-2011 --plan-file FILENAME DOMAIN PROBLEM'
rospkg_name: 'lama_planner'
executable_path: 'fast-downward/fast-downward.py'
Additional files
ros/launch/upload_problem.launchandros/test/upload_problemcan be used for testing whole planning pipeline without Refbox. This launch file will act as refbox, refbox client and refbox parser. It reads a.pddlproblem file and uploads instances and facts to knowledge base. To test the whole planning pipeline without refbox, following things need to be executedroscore roslaunch mir_planning_core task_planning_components.launch rosrun mir_task_executor task_executor_mockup roslaunch mir_task_planning upload_problem.launch roslaunch mir_planning_core task_planning_sm.launch
common/pddlcontains robocup’s domain file and a bunch of problem files for testing.Note
This folder is needed by default if
common/planner_wrapper/planner_wrapper.pyis running standalone.