Skip to content

Commit 77a8158

Browse files
authored
Merge pull request #3 from igonzf/main
Create undefined UserType in problem
2 parents 3a4919f + a256cf0 commit 77a8158

50 files changed

Lines changed: 2766 additions & 546 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ jobs:
2323
os: [ubuntu-22.04]
2424
fail-fast: false
2525
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
2628
- name: Install deps
27-
run: sudo apt-get update && sudo apt-get install -y wget python3-vcstool python3-pytest python3-colcon-coveragepy-result libfl-dev pip
29+
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
2830
- name: fix pytest name
2931
run: sudo ln -s /usr/bin/pytest-3 /usr/bin/pytest
3032
- name: Install unified planning from sources
@@ -41,33 +43,27 @@ jobs:
4143
python3 scripts/test_imports.py
4244
cd ..
4345
git clone https://github.com/aiplan4eu/up-tamer
44-
cd up-tamer
45-
git checkout ${{env.up_tamer_commit}}
46-
cd ..
4746
python3 -m pip install up-tamer/
4847
git clone https://github.com/aiplan4eu/up-pyperplan
49-
cd up-pyperplan
50-
git checkout ${{env.up_pyperplan_commit}}
51-
cd ..
5248
python3 -m pip install up-pyperplan/
5349
pip install unified_planning[tamer]
54-
5550
- name: Create custom repos
56-
run: wget -O /tmp/all.repos https://raw.githubusercontent.com/PlanSys2/UPF4ROS2/main/upf.repos
51+
run: cp upf.repos /tmp/all.repos
5752
- name: build and test
58-
uses: ros-tooling/action-ros-ci@0.2.6
53+
uses: ros-tooling/action-ros-ci@0.3.15
5954
with:
6055
package-name: upf4ros2 upf_msgs
6156
target-ros2-distro: humble
6257
vcs-repo-file-url: /tmp/all.repos
6358
colcon-defaults: |
6459
{
6560
"test": {
66-
"parallel-workers" : 1
61+
"parallel-workers" : 4
6762
}
6863
}
6964
colcon-mixin-name: coverage-gcc
7065
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/main/index.yaml
66+
extra-args: "--event-handlers console_direct+ --return-code-on-test-failure"
7167
- name: Codecov
7268
uses: codecov/codecov-action@v1.2.1
7369
with:

README.md

Lines changed: 71 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# UPF4ROS2
22

3-
This repository contains a UPF TSB for ROS 2
3+
[![main](https://github.com/igonzf/UPF4ROS2/actions/workflows/main.yaml/badge.svg)](https://github.com/igonzf/UPF4ROS2/actions/workflows/main.yaml)
4+
5+
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.
46

57
## Install and building
68

79
```
810
$ pip install --pre unified-planning[pyperplan,tamer]
11+
$ pip install ConfigSpace
12+
$ pip install typing_extensions==4.7.1 --upgrade
913
$ cd <upf_workspace>
1014
$ cd src
1115
$ git clone https://github.com/PlanSys2/UPF4ROS2.git
@@ -15,6 +19,7 @@ $ colcon build --symlink-install
1519
```
1620

1721
### Install UPF from sources
22+
1823
```
1924
$ cd src
2025
$ git clone https://github.com/aiplan4eu/unified-planning.git
@@ -53,26 +58,77 @@ $ cd unified-planning
5358
$ bash run_tests.sh
5459
```
5560

56-
5761
## Usage
5862

5963
`$ ros2 launch upf4ros2 upf4ros2.launch.py`
6064

6165
## Nodes
6266

63-
* **upf4ros**
64-
* Services:
65-
* `/upf4ros2/add_action` `[upf_msgs/srv/AddAction]`
66-
* `/upf4ros2/add_fluent` `[upf_msgs/srv/AddFluent]`
67-
* `/upf4ros2/add_goal` `[upf_msgs/srv/AddGoal]`
68-
* `/upf4ros2/add_object` `[upf_msgs/srv/AddObject]`
69-
* `/upf4ros2/new_problem` [upf_msgs/srv/NewProblem]`
70-
* `/upf4ros2/set_initial_value` [upf_msgs/srv/SetInitialValue]`
71-
* `/upf4ros2/set_problem` [upf_msgs/srv/SetProblem]`
72-
* Actions:
73-
* `/upf4ros2/planOneShotPDDL` `[upf_msgs/action/PDDLPlanOneShot]`
74-
* `/upf4ros2/planOneShot` `[upf_msgs/action/PlanOneShot]`
75-
* `/upf4ros2/planOneShotRemote` `[upf_msgs/action/PlanOneShotRemote]`
67+
- **upf4ros**
68+
- Services:
69+
- `/upf4ros2/add_action` `[upf_msgs/srv/AddAction]`
70+
- `/upf4ros2/add_fluent` `[upf_msgs/srv/AddFluent]`
71+
- `/upf4ros2/add_goal` `[upf_msgs/srv/AddGoal]`
72+
- `/upf4ros2/add_object` `[upf_msgs/srv/AddObject]`
73+
- `/upf4ros2/new_problem` [upf_msgs/srv/NewProblem]`
74+
- `/upf4ros2/set_initial_value` [upf_msgs/srv/SetInitialValue]`
75+
- `/upf4ros2/set_problem` [upf_msgs/srv/SetProblem]`
76+
- Actions:
77+
- `/upf4ros2/planOneShotPDDL` `[upf_msgs/action/PDDLPlanOneShot]`
78+
- `/upf4ros2/planOneShot` `[upf_msgs/action/PlanOneShot]`
79+
- `/upf4ros2/planOneShotRemote` `[upf_msgs/action/PlanOneShotRemote]`
80+
81+
## Demo
82+
83+
### [Demo 1](https://www.youtube.com/watch?v=fObz6H1DnXs)
84+
85+
This demo consists of creating the problem from a ros2 node to navigate from living room to the entrance.
86+
87+
`$ ros2 launch upf4ros2 upf4ros2.launch.py`
88+
89+
`$ ros2 launch upf4ros2_demo upf4ros2_demo1.launch.py`
90+
91+
### Demo 1 (pddl file)
92+
93+
This demo consists of creating the problem from a pddl domain and problem file.
94+
95+
`$ ros2 launch upf4ros2 upf4ros2.launch.py`
96+
97+
`$ ros2 launch upf4ros2_demo upf4ros2_demo1_pddlfile.launch.py`
98+
99+
### Demo 1 (bash)
100+
101+
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
102+
103+
`$ ros2 launch upf4ros2 upf4ros2.launch.py`
104+
105+
`$ ./upf_problem.sh`
106+
107+
`$ ros2 launch upf4ros2_demo upf4ros2_demo1_bash.launch.py`
108+
109+
### [Demo 2](https://www.youtube.com/watch?v=HJ46htSfPZY)
110+
111+
This demo consists of creating the problem from a ROS 2 node to navigate from living room to the entrance.
112+
For run this demo I used the simulated TIAGo robot from this [repo](https://github.com/jmguerreroh/ros2_computer_vision)
113+
114+
`$ ros2 launch upf4ros2 upf4ros2.launch.py`
115+
116+
`$ ros2 launch upf4ros2_demo upf4ros2_demo2.launch.py`
117+
118+
### Demo 3
119+
120+
This demo consists of creating the problem from a ROS 2 node to navigate and check a list of waypoints starting from living room.
121+
For run this demo I used the simulated TIAGo robot from this [repo](https://github.com/jmguerreroh/ros2_computer_vision)
122+
123+
`$ ros2 launch upf4ros2 upf4ros2.launch.py`
124+
125+
`$ ros2 launch upf4ros2_demo upf4ros2_demo3.launch.py`
126+
127+
There are two alternatives:
128+
129+
- Regular case: Illustrated in this [video](https://youtu.be/2nKqxGYlHk8)
130+
131+
- Replanning case: one of the waypoints is not reachable and it is necessary to replan. Illustrated in this [video](https://youtu.be/UJncg7GPCro)
76132

77133
## Acknowledgments
78134

upf.repos

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@ repositories:
22
unified-planning:
33
type: git
44
url: https://github.com/aiplan4eu/unified-planning.git
5-
version: main
5+
version: master
66
up-tamer:
77
type: git
88
url: https://github.com/aiplan4eu/up-tamer.git
9-
version: 869e7ab06cf23c5541a47f46209159fd51d8021f
9+
version: master
1010
up-pyperplan:
1111
type: git
1212
url: https://github.com/aiplan4eu/up-pyperplan.git
13-
version: ac2b04d2d41c20b15f7c4143c19947f9704d1888
13+
version: master
14+
ros2_planning_system:
15+
type: git
16+
url: https://github.com/PlanSys2/ros2_planning_system.git
17+
version: humble-devel
18+
cascade_lifecycle:
19+
type: git
20+
url: https://github.com/fmrico/cascade_lifecycle.git
21+
version: humble-devel

upf4ros2/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
tests_require=['pytest'],
2626
entry_points={
2727
'console_scripts': [
28-
'upf4ros2_main = upf4ros2.upf4ros2_main:main'
28+
'upf4ros2_main = upf4ros2.upf4ros2_main:main'
2929
],
3030
},
3131
)

0 commit comments

Comments
 (0)