Skip to content

Example run failed #112

@HeLongHuang

Description

@HeLongHuang

the demo in you documentation can not run, please update.


TypeError Traceback (most recent call last)
Cell In[5], line 6
3 import sapien.core as sapien
4 from sapien.utils.viewer import Viewer
----> 6 import mplib
7 from mplib import Pose
10 class DemoSetup:

File ~/miniconda3/envs/noah_hlh/lib/python3.9/site-packages/mplib/init.py:3
1 from importlib.metadata import version
----> 3 from .planner import Planner
4 from .pymp import (
5 ArticulatedModel,
6 AttachedBody,
(...)
9 set_global_seed,
10 )
12 version = version("mplib")

File ~/miniconda3/envs/noah_hlh/lib/python3.9/site-packages/mplib/planner.py:16
14 from .planning.ompl import FixedJoint, OMPLPlanner
15 from .pymp import ArticulatedModel, PlanningWorld, Pose
---> 16 from .urdf_utils import generate_srdf, replace_urdf_package_keyword
19 class Planner:
20 """Motion planner"""

File ~/miniconda3/envs/noah_hlh/lib/python3.9/site-packages/mplib/urdf_utils.py:114
104 _ = ET.SubElement(
105 root,
106 "disable_collisions",
107 attrib={"link1": link1, "link2": link2, "reason": "Never"},
108 )
110 return minidom.parseString(ET.tostring(root)).toprettyxml(indent=" ")
113 def replace_urdf_package_keyword(
--> 114 urdf_path: str | Path,
115 new_package_keyword: str = "",
116 ) -> Path:
117 """
118 Some ROS URDF files use package:// keyword to refer the package dir.
119 Replace it with the given string (default is empty)
(...)
123 :return: Path to the modified URDF file
124 """
125 urdf_path = Path(urdf_path)

TypeError: unsupported operand type(s) for |: 'type' and 'type'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions