'PDDL, Plansys2 Error: decrease does not name a known token
I was working with ROS2 Planning System (Plansys2) for PDDL planning with the default planner POPF. While planning the domain with PDDL fluents, the PDDL parser and/or (not sure!) domain expert node results in an error for PDDL fluents' decrease effect
[ERROR] PDDL Parsing: decrease does not name a known token.
The POPF planner is producing a expected plan for the same domain file without any error using command ros2 run popf popf <path/to/domain.pddl> <path/to/problem.pddl>
.
Any help or suggestions are welcome regarding this issue. Thank you in advance!
Related details/ resources:
ROS2 version - foxy.
Plansys2 repository - https://github.com/IntelligentRoboticsLabs/ros2_planning_system
Plansys2 Tutorials - https://intelligentroboticslab.gsyc.urjc.es/ros2_planning_system.github.io/tutorials/index.html
domain used - (code here pasted as a snippet, pardon me for that)
(define (domain simple)
(:requirements :strips :typing :adl :fluents :durative-actions)
(:types
robot
room
)
(:predicates
(robot_at ?r - robot ?ro - room)
(connected ?ro1 ?ro2 - room)
(battery_full ?r - robot)
(charging_point_at ?ro - room)
)
(:functions
(battery_level ?r - robot)
)
(:durative-action move
:parameters (?r - robot ?r1 ?r2 - room)
:duration ( = ?duration 10)
:condition (and
(at start(connected ?r1 ?r2))
(at start(robot_at ?r ?r1))
(over all(> (battery_level ?r) 15))
)
:effect (and
(decrease (battery_level ?r) (* #t 0.5))
(at start(not(robot_at ?r ?r1)))
(at end(robot_at ?r ?r2))
)
)
(:durative-action askcharge
:parameters (?r - robot ?r1 ?r2 - room)
:duration ( = ?duration 5)
:condition (and
(at start(robot_at ?r ?r1))
(at start(charging_point_at ?r2))
(over all (> (battery_level ?r) 10))
)
:effect (and
(decrease (battery_level ?r) (* #t 0.5))
(at start(not(robot_at ?r ?r1)))
(at end(robot_at ?r ?r2))
)
)
(:durative-action charge
:parameters (?r - robot ?ro - room)
:duration ( = ?duration 20)
:condition (and
(at start(robot_at ?r ?ro))
(at start(charging_point_at ?ro))
(over all (> (battery_level ?r) 1))
)
:effect (and
(increase (battery_level ?r) (* #t 5.0))
(at end(battery_full ?r))
)
)
)
Problem used - (code here pasted as a snippet, pardon me for that)
(define (problem test) (:domain simple)
(:objects
bot - robot
entrance - room
kitchen - room
bedroom - room
dinning - room
bathroom - room
chargingroom - room
)
(:init
(connected entrance dinning)
(connected dinning entrance)
(connected dinning kitchen)
(connected kitchen dinning)
(connected dinning bedroom)
(connected bedroom dinning)
(connected bathroom bedroom)
(connected bedroom bathroom)
(connected chargingroom kitchen)
(connected kitchen chargingroom)
(charging_point_at chargingroom)
(robot_at bot entrance)
(= (battery_level bot) 90)
)
(:goal (and
(robot_at bot bathroom)
))
)
Solution 1:[1]
According to the Planning Wiki, decrease
is provided by the requirement numeric-fluents
, and POPF does not support it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Victor Paléologue |