Skip to content

francescodelduchetto/PetriNetPlans

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Petri Net Plans

This repository contains Petri Net Plans library, PNP ROS bridge and some sample applications. More information on the PNP web site: pnp.dis.uniroma1.it

This master branch contains up-to-date development, with hydro/indigo version of PNPros.

Look for ROS-groovy branch for ROS groovy version of PNPros.

How to install and run

Please follow this order.

  1. Compile and install PNP (see PNP/README.txt)

  2. Compile and test pnp_ros and rp_action (see PNPros/README.txt)

These packages have been tested with Ubuntu 12.04 + ROS hydro, Ubuntu 14.04 + ROS indigo, Ubuntu 16.04 + ROS Kinetic.

If you encounter and problem, please contact one of the maintainers (e.g., iocchi@dis.uniroma1.it)

How to use variables in PNP

In PNP, there is the possibility to instantiate parametric plans (i.e., plans that contain variables).

In PNP variables are represented with a string starting with the @ character.

For example, it is possible to define a plan GoTo_@X_@Y_@Theta where the three variables @X, @Y, and @Theta are instatiated at run time.

In order to instatiate variables, we need to create a transition with a condition containing the variables name (e.g., "start [GoTo_@X_@Y_@Theta]" where the condition is [GoTo_@X_@Y_@Theta]).

At this point, every time PNP receives an event of the form GoTo_instance1_instance2_instance3, it will instatiate the variables with the instances provided (in this case X=instance1, Y=instance2, Theta=instance3).

From this point on, the global variables can be used in the plan (for example in execution nodes, such as in a node called "GoTo_@X_@Y_@Theta.exec").

Finally, to modify the variables' value just reinstantiate them as previously explained.

Test commit

About

Petri Net Plans library and applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 75.2%
  • Python 15.9%
  • CMake 8.0%
  • Yacc 0.4%
  • Shell 0.3%
  • C 0.1%
  • Assembly 0.1%