File size: 756 Bytes
2a723eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""Tasks with an annotated native Panda motion-planning expert.

Each entry names the ManiSkill expert solution module and the actors whose
poses are logged during evaluation. All three tasks use panda_wristcam with
the same state25 (qpos9, qvel9, TCP7) and two-camera RGB layout.
"""

TASKS = {
    "StackCube-v1": ("stack_cube", ("cubeA", "cubeB")),
    "StackPyramid-v1": ("stack_pyramid", ("cubeA", "cubeB", "cubeC")),
    "PegInsertionSide-v1": ("peg_insertion_side", ("peg", "box")),
}


def expert_module(env_id):
    import importlib

    if env_id not in TASKS:
        raise ValueError(f"No annotated expert for {env_id}")
    return importlib.import_module(
        f"mani_skill.examples.motionplanning.panda.solutions.{TASKS[env_id][0]}"
    )