{
    "@context": {
        "@base": "https://hbrs-sesame.github.io/models/coordination/bt/",
        "pickup-events": "https://hbrs-sesame.github.io/models/coordination/pickup-events/",

        "py": "https://hbrs-sesame.github.io/metamodels/languages/python#",

        "bt": "https://hbrs-sesame.github.io/metamodels/coordination/behaviour-tree#",
        "root": { "@id": "bt:root", "@type": "@id" },
        "uses-impl": { "@id": "bt:uses-implementation", "@type": "@id" },
        "of-action": { "@id": "bt:of-action", "@type": "@id" },
        "start-event": { "@id": "bt:start-event", "@type": "@id" },
        "end-event": { "@id": "bt:end-event", "@type": "@id" },
        "has-child" : { "@id": "bt:has-child", "@type": "@id" },
        "parent": { "@id": "bt:parent", "@type": "@id" },
        "subroot": { "@id": "bt:subroot", "@type": "@id" },
        "of-subtree": { "@id": "bt:of-subtree", "@type": "@id" },

        "evt": "https://hbrs-sesame.github.io/metamodels/coordination/event#",
        "el-conn": { "@id": "evt:event-loop-connection", "@type": "@id" }
    },
    "@graph": [
        { "@id": "pickup", "@type": "bt:Action" },
        { "@id": "approach", "@type": "bt:Action" },
        { "@id": "grasp", "@type": "bt:Action" },
        { "@id": "lift", "@type": "bt:Action" },
        {
            "@id": "approach-events", "@type": "bt:ActionWithEvents", "of-action": "approach",
            "start-event": "pickup-events:approach-start", "end-event": "pickup-events:approach-end"
        },
        {
            "@id": "grasp-events", "@type": "bt:ActionWithEvents", "of-action": "grasp",
            "start-event": "pickup-events:grasp-start", "end-event": "pickup-events:grasp-end"
        },
        {
            "@id": "lift-events", "@type": "bt:ActionWithEvents", "of-action": "lift",
            "start-event": "pickup-events:lift-start", "end-event": "pickup-events:lift-end"
        },

        {
            "@id": "pickup-sequence", "@type": "bt:Sequence",
            "has-child": [ "approach", "grasp", "lift" ]
        },
        {
            "@id": "pickup-subtree", "@type": "bt:ActionSubtree",
            "parent": "pickup", "subroot": "pickup-sequence"
        },

        {
            "@id": "approach-mockup", "@type": "bt:PythonActionImpl",
            "of-action": "approach",
            "py:module": "bdd_dsl.behaviours.mockup", "py:class-name": "Heartbeat",
            "py:ArgName": [ "heartbeat_duration", "message" ],
            "py:ArgValue": [ 0.2, "approach!" ]
        },
        {
            "@id": "grasp-mockup", "@type": "bt:PythonActionImpl",
            "of-action": "grasp",
            "py:module": "bdd_dsl.behaviours.mockup", "py:class-name": "Heartbeat",
            "py:ArgName": [ "heartbeat_duration", "message" ],
            "py:ArgValue": [ 0.2, "grasp!" ]
        },
        {
            "@id": "lift-mockup", "@type": "bt:PythonActionImpl",
            "of-action": "lift",
            "py:module": "bdd_dsl.behaviours.mockup", "py:class-name": "Heartbeat",
            "py:ArgName": [ "heartbeat_duration", "message" ],
            "py:ArgValue": [ 0.5, "lift!" ]
        },

        {
            "@id": "pickup-subtree-single-arm-mockup", "@type": "bt:SubtreeImpl",
            "of-subtree": "pickup-subtree",
            "uses-impl": [ "approach-mockup", "grasp-mockup", "lift-mockup" ]
        },

        {
            "@id": "pickup-single-arm-mockup", "@type": "bt:BehaviourTreeWithEvents",
            "uses-impl": "pickup-subtree-single-arm-mockup",
            "el-conn": "pickup-events:single-arm-pickup-el"
        },

        {
            "@id": "approach-rs", "@type": "bt:PythonActionImpl",
            "of-action": "approach",
            "py:module": "bdd_dsl.behaviours.robosuite", "py:class-name": "MoveEndEffector",
            "py:ArgName": [ "distance_threshold" ],
            "py:ArgValue": [ 0.01 ]
        },
        {
            "@id": "pickup-subtree-single-arm-rs", "@type": "bt:SubtreeImpl",
            "of-subtree": "pickup-subtree",
            "uses-impl": [ "approach-rs", "grasp-mockup", "lift-mockup" ]
        },
        {
            "@id": "pickup-single-arm-rs", "@type": "bt:BehaviourTreeWithEvents",
            "uses-impl": "pickup-subtree-single-arm-rs",
            "el-conn": "pickup-events:single-arm-pickup-el"
        }
    ]
}