Datasets:
Download code/robohome/src/engine/source/packages/plugins/tasks/builtins.py from RoboParty/RoboHome: direct link, hf CLI and curl.
- Browser
- Download file 4.39 kB
-
https://huggingface.co/datasets/RoboParty/RoboHome/resolve/86ffa4ecc1047bb404fdc283987bd22cbc259a96/code/robohome/src/engine/source/packages/plugins/tasks/builtins.py
- Command line
-
hf download hf://datasets/RoboParty/RoboHome@86ffa4ecc1047bb404fdc283987bd22cbc259a96/code/robohome/src/engine/source/packages/plugins/tasks/builtins.py
-
curl -L -o builtins.py https://huggingface.co/datasets/RoboParty/RoboHome/resolve/86ffa4ecc1047bb404fdc283987bd22cbc259a96/code/robohome/src/engine/source/packages/plugins/tasks/builtins.py
4.39 kB
| from __future__ import annotations | |
| from packages.asset_registry.certification_models import CertificationProfile | |
| from packages.plugins.tasks.base import ( | |
| EntityRoleRequirement, | |
| InterfaceOnlyTaskPlugin, | |
| TaskPlugin, | |
| TaskPluginRegistry, | |
| TaskPluginSpec, | |
| ) | |
| from packages.plugins.tasks.cabinet_open_close import CabinetOpenClosePlugin | |
| from packages.plugins.tasks.pick_move_place import PickMovePlacePlugin | |
| from packages.schemas.models import PredicateSpec | |
| def _interface_plugin( | |
| plugin_id: str, | |
| *, | |
| task_type: str, | |
| capabilities: set[str], | |
| certifications: set[CertificationProfile], | |
| skills: list[str], | |
| negative_controls: list[str], | |
| ) -> InterfaceOnlyTaskPlugin: | |
| return InterfaceOnlyTaskPlugin( | |
| TaskPluginSpec( | |
| plugin_id=plugin_id, | |
| version="1.0", | |
| task_type=task_type, | |
| implementation_status="interface_only", | |
| required_robot_capabilities=capabilities, | |
| required_asset_certifications=certifications, | |
| entity_roles=[ | |
| EntityRoleRequirement( | |
| role_id="task_asset", | |
| task_role="MANIPULATED", | |
| category="plugin_specific_asset", | |
| required_certifications=certifications, | |
| ), | |
| EntityRoleRequirement( | |
| role_id="approach_zone", task_role="REGION", category="approach_zone" | |
| ), | |
| EntityRoleRequirement( | |
| role_id="stance_zone", task_role="REGION", category="stance_zone" | |
| ), | |
| ], | |
| initial_state=[], | |
| goal_predicates=[PredicateSpec(name="plugin_goal", subject="task_asset")], | |
| safety_predicates=[PredicateSpec(name="no_safety_event", subject="robot")], | |
| approach_zones=["approach_zone"], | |
| stance_zones=["stance_zone"], | |
| skill_graph=skills, | |
| witness_builder=f"{plugin_id}.witness_v1", | |
| evaluator="predicate_graph_v1", | |
| negative_control_tests=negative_controls, | |
| ) | |
| ) | |
| def builtin_task_plugins() -> list[TaskPlugin]: | |
| return [ | |
| CabinetOpenClosePlugin(), | |
| PickMovePlacePlugin(), | |
| _interface_plugin( | |
| "door_open_close", | |
| task_type="door_open_close", | |
| capabilities={"locomotion", "articulated_interaction"}, | |
| certifications={CertificationProfile.HINGE_DOOR_V1}, | |
| skills=["navigate", "open_door", "close_door"], | |
| negative_controls=["no_op", "skip_open", "skip_close"], | |
| ), | |
| _interface_plugin( | |
| "low_pick", | |
| task_type="low_pick", | |
| capabilities={"locomotion", "single_hand_grasp", "low_reach", "stand_recovery"}, | |
| certifications={CertificationProfile.LOW_PICK_V1, CertificationProfile.GRASP_V1}, | |
| skills=["navigate", "squat", "grasp", "recover_stand"], | |
| negative_controls=["no_op", "standing_only"], | |
| ), | |
| _interface_plugin( | |
| "kneeling_pick", | |
| task_type="kneeling_pick", | |
| capabilities={"kneel", "single_hand_grasp", "stand_recovery"}, | |
| certifications={CertificationProfile.LOW_PICK_V1, CertificationProfile.GRASP_V1}, | |
| skills=["navigate", "kneel", "grasp", "recover_stand"], | |
| negative_controls=["no_op", "no_knee_contact", "unsafe_recovery"], | |
| ), | |
| _interface_plugin( | |
| "bimanual_carry", | |
| task_type="bimanual_carry", | |
| capabilities={"bimanual_grasp", "load_carry", "locomotion"}, | |
| certifications={CertificationProfile.BIMANUAL_V1}, | |
| skills=["navigate", "bimanual_grasp", "carry", "bimanual_place"], | |
| negative_controls=["no_op", "single_hand_bypass", "random_policy"], | |
| ), | |
| _interface_plugin( | |
| "pedal_bin", | |
| task_type="pedal_bin", | |
| capabilities={"foot_pedal_interaction", "single_hand_grasp", "balance"}, | |
| certifications={CertificationProfile.FOOT_PEDAL_V1, CertificationProfile.GRASP_V1}, | |
| skills=["navigate", "press_pedal", "grasp", "place"], | |
| negative_controls=["no_op", "hand_press_bypass", "unstable_press"], | |
| ), | |
| ] | |
| def default_task_plugin_registry() -> TaskPluginRegistry: | |
| return TaskPluginRegistry(builtin_task_plugins()) | |