Adding robocasa server and client for batch inference#151
Merged
Conversation
shuheng-liu
requested changes
Mar 26, 2026
Member
shuheng-liu
left a comment
There was a problem hiding this comment.
can we add documentation/tutorial on how to set up Robocasa? I assume it involves setting up some extra dependency
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a RoboCasa WebSocket-based policy inference integration to OpenTau, enabling remote action inference from RoboCasa observations (including a batched request/response wire protocol) and providing a threaded rollout client.
Changes:
- Introduces an async WebSocket server that loads an OpenTau policy (or runs a stub policy) and serves single and batched inference requests.
- Adds a threaded RoboCasa rollout client that batches observations across worker threads into one WebSocket request per timestep and records rollout results.
- Adds a
robocasascripts package initializer.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/opentau/scripts/robocasa/server.py |
WebSocket policy server with OpenTau policy loading + batched inference protocol support. |
src/opentau/scripts/robocasa/client.py |
Threaded rollout client that batches observations/actions over WebSockets and writes rollout summaries/videos. |
src/opentau/scripts/robocasa/__init__.py |
Declares the robocasa scripts subpackage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tions to avoid policy.reset for each new env
shuheng-liu
previously approved these changes
Mar 26, 2026
shuheng-liu
approved these changes
Mar 26, 2026
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.
What this does
Integrating robocasa simulator with client and server using web sockets to communicate
How it was tested
Start server with:
python -m opentau.scripts.robocasa_server_async --config_path /path/to/train_config.json --robocasa_action_dim 12 --robocasa_port 8765
Start client with:
MUJOCO_GL=osmesa python -m robocasa.scripts.client_async NavigateKitchen --num-rollouts 30 --num-parallel 5 --host 0.0.0.0 --port 8765
Checklist
Note: Before submitting this PR, please read the contributor guideline.