OpenGHz's picture
Add fair-comparison/flow-v1
0a3f650 verified
Raw History Blame Contribute Delete
1.1 kB
"""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 tasks use panda_wristcam with the
same state25 (qpos9, qvel9, TCP7) and two-camera RGB layout; LiftPegUpright
defaults to the plain panda, so it runs as the registered wrist-camera variant.
"""
import lim.lift_peg_env # noqa: F401 (registers LiftPegUprightWristcam-v1)
TASKS = {
"StackCube-v1": ("stack_cube", ("cubeA", "cubeB")),
"StackPyramid-v1": ("stack_pyramid", ("cubeA", "cubeB", "cubeC")),
"PegInsertionSide-v1": ("peg_insertion_side", ("peg", "box")),
"LiftPegUprightWristcam-v1": ("lift_peg_upright", ("peg",)),
}
def expert_module(env_id, override=None):
"""The task's native expert solution module, or the module named by `override`."""
import importlib
if env_id not in TASKS:
raise ValueError(f"No annotated expert for {env_id}")
return importlib.import_module(
override or f"mani_skill.examples.motionplanning.panda.solutions.{TASKS[env_id][0]}"
)