Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
14baa48
Create undefined UserType in problem
igonzf Jan 20, 2023
bdd8d2b
Create demo example for UPF4ROS2
igonzf Jan 23, 2023
3e91a41
Create demo for UPF4ROS2 pddl and commandline
igonzf Jan 26, 2023
e0ddb69
Add demo for UPF4ROS2
igonzf Jan 31, 2023
6175f8c
Convert UPF action to ROS2 Action
igonzf Feb 3, 2023
ada0b36
Add PlanOneShot service
igonzf Feb 9, 2023
bda6a91
Updated README.md
igonzf Feb 9, 2023
b6c66d3
Update README.md
igonzf Feb 9, 2023
3490ee8
rename launch files
igonzf Feb 13, 2023
4ef772a
update README.md
igonzf Feb 13, 2023
5ac3b86
Add demo3
igonzf Feb 15, 2023
546c57c
Update README.md
igonzf Feb 20, 2023
6a2acb6
change interfaces to msgs
igonzf Feb 24, 2023
6114a92
Minor update.
fjrodl Mar 2, 2023
9cf2b7c
Merge branch 'main' into main
igonzf Mar 3, 2023
a285c10
fix minor errors
igonzf Nov 4, 2024
7f082d5
update dependencies
igonzf Nov 4, 2024
ce58421
fix dependencies
igonzf Nov 4, 2024
e7b9de5
update github action
igonzf Nov 4, 2024
0f1b8ca
update github action
igonzf Nov 4, 2024
ebf55ce
fix test
igonzf Nov 4, 2024
93f067d
fix test and problem msg
igonzf Nov 4, 2024
2977831
fix tests for HierarchicalProblem
igonzf Dec 4, 2024
b1f7e0f
update status badge
igonzf Dec 4, 2024
64de578
add upf4ros2 tests
igonzf Dec 10, 2024
c78603d
Update main.yaml
igonzf Dec 10, 2024
5483a57
fix test_upf4ros2
igonzf Dec 12, 2024
038194c
test CI
igonzf Dec 16, 2024
f264c89
test CI
igonzf Dec 16, 2024
ef8186b
test CI
igonzf Dec 16, 2024
2e67491
test CI
igonzf Dec 16, 2024
b690572
test CI
igonzf Dec 16, 2024
429148e
test CI
igonzf Dec 16, 2024
a256cf0
test CI
igonzf Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
os: [ubuntu-22.04]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install deps
run: sudo apt-get update && sudo apt-get install -y wget python3-vcstool python3-pytest python3-colcon-coveragepy-result libfl-dev pip
run: sudo apt-get update && sudo apt-get install -y wget python3-vcstool python3-pytest python3-colcon-coveragepy-result libfl-dev pip && pip install ConfigSpace && pip install typing_extensions==4.7.1 --upgrade
- name: fix pytest name
run: sudo ln -s /usr/bin/pytest-3 /usr/bin/pytest
- name: Install unified planning from sources
Expand All @@ -41,33 +43,27 @@ jobs:
python3 scripts/test_imports.py
cd ..
git clone https://github.com/aiplan4eu/up-tamer
cd up-tamer
git checkout ${{env.up_tamer_commit}}
cd ..
python3 -m pip install up-tamer/
git clone https://github.com/aiplan4eu/up-pyperplan
cd up-pyperplan
git checkout ${{env.up_pyperplan_commit}}
cd ..
python3 -m pip install up-pyperplan/
pip install unified_planning[tamer]

- name: Create custom repos
run: wget -O /tmp/all.repos https://raw.githubusercontent.com/PlanSys2/UPF4ROS2/main/upf.repos
run: cp upf.repos /tmp/all.repos
- name: build and test
uses: ros-tooling/action-ros-ci@0.2.6
uses: ros-tooling/action-ros-ci@0.3.15
with:
package-name: upf4ros2 upf_msgs
target-ros2-distro: humble
vcs-repo-file-url: /tmp/all.repos
colcon-defaults: |
{
"test": {
"parallel-workers" : 1
"parallel-workers" : 4
}
}
colcon-mixin-name: coverage-gcc
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/main/index.yaml
extra-args: "--event-handlers console_direct+ --return-code-on-test-failure"
- name: Codecov
uses: codecov/codecov-action@v1.2.1
with:
Expand Down
87 changes: 71 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# UPF4ROS2
[![main](https://github.com/PlanSys2/UPF4ROS2/actions/workflows/main.yaml/badge.svg)](https://github.com/PlanSys2/UPF4ROS2/actions/workflows/main.yaml)

This repository contains a UPF TSB for ROS 2
[![main](https://github.com/igonzf/UPF4ROS2/actions/workflows/main.yaml/badge.svg)](https://github.com/igonzf/UPF4ROS2/actions/workflows/main.yaml)

This repository integrates the Unified Planning Framework (UPF) into the ROS 2 ecosystem, providing a modular and standardized solution for automated planning in robotic systems. This project is part of the European initiative AIPlan4EU, which aims to develop automated planning tools that are accessible and applicable across different engineering domains.

## Install and building

```
$ pip install --pre unified-planning[pyperplan,tamer]
$ pip install ConfigSpace
$ pip install typing_extensions==4.7.1 --upgrade
$ cd <upf_workspace>
$ cd src
$ git clone https://github.com/PlanSys2/UPF4ROS2.git
Expand All @@ -16,6 +19,7 @@ $ colcon build --symlink-install
```

### Install UPF from sources

```
$ cd src
$ git clone https://github.com/aiplan4eu/unified-planning.git
Expand Down Expand Up @@ -54,26 +58,77 @@ $ cd unified-planning
$ bash run_tests.sh
```


## Usage

`$ ros2 launch upf4ros2 upf4ros2.launch.py`

## Nodes

* **upf4ros**
* Services:
* `/upf4ros2/add_action` `[upf_msgs/srv/AddAction]`
* `/upf4ros2/add_fluent` `[upf_msgs/srv/AddFluent]`
* `/upf4ros2/add_goal` `[upf_msgs/srv/AddGoal]`
* `/upf4ros2/add_object` `[upf_msgs/srv/AddObject]`
* `/upf4ros2/new_problem` [upf_msgs/srv/NewProblem]`
* `/upf4ros2/set_initial_value` [upf_msgs/srv/SetInitialValue]`
* `/upf4ros2/set_problem` [upf_msgs/srv/SetProblem]`
* Actions:
* `/upf4ros2/planOneShotPDDL` `[upf_msgs/action/PDDLPlanOneShot]`
* `/upf4ros2/planOneShot` `[upf_msgs/action/PlanOneShot]`
* `/upf4ros2/planOneShotRemote` `[upf_msgs/action/PlanOneShotRemote]`
- **upf4ros**
- Services:
- `/upf4ros2/add_action` `[upf_msgs/srv/AddAction]`
- `/upf4ros2/add_fluent` `[upf_msgs/srv/AddFluent]`
- `/upf4ros2/add_goal` `[upf_msgs/srv/AddGoal]`
- `/upf4ros2/add_object` `[upf_msgs/srv/AddObject]`
- `/upf4ros2/new_problem` [upf_msgs/srv/NewProblem]`
- `/upf4ros2/set_initial_value` [upf_msgs/srv/SetInitialValue]`
- `/upf4ros2/set_problem` [upf_msgs/srv/SetProblem]`
- Actions:
- `/upf4ros2/planOneShotPDDL` `[upf_msgs/action/PDDLPlanOneShot]`
- `/upf4ros2/planOneShot` `[upf_msgs/action/PlanOneShot]`
- `/upf4ros2/planOneShotRemote` `[upf_msgs/action/PlanOneShotRemote]`

## Demo

### [Demo 1](https://www.youtube.com/watch?v=fObz6H1DnXs)

This demo consists of creating the problem from a ros2 node to navigate from living room to the entrance.

`$ ros2 launch upf4ros2 upf4ros2.launch.py`

`$ ros2 launch upf4ros2_demo upf4ros2_demo1.launch.py`

### Demo 1 (pddl file)

This demo consists of creating the problem from a pddl domain and problem file.

`$ ros2 launch upf4ros2 upf4ros2.launch.py`

`$ ros2 launch upf4ros2_demo upf4ros2_demo1_pddlfile.launch.py`

### Demo 1 (bash)

This demo consists of creating the problem from the command line. For easier use you can use the script in /upf4ros2_demo/resource/upf_problem.sh

`$ ros2 launch upf4ros2 upf4ros2.launch.py`

`$ ./upf_problem.sh`

`$ ros2 launch upf4ros2_demo upf4ros2_demo1_bash.launch.py`

### [Demo 2](https://www.youtube.com/watch?v=HJ46htSfPZY)

This demo consists of creating the problem from a ROS 2 node to navigate from living room to the entrance.
For run this demo I used the simulated TIAGo robot from this [repo](https://github.com/jmguerreroh/ros2_computer_vision)

`$ ros2 launch upf4ros2 upf4ros2.launch.py`

`$ ros2 launch upf4ros2_demo upf4ros2_demo2.launch.py`

### Demo 3

This demo consists of creating the problem from a ROS 2 node to navigate and check a list of waypoints starting from living room.
For run this demo I used the simulated TIAGo robot from this [repo](https://github.com/jmguerreroh/ros2_computer_vision)

`$ ros2 launch upf4ros2 upf4ros2.launch.py`

`$ ros2 launch upf4ros2_demo upf4ros2_demo3.launch.py`

There are two alternatives:

- Regular case: Illustrated in this [video](https://youtu.be/2nKqxGYlHk8)

- Replanning case: one of the waypoints is not reachable and it is necessary to replan. Illustrated in this [video](https://youtu.be/UJncg7GPCro)

## Acknowledgments

Expand Down
14 changes: 11 additions & 3 deletions upf.repos
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ repositories:
unified-planning:
type: git
url: https://github.com/aiplan4eu/unified-planning.git
version: main
version: master
up-tamer:
type: git
url: https://github.com/aiplan4eu/up-tamer.git
version: 869e7ab06cf23c5541a47f46209159fd51d8021f
version: master
up-pyperplan:
type: git
url: https://github.com/aiplan4eu/up-pyperplan.git
version: ac2b04d2d41c20b15f7c4143c19947f9704d1888
version: master
ros2_planning_system:
type: git
url: https://github.com/PlanSys2/ros2_planning_system.git
version: humble-devel
cascade_lifecycle:
type: git
url: https://github.com/fmrico/cascade_lifecycle.git
version: humble-devel
2 changes: 1 addition & 1 deletion upf4ros2/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
tests_require=['pytest'],
entry_points={
'console_scripts': [
'upf4ros2_main = upf4ros2.upf4ros2_main:main'
'upf4ros2_main = upf4ros2.upf4ros2_main:main'
],
},
)
Loading
Loading