Merge branch '29-freecad-to-robossembler-communication' of gitlab.com:robosphere/robossembler-ros2 into 29-freecad-to-robossembler-communication
This commit is contained in:
commit
4ed85d9811
2 changed files with 95 additions and 33 deletions
|
@ -1,39 +1,72 @@
|
|||
;; Modified domain taken from
|
||||
;; "Knowledge transfer in robot manipulation tasks" by Jacob O. Huckaby 2014
|
||||
(define (domain robossembler)
|
||||
(:requirements :strips :typing :adl :fluents :durative-actions :typing)
|
||||
(:requirements :strips :typing :adl :fluents :durative-actions)
|
||||
(:types
|
||||
printer workspace - zone ; workspace for assembly operations and storage
|
||||
arm ; robotic manipulator arm
|
||||
; grip weld scan - tool ; manipulator tool for grip, weld, solder and other operations
|
||||
part ; solid part, that cannot be disassembled
|
||||
assembly ; assembly - can be dissassembled
|
||||
)
|
||||
|
||||
;; Types ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(:types
|
||||
robot
|
||||
zone
|
||||
gap
|
||||
part
|
||||
gripper
|
||||
frame
|
||||
printer
|
||||
material
|
||||
);; end Types ;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(:predicates
|
||||
(arm-available ?a - arm)
|
||||
(part-at ?p - part ?z - zone)
|
||||
(printer-ready ?p - printer)
|
||||
(part-of ?part - part ?whole - assembly)
|
||||
(assembly-order ?prev ?next - assembly)
|
||||
(assembled ?whole - assembly ?z - zone)
|
||||
)
|
||||
|
||||
;; Predicates ;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(:predicates
|
||||
(enviroment_setup ?r - robot ?g - gripper ?p - part)
|
||||
);; end Predicates ;;;;;;;;;;;;;;;;;;;;
|
||||
(:functions)
|
||||
|
||||
;; Functions ;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(:functions
|
||||
(:durative-action print
|
||||
:parameters (?p - part ?pr - printer)
|
||||
:duration (= ?duration 10)
|
||||
:condition (and
|
||||
(at start (printer-ready ?pr))
|
||||
)
|
||||
:effect (and
|
||||
(at start (not (printer-ready ?pr)))
|
||||
(at end (part-at ?p ?pr))
|
||||
)
|
||||
)
|
||||
|
||||
);; end Functions ;;;;;;;;;;;;;;;;;;;;
|
||||
(:durative-action remove
|
||||
:parameters (?p - part ?pr - printer ?z - zone ?a - arm)
|
||||
:duration (= ?duration 1)
|
||||
:condition (and
|
||||
(at start (and
|
||||
(part-at ?p ?pr)
|
||||
(arm-available ?a)
|
||||
))
|
||||
)
|
||||
:effect (and
|
||||
(at start (not (arm-available ?a)))
|
||||
(at end (and
|
||||
(part-at ?p ?z)
|
||||
(arm-available ?a)
|
||||
(printer-ready ?pr)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
;; Actions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(:durative-action assemble-1
|
||||
:parameters (?r - robot ?g - gripper ?p - part)
|
||||
:duration ( = ?duration 1)
|
||||
:effect (and(at start (enviroment_setup ?r ?g ?p)))
|
||||
)
|
||||
|
||||
;(:durative-action move_gripper
|
||||
; :parameters (?r - robot ?g - gap)
|
||||
; :duration ( = ?duration 1)
|
||||
; :effect (at end(gripper_move ?r ?g))
|
||||
;)
|
||||
|
||||
);; end Domain ;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(:durative-action assemble
|
||||
:parameters (?p - part ?prev ?next - assembly ?w - workspace ?arm - arm)
|
||||
:duration (= ?duration 5)
|
||||
:condition (and
|
||||
(at start (assembled ?prev ?w))
|
||||
(at start (part-at ?p ?w))
|
||||
(at start (part-of ?p ?next))
|
||||
(at start (arm-available ?arm))
|
||||
(at start (assembly-order ?prev ?next))
|
||||
)
|
||||
:effect (and
|
||||
(at start (not (arm-available ?arm)))
|
||||
(at end (not (part-at ?p ?w)))
|
||||
(at end (arm-available ?arm))
|
||||
(at end (assembled ?next ?w))
|
||||
)
|
||||
)
|
||||
)
|
29
robossembler/pddl/problem.pddl
Normal file
29
robossembler/pddl/problem.pddl
Normal file
|
@ -0,0 +1,29 @@
|
|||
(define (problem p1)
|
||||
(:domain robossembler)
|
||||
(:objects
|
||||
; information from Scene
|
||||
rasmt - arm
|
||||
printer1 printer2 - printer
|
||||
workspace1 - workspace
|
||||
; information from CAD
|
||||
part1 part2 - part
|
||||
subasm0 subasm1 subasm2 - assembly
|
||||
)
|
||||
(:init
|
||||
; information from Scene
|
||||
(printer-ready printer1)
|
||||
(printer-ready printer2)
|
||||
(arm-available rasmt)
|
||||
; information from CAD
|
||||
(assembled subasm0 workspace1)
|
||||
(part-of part1 subasm1)
|
||||
(part-of part2 subasm2)
|
||||
(assembly-order subasm0 subasm1)
|
||||
(assembly-order subasm1 subasm2)
|
||||
)
|
||||
(:goal (and
|
||||
; information from CAD
|
||||
(assembled subasm2 workspace1)
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue