build: require mplib>=0.2.1 and add API compatibility shim - #14
build: require mplib>=0.2.1 and add API compatibility shim#14shaoxiang wants to merge 2 commits into
Conversation
mplib 0.1.x segfaults when RoboMME's DemonstrationWrapper builds a Panda motion planner. mplib 0.2.1 resolves the crash, but changes two public APIs that ManiSkill/RoboMME code was written against: - Planner.set_base_pose now expects an mplib.pymp.Pose instead of a 7-DOF numpy array. - plan_screw / plan_qpos_to_pose no longer accept use_point_cloud. Changes: - Pin mplib>=0.2.1 in pyproject.toml. - Add src/robomme/robomme_env/utils/mplib_compat.py: a centralized monkey-patch that adapts legacy callers to the 0.2.x signatures. - Install the shim on import in DemonstrationWrapper, RecordWrapper, and subgoal_planner_func so every planner instantiation path is covered. - Update the direct plan_screw call in subgoal_planner_func.py to pass a sapien.Pose and drop the unsupported use_point_cloud kwarg. Smoke-tested on PickXtimes with skip_motion_planning=False: planner initializes and 100 rollout steps complete without segfault. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Thanks for this — the shim approach is right, and the 1. So 2. The shim misses the Trajectory generation uses two planners:
In demonstration / dataset generation the solver tries screw first and falls 0.2.x renamed The screw path works (line 152 passes a legacy array the shim converts), so a Fix: alias |
- Add [tool.uv] override-dependencies so uv sync resolves mplib>=0.2.1 despite mani-skill's mplib==0.1.1 pin. - Regenerate uv.lock (mplib 0.1.1 -> 0.2.1). - Extend mplib_compat shim to wrap plan_pose on 0.2.x and add a plan_qpos_to_pose alias, fixing the screw->RRT* fallback. - Drop obsolete RRT* kwargs (planner_name, use_point_cloud) while preserving rrt_range/planning_time where supported. Co-Authored-By: Claude <noreply@anthropic.com>
|
更新了两个 reviewer 提到的问题:
本地已 smoke-test 通过 mplib 0.2.1。请 review。 |
|
Thanks @shaoxiang for the work here! We weren't able to reproduce the segfault on our end, and can't fully verify the underlying mplib swap (the pin is owned by ManiSkill upstream) — so we won't merge this into |
Summary
Upgrade
mplibfrom 0.1.x to>=0.2.1and add a compatibility shim so existing ManiSkill/RoboMME motion-planning code continues to work.Problem
mplib0.1.x segfaults insidemplib.pymp.ArticulatedModelwhenDemonstrationWrapperbuilds a Panda motion planner for live motion planning.mplib0.2.1 fixes the crash but introduces two breaking API changes:Planner.set_base_pose()now expects anmplib.pymp.Poseobject instead of a 7-DOF numpy array.Planner.plan_screw()/Planner.plan_qpos_to_pose()no longer acceptuse_point_cloud.Changes
pyproject.toml: addmplib>=0.2.1.src/robomme/robomme_env/utils/mplib_compat.py: monkey-patchmplib.Plannermethods to transparently adapt legacy callers to 0.2.x signatures.DemonstrationWrapper,RecordWrapper, andsubgoal_planner_func.plan_screwcall insubgoal_planner_func.pyto pass asapien.Poseand remove the unsupporteduse_point_cloudkwarg.Verification
Smoke-tested on
PickXtimeswithskip_motion_planning=False:mplib==0.2.1