ROSPlan
ROSPlan copied to clipboard
Use :action or :durative-actions
Hi
I have a question. When I am creating the domain, if I use :action, when the plan is being executed, it doesn't wait for the end of the action server and goes to the next task, which creates conflicts and doesn't work.
e.g.
;; Move to any waypoint, avoiding terrain
(:action goto_waypoint
:parameters (?v - robot ?from ?to - waypoint)
:precondition (and
(robot_at ?v ?from)
(localised ?v)
(undocked ?v))
:effect (and
(visited ?to)
(robot_at ?v ?to)
(not (robot_at ?v ?from)))
However when I use :durative-action it works without any problem, it only starts a task after finishing the previous one.
;; Move to any waypoint, avoiding terrain
(:durative-action goto_waypoint
:parameters (?v - robot ?from ?to - waypoint)
:duration ( = ?duration 60)
:condition (and
(at start (robot_at ?v ?from))
(at start (localised ?v))
(over all (undocked ?v)))
:effect (and
(at end (visited ?to))
(at end (robot_at ?v ?to))
(at start (not (robot_at ?v ?from))))
)
Is this normal? The plan is well generated in both situations.