PNP Generation

Generation of PNPs is typically used in conjunction with a planner, with the objective of representing and executing the plan generated by a planner as a PNP.
There are two advantages in using this approach: 1) the plan (i.e., the PNP) can be executed and monitored with the PNP execution engine and thanks to the PNP-ROS bridge it can be easily integrated in a ROS environment; 2) the PNP can be extended and modified for dealing with unexpected situations (not modelled in the planning domain) during the execution of the actions, making the plan more robust for execution in real scenarios. The extension/modification of a PNP can be done either by manually modifying the PNP or by defining a set of execution rules and apply them with the software provided in the present library.

PNPgen is a library included the Petri Net Plans distribution that contains the implementation of several algorithms and functions for the generation of PNPs.

Currently, the following input are supported and transformed into PNPs:
  • Inline plans (see this quick guide)
  • Policies (i.e., transition graphs with non-deterministic and sensing actions)
  • PRU domain description
Work in progress for the integration of:

Part of this work has been developed and tested within the COACHES project.

The following examples show some use of the PNPgen library. All the files needed to reproduce these example are available in PNPgen folder.

Additional References
  • README  file with general info about compiling and running plans

Example 1. DIAG_printer

Linear plan: DIAG_printer.plan

goto_printer; say_hello; goto_home

PNP generated from this plan

Execution rules:

*if* (and personhere closetotarget) *during* goto *do* skip_action
*if* (and personhere (not closetotarget)) *during* goto *do* say_MoveAway; waitfor_freespace; restart_action
*if* obstacle *during* goto *do* lookForPerson; say_MoveObstacle; waitfor_freespace; restart_action
*if* lowbattery *during* goto *do* goto_rechargeStation; fail_plan
*if* (not personhere) *during* say *do* lookForPerson*; restart_action
*if* timeout_lookForPerson *during* lookForPerson *do* goto_home; restart_plan

PNP including the execution rules

Example 2. SimplePolicy


Init: S0
Final: S3
S0 : goto_printer -> { [personhere] S1, [not personhere] S2 }
S1 : say_hello -> { [] S2 }
S2 : goto_home -> { [] S3 }

PNP generated from the policy

Execution rules: same as in Example 1

PNP including the execution rules

Example 3. PRU

Genetration of PNPs from PRUs for the examples descibed in

A practical framework for robust decision-theoretic planning and execution for service robots.
L. Iocchi, L. Jeanpierre, M. T. Lazaro, A.-I. Mouaddib.
International Conference on Automated Planning and Scheduling (ICAPS), London, UK, June 12-17, 2016.

Generation of PNP (pnml file) as described in the paper.
  $ cd PNPgen/test
  $ ../bin/pnpgen_pru icaps16_ex1.xml
See PNPgen README for more details.