Task planning
mir_task_planning generates task plan using classical planner.
This module provides
ros independent wrapping for planners (currently
mercury
andlama
) in/common/planner_wrapper/
.Based on the
planner
requested, 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
/ros
folder. The ros wrapper is implemented as anActionServer
.Upon request from an
ActionClient
containingdomain_file
,problem_file
,planner
andmode
, the server tries to plan with those provided configuration and returns aCompletePlan
.domain_file
- file path of domain file (it should be a.pddl
file)problem_file
- file path of problem file (it should be a.pddl
file)planner
- name of planner to use (lama
ormercury
)mode
-PlanGoal.NORMAL
orPlanGoal.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++-multilib
is needed to install these packages.
Usage
Without ROS
python planner_wrapper.py
With 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.launch
andros/test/upload_problem
can be used for testing whole planning pipeline without Refbox. This launch file will act as refbox, refbox client and refbox parser. It reads a.pddl
problem 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/pddl
contains 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.py
is running standalone.