Skip to content

Commit aae36c9

Browse files
committed
Merge remote-tracking branch 'origin/tviehmann/extensions'
2 parents 80f2583 + 09e670f commit aae36c9

File tree

296 files changed

+40656
-80
lines changed

Some content is hidden

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

296 files changed

+40656
-80
lines changed

.cmakelint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2024-2025 Carologistics
1+
# Copyright (c) 2024-2026 Carologistics
22
# SPDX-License-Identifier: Apache-2.0
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ repos:
151151
entry: ament_cpplint
152152
language: system
153153
stages: [manual]
154-
exclude: /templates/
154+
pass_filenames: true
155+
exclude: 'jinja'
155156

156157
# -------------------------------
157158
# Python Linters
@@ -188,3 +189,5 @@ repos:
188189
language: system
189190
files: \.(launch|xml)$
190191
stages: [manual]
192+
193+
exclude: (^extensions/pddl/cx_z3_vendor/|^extensions/pddl/cx_up_nextflap/)

clips_executive/cx_docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2024-2025 Carologistics
1+
# Copyright (c) 2024-2026 Carologistics
22
# SPDX-License-Identifier: Apache-2.0
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -33,7 +33,7 @@
3333
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
3434
ros_distro = os.getenv('ROS_DISTRO', 'humble') # Default to 'humble' if ROS_DISTRO is not set
3535

36-
extensions = ['sphinx.ext.extlinks', 'sphinx.ext.todo']
36+
extensions = ['sphinx.ext.extlinks', 'sphinx.ext.todo', 'sphinx_copybutton']
3737
local = True
3838

3939

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
PDDL Integration for CLIPS
2+
==========================
3+
4+
This extension provides an implementation for using PDDL alongside CLIPS.
5+
6+
If you need one of the following features, you may find this useful:
7+
8+
- A structured model of action and change to progress the CLIPS fact base according to a robots actions
9+
- Unified sanity checks to ensure actions can only be executed if conditions are currently met according to the fact base
10+
- Automated planning to reach complex objectives by means of computing and executing plans consisting of individual robot actions
11+
12+
Background: PDDL
13+
++++++++++++++++
14+
15+
The Planning Domain Definition Language (PDDL) is the de facto standard language for expressing planning problems in artificial intelligence.
16+
A PDDL problem consists of
17+
18+
- a domain description, which defines the available objects, predicates, actions and their preconditions and effects,
19+
- a problem description, which specifies the initial state and desired goals.
20+
21+
Given such a description, a PDDL planner computes a sequence of actions (a plan) that transforms the initial state into one that satisfies the goal conditions.
22+
23+
An example PDDL problem can be found `here <pddl/domain.html>`_.
24+
25+
26+
Overview
27+
++++++++
28+
29+
This extension leverages the `Unified Planning Framework (UPF)`_, which supports a wide range of PDDL standards.
30+
UPF is wrapped and exposed as a ROS node, hence interfacing is done via the regular |CX| plugins.
31+
32+
In order to reduce the manual overhead, an optional CLIPS abstraction layer is provided, which takes care of the ROS communication.
33+
34+
Additionally, this extension contain the `NEXTFLAP planner`_, which can handle both classical and temporal PDDL variants.
35+
This planner requires the `z3 constraint solver`_, which is also provided.
36+
37+
Content
38+
+++++++
39+
40+
.. toctree::
41+
:maxdepth: 2
42+
43+
pddl/usage.rst
44+
pddl/pddl_clips.rst
45+
pddl/domain.rst
46+
pddl/raw_tutorial.rst
47+
pddl/structured_tutorial.rst
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _extensions:
2+
3+
Extensions
4+
==========
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
9+
PDDL.rst
10+
reinforcement_learning.rst

clips_executive/cx_docs/extensions/pddl/PDDL.rst

Lines changed: 451 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
PDDL Domain and Problem File Example
2+
####################################
3+
4+
This is how a PDDL domain file looks like:
5+
6+
.. code-block:: pddl
7+
8+
(define (domain blocksworld)
9+
(:types
10+
block - object
11+
)
12+
13+
14+
(:predicates
15+
(on ?x - block ?y - block) ; object ?x is on ?object ?y
16+
(on-table ?x - block) ; ?x is directly on the table
17+
(clear ?x - block) ; ?x has nothing on it
18+
(arm-empty) ; robot isn't holding anything
19+
(holding ?x - block)) ; robot is holding ?x
20+
21+
(:durative-action pick-up
22+
:parameters (?ob - block)
23+
:duration (= ?duration 10)
24+
:condition
25+
(and
26+
(at start (clear ?ob))
27+
(at start (on-table ?ob))
28+
(at start (arm-empty)))
29+
:effect
30+
(and
31+
(at end (not (on-table ?ob)))
32+
(at end (not (clear ?ob)))
33+
(at end (not (arm-empty)))
34+
(at end (holding ?ob))))
35+
36+
(:durative-action put-down
37+
:parameters (?ob - block)
38+
:duration (= ?duration 10)
39+
:condition (at start (holding ?ob))
40+
:effect
41+
(and
42+
(at end (not (holding ?ob)))
43+
(at end (clear ?ob))
44+
(at end (arm-empty))
45+
(at end (on-table ?ob)))
46+
)
47+
48+
(:durative-action stack
49+
:parameters (?ob1 - block ?ob2 - block)
50+
:duration (= ?duration 10)
51+
:condition (and (at start (holding ?ob1)) (at start (clear ?ob2)))
52+
:effect
53+
(and
54+
(at end (not (holding ?ob1)))
55+
(at end (not (clear ?ob2)))
56+
(at end (clear ?ob1))
57+
(at end (arm-empty))
58+
(at end (on ?ob1 ?ob2)))
59+
)
60+
61+
(:durative-action unstack
62+
:parameters (?ob1 - block ?ob2 - block)
63+
:duration (= ?duration 10)
64+
:condition
65+
(and
66+
(at start (on ?ob1 ?ob2))
67+
(at start (clear ?ob1))
68+
(at start (arm-empty)))
69+
:effect
70+
(and
71+
(at end (holding ?ob1))
72+
(at end (clear ?ob2))
73+
(at end (not (clear ?ob1)))
74+
(at end (not (arm-empty)))
75+
(at end (not (on ?ob1 ?ob2))))
76+
)
77+
)
78+
79+
This is how a matching PDDL problem file would look like:
80+
81+
.. code-block:: pddl
82+
83+
(define (problem blocksworld-problem)
84+
(:domain blocksworld)
85+
86+
(:objects A B C - block)
87+
88+
(:init
89+
(arm-empty)
90+
(on-table A)
91+
(on B A)
92+
(on C B)
93+
(clear C)
94+
)
95+
96+
(:goal
97+
(and
98+
(on A B)
99+
(on B C)
100+
)
101+
)
102+
)

0 commit comments

Comments
 (0)