GithubHelp home page GithubHelp logo

edoardobarba / automated_planning_project Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 10.14 MB

Use PDDL to model an emergency services logistics problem and solve it using different planners.

PDDL 52.81% CMake 8.06% C++ 27.50% Python 11.63%
pddl planning hddl ros2 plansys2

automated_planning_project's Introduction

Automated_Planning_project

This repository is a student project developed by Edoardo Barba and Mostafa Haggag for the "Automated Planning: Theory and Practical" course of the Master in Artificial Intelligent Systems at the University of Trento, a.y. 2022-2023.

Format

In this section we describe how the files are organised for the repository. Please find the tree below.

Automated_Planning_project/
├── assignment.pdf
├── plansys2_problem5
│   ├── CMakeLists.txt
│   ├── launch
│   │   ├── example_1
│   │   ├── example_2
│   │   └── plansys2_problem5_launch.py
│   ├── package.xml
│   ├── pddl
│   │   └── domain4.pddl
│   └── src
│       ├── load_box_action_node.cpp
│       ├── move_robot_action_node.cpp
│       ├── pickdown_food_action_node.cpp
│       ├── pickdown_medicine_action_node.cpp
│       ├── pickdown_tool_action_node.cpp
│       ├── pick_item_from_box_action_node.cpp
│       ├── pick_up_item_from_location_action_node.cpp
│       ├── put_item_in_box_action_node.cpp
│       └── unload_box_action_node.cpp
├── problem1
│   ├── domain1.pddl
│   ├── problem1_instance1.pddl
│   ├── problem1_instance1_results.md
│   ├── problem1_instance2.pddl
│   ├── problem1_instance2_results.md
├── problem2
│   ├── domain2.pddl
│   ├── problem2_instance1.pddl
│   ├── problem2_instance1_results.md
│   ├── problem2_instance2.pddl
│   └── problem2_instance2_results.md
├── problem3
│   ├── domain3.hddl
│   ├── example_1.hddl
│   ├── example_1.txt
│   ├── example_1_unor.hddl
│   ├── example_1_unor.txt
│   ├── example_2.hddl
│   ├── example_2.txt
│   ├── example_2_unor.hddl
│   └── example_2_unor.txt
├── problem4
│   ├── domain4.pddl
│   ├── example_1_p1.txt
│   ├── example_1_p2.txt
│   ├── example_1_p3.txt
│   ├── example_1.pddl
│   ├── example_2_p1.txt
│   ├── example_2_p2.txt
│   ├── example_2_p3.txt
│   └── example_2.pddl
├── README.md
└── report.pdf

8 directories, 47 files

Problem 1 Commands

Instance 1

  • We used planutils and downward.
planutils run ff domain1.pddl problem1_instance1.pddl 
planutils run lama domain1.pddl problem1_instance1.pddl 
planutils run lama-first domain1.pddl problem1_instance1.pddl 
./DOWNWARD/fast-downward.py /domain1.pddl /problem1_instance1.pddl --search "astar(goalcount)"

Instance 2

  • Put the planner DOWNWARD in the directory of problem 1.
  • Run these commands.
planutils run ff domain1.pddl problem1_instance2.pddl 
planutils run lama domain1.pddl problem1_instance2.pddl 
planutils run lama-first domain1.pddl problem1_instance2.pddl 
./DOWNWARD/fast-downward.py /domain1.pddl /problem1_instance2.pddl --search "astar(goalcount)"

Problem 2 Commands

  • Put the planner ENHSP in the directory of problem 1.
  • Run these commands.

Instance 1

java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance1.pddl -planner sat-hadd
java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance1.pddl -planner opt-blind
java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance1.pddl -planner opt-hmax

Instance 2

java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance2.pddl -planner sat-hadd
java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance2.pddl -planner opt-blind
java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance2.pddl -planner opt-hmax

Problem 3 Commands

  • Put the planner PANADAS in the directory of problem 3.
  • Run these commands.
java -jar PANDA.jar -parser hddl domain3.hddl example_1.hddl 
java -jar PANDA.jar -parser hddl domain3.hddl example_1_unor.hddl
java -jar PANDA.jar -parser hddl domain3.hddl example_2.hddl 
java -jar PANDA.jar -parser hddl domain3.hddl example_2_unor.hddl 

Problem 4 Commands

Command 1

planutils run optic "-N  domain4.pddl example_1.pddl" >> example_1_p1.txt
planutils run optic "-N  domain4.pddl example_2.pddl" >> example_2_p1.txt

Command 2

planutils run optic "-N -W1,1 domain4.pddl example_1.pddl" >> example_1_p2.txt
planutils run optic "-N -W1,1 domain4.pddl example_2.pddl" >> example_2_p2.txt

Command 3

planutils run optic "-N -E -W1,1 domain4.pddl example_1.pddl" >> example_1_p3.txt
planutils run optic "-N -E -W1,1 domain4.pddl example_2.pddl" >> example_2_p3.txt

Problem 5 Commands

  • Open 2 terminals
  • Change the directory /Automated_Planning_project/plansys2_problem5 in both of them.
  • Run the following commands to source plansys2 and ros2 and build the problem 5 package:
source /opt/ros/humble/setup.bash
source plansys2_ws/install/setup.bash
colcon build --packages-select plansys2_problem5
source install/setup.bash
  • Run in the first terminal this command to run the Python node:
ros2 launch plansys2_problem5 plansys2_problem5_launch.py
  • Run in the second terminal this command to run Plansys2 terminal
ros2 run plansys2_terminal plansys2_terminal
  • In plansys2 terminal, run the following commands to run example 1:
source launch/example_1
get plan
run
  • In plansys2 terminal, run the following commands to run example 2:
source launch/example_2
get plan
run

automated_planning_project's People

Contributors

edoardobarba avatar mostafa-haggag avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

mostafa-haggag

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.