IMPORTANT: This repository only has support for ROS1 now, ROS2 support may come along at some point, feel free to contribute with a PR.
git submodule update --init --recursive
RoboCup manager based on Petri Net Plans, running with ROS Noetic.
Exhaustive documentation available there
"Petri Net Plans (PNP) is a formalism for high level description of complex plans (i.e., set of actions interacting in a complex way). PNP is useful to program cognitive agents (such as robots, video game agents, multi-robot/multi-agent systems, etc.)."
Example of a Petri Net from PNP Documentation:
Two principle parts are necessary to make it work on a real world task:
- Petri Net modelisation and generation.
- Development of high level actions and conditions using ROS.
A RoboCup task can quickly become complicated to design, especially when you have a lot of execution rules and exceptions to take into account.
You can visualise these Petri Net modelisations using the Jarp editor available on the Petri Net Plans repo:
# In your computer
git clone https://github.com/iocchi/PetriNetPlans.git
cd PetriNetPlans/Jarp
./jarp.sh
Petri Plans are stored in the demo_pnp/plans folder.
# Launch Petri Net module with Demo Actions on the robot
roslaunch manager_pepper robobreizh_manager.launch
Everything should initialise correctly, "Waiting for a plan..." should be written in the end of the intialisation process.
In a second terminal, you can publish on topic /pnp/planToExec to indicate which Petri Plan the manager must use. Petri Plans must be stored inside plans folder. We'll use the plan called "GPSR" here.
# If you want to use a ROS Noetic installation on the robot or on your computer
rostopic pub /pnp/planToExec std_msgs/String "data: 'GPSR'"
If you can't compile, you can try adding some paths to your bashrc (or the Gentoo Equivalent)
echo "export PNP_HOME=/home/nao/.local/PetriNetPlans" >> ~/.bash_profile
echo "export PNP_INCLUDE=${PNP_HOME}/PNP/include/" >> ~/.bash_profile
echo "export PNP_LIB=/home/nao/.local/bin/usr/local/lib/" >> ~/.bash_profile
Then, restart your SSH terminal to take the changes into account.
Actions and conditions must be registered on the main file available in src/RoboBreizhManager.cpp.
You can stop the plan before its end using:
**If you want to use a ROS Noetic installation on the robot or on your computer**
rostopic pub /pnp/planToExec std_msgs/String "data: 'stop'" --once
Some functions were used in previous code. To avoid compiling them a global variable named ```LEGACY`` has been added. You need to set it as a compiling argument in order to make it run.
If you use this project, please consider citing:
@incollection{buche2023robocup,
title={RoboCup@ Home SSPL Champion 2023: RoboBreizh, a Fully Embedded Approach},
author={Buche, C{\'e}dric and Neau, Ma{\"e}lic and Ung, Thomas and Li, Louis and Wang, Sinuo and Bono, C{\'e}dric Le},
booktitle={Robot World Cup},
pages={374--385},
year={2023},
publisher={Springer}
}