fix: franka hardware testing#309
Open
juelg wants to merge 45 commits into
Open
Conversation
Co-authored-by: Copilot <copilot@github.com>
0a990fe to
0aa68c9
Compare
Co-authored-by: Copilot <copilot@github.com>
65ae747 to
600b257
Compare
Wire up the previously-undefined `scene`/`ROBOT_INSTANCE` names in the example scripts, drop unused imports, move the typer.Option default and the unnecessary else-after-return into ruff-compliant form, and add rule-specific noqa comments for the function-scoped torch/torchvision imports in the LeRobot joint converter.
Exclude examples/inference/franka.py from mypy to resolve a duplicate "franka" module clash with examples/teleop/franka.py (whose franka.py is the one example/teleop/quest_align_frame.py actually imports from). Make LimitedAbsoluteAction._get_current()'s return annotation honest (np.ndarray | common.Pose) since it returns a Pose in cartesian control modes, and add a cast at the one call site that lacked one. Add rule-specific type: ignore / noqa comments for the remaining cases where the underlying stubs don't match runtime behavior (FR3-only robot methods, duckdb's loosely-typed schema introspection, Optional fields that are known to be set, and the lerobot torch imports).
StorageWrapper._flush() inferred and permanently cached its pyarrow schema from whatever rows happened to be in the first flush. Since "action" is logged one step behind (frame 0 has no prior action), an unlucky first batch consisting only of that null action got pyarrow's null type pinned for the field forever, so every later batch with a real action value failed with "Invalid null value". Defer flushing until the buffered rows yield a schema with no null-typed fields instead of caching a too-eager guess. Separately, close() called _flush() and only sent the writer thread's stop sentinel afterwards, so any exception during that flush (such as the one above) left the background ThreadPoolExecutor thread blocked on an empty queue forever, hanging the whole process at interpreter exit. Wrap the flush in try/finally so the sentinel is always sent. Also add the include_rotation field quest.py now reads to the QuestOperator test config double, which test_consume_action_swaps_ gripper_with_controller was missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.