Extract manipulation plan execution manager#3183
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
d5c492a to
945f2c0
Compare
❌ 6 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
| UNKNOWN = auto() | ||
|
|
||
|
|
||
| class ExecutionDispatchOutcome(Enum): |
There was a problem hiding this comment.
how is this different from coordinator dispatch outcome can we merge them
|
|
||
| plan_start_tolerance: float = 1e-6 | ||
|
|
||
| def __post_init__(self) -> None: |
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class ExecutionTarget: |
There was a problem hiding this comment.
discuss with me about whether using pydantic is good here. it's good for value validation for sure
| ... | ||
|
|
||
|
|
||
| class CoordinatorExecutionAdapter: |
There was a problem hiding this comment.
maybe should put this into control coordinator's position? Since this looks like a generic client
| # Coordinator integration (lazy initialized) | ||
| self._coordinator_client: RPCClient | None = None | ||
| self._execution_manager: PlanExecutionManager | None = None | ||
| self._execution_manager_client: RPCClient | None = None |
There was a problem hiding this comment.
I guess we should not give execution manager and client a none type at all - none type is only because we need to initilaize in a later lifecycle. we should just declare here and just assign in later init, and there won't be any reference to this variable by the logic of whole system:
self._execution_manager: PlanExecutionManager| return True | ||
|
|
||
| def _get_coordinator_client(self) -> RPCClient | None: | ||
| """Get or create coordinator RPC client (lazy init).""" |
There was a problem hiding this comment.
let's just don't lazy init here. init normally as other classes in this module as we almost always need this
| # Translate joint names | ||
| coordinator_names = [ | ||
| robot_config.get_coordinator_joint_name(j) for j in trajectory.joint_names | ||
| def _get_execution_manager(self) -> PlanExecutionManager | None: |
| self._state_lock = threading.Lock() | ||
| self._dispatch_lock = threading.Lock() | ||
| self._cancel_lock = threading.Lock() |
There was a problem hiding this comment.
validate that all three locks are required here and can't be merged
| self._possibly_active_tasks.add(dispatch.task_name) | ||
|
|
||
| outcome = self._coordinator.execute(dispatch.task_name, dispatch.trajectory) | ||
| if outcome is CoordinatorDispatchOutcome.ACCEPTED: |
| self._cancellation_in_progress = True | ||
| self._generation += 1 | ||
| try: | ||
| with self._dispatch_lock: |
There was a problem hiding this comment.
so dirty three locks are used together...
Summary
PlanExecutionManagerControlCoordinatorVerification
openspec validate extract-plan-execution-managerbin/doclinksandbin/run-doc-codeblocks --cion the updated manipulation docsdimos/robot/all_blueprints.pyis unchangedOpenSpec
All 27 implementation and verification tasks are complete.