Conversation
maxxgx
added this pull request to stack #313
October 2, 2026 15:25
…t profile The robot profile is now the single source of an arm's joint names, gripper, wrist camera and autopilot kinematics. Each arm is a SimArm, a profile under a mount prefix, which resolves its joints and actuators after every compile, reads state, writes targets, converts units and homes. MuJoCoSO101 holds one arm and BiMuJoCoSO101 two; their joint order and wrist camera names follow from the profile and prefixes instead of hardcoded SO-101 lists. Remove constants that duplicated the profile (JOINT_LIMITS_DEG, NUM_JOINTS, BIMANUAL_NUM_JOINTS). The unit helpers move to sim_arm and take a gripper mask instead of guessing the gripper from joint names. Observations, actions, autopilot and homing are bit-identical to before on every scene in both units. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry's joints Studio's single-arm and bimanual MuJoCo followers shared one probe that only checked that the owner name answered, so either entry could attach to the other's simulation and fail on its first action. Each entry now probes for its own joint order and logs the mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maxxgx
force-pushed
the
max/mujoco-robot-profiles
branch
from
October 2, 2026 15:31
e2919be to
2450462
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Profile-driven behavior remains incomplete in model loading and conveyor automation.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Refactors SO-101 simulation around profile-based arms, preparing the MuJoCo plugin for other robots while tightening Studio discovery.
Changes:
- Adds
SimArmfor joint binding, state, actions, units and homing. - Moves kinematics and camera naming into profile-driven paths.
- Adds stricter joint-layout probes, regression tests and documentation.
| File | Description |
|---|---|
| packages/physicalai-mujoco-so101-plugin/tests/test_studio_catalog.py | Tests joint-aware probes. |
| packages/physicalai-mujoco-so101-plugin/tests/test_sim_arm.py | Tests arm binding and operations. |
| packages/physicalai-mujoco-so101-plugin/tests/test_scene_models.py | Updates scene compatibility checks. |
| packages/physicalai-mujoco-so101-plugin/tests/test_robot_profile.py | Checks profile-derived layouts. |
| packages/physicalai-mujoco-so101-plugin/tests/test_mujoco_robot.py | Updates unit-conversion tests. |
| packages/physicalai-mujoco-so101-plugin/tests/test_main.py | Checks arm-derived camera streams. |
| packages/physicalai-mujoco-so101-plugin/src/physicalai_mujoco_so101_plugin/studio_catalog.py | Validates owner joint layouts. |
| packages/physicalai-mujoco-so101-plugin/src/physicalai_mujoco_so101_plugin/sim_arm.py | Introduces per-arm simulation handling. |
| packages/physicalai-mujoco-so101-plugin/src/physicalai_mujoco_so101_plugin/robot_profile.py | Adds gripper and kinematics metadata. |
| packages/physicalai-mujoco-so101-plugin/src/physicalai_mujoco_so101_plugin/mujoco_robot.py | Delegates joint operations to arms. |
| packages/physicalai-mujoco-so101-plugin/src/physicalai_mujoco_so101_plugin/conveyor_demo.py | Accepts profile-defined kinematics. |
| packages/physicalai-mujoco-so101-plugin/src/physicalai_mujoco_so101_plugin/constants.py | Removes duplicated layout constants. |
| packages/physicalai-mujoco-so101-plugin/src/physicalai_mujoco_so101_plugin/__main__.py | Derives cameras from robot arms. |
| packages/physicalai-mujoco-so101-plugin/README.md | Documents profile-based arms. |
| packages/physicalai-mujoco-so101-plugin/CHANGELOG.md | Records refactor and probe changes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| model: object, | ||
| conveyor: ConveyorSort, | ||
| config: DemoConfig | None = None, | ||
| profile: RobotProfile = SO101_PROFILE, |
| self.conveyor = conveyor | ||
| self.config = config or DemoConfig() | ||
| self.ik = ArmIK(model) | ||
| self.ik = ArmIK(model, profile.kinematics) |
| """Validate and adopt the joint unit. | ||
| """Validate the joint unit and build the unbound arms that use it.""" | ||
| self._unit: JointUnit = validate_joint_unit(unit) | ||
| self._arms: tuple[SimArm, ...] = tuple(SimArm(self.PROFILE, prefix, self._unit) for prefix in self.ARM_PREFIXES) |
This branch has not been deployed
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.

Stacked on #312. Prepares the MuJoCo plugin for robots other than the SO-101. The simulation behaves exactly as before.
Changes
RobotProfileis the single source of an arm's joints, ranges, gripper, wrist camera and autopilot kinematics.SimArmdrives one arm under a name prefix.MuJoCoSO101uses one,BiMuJoCoSO101two, with no hardcoded SO-101 joint or camera names.JOINT_LIMITS_DEG,NUM_JOINTS,BIMANUAL_NUM_JOINTS); nothing outside the plugin used them.Validation
normalizedanddegreesunits, with autopilot and homing, gives bit-identical outputs to refactor(mujoco): use MuJoCo Menagerie's SO-101 and attach it to robot-free scenes #312.Next: add Trossen WidowX AI (
trossen_wxai) as a second profile.