diff --git a/pyproject.toml b/pyproject.toml index b270e657..f23e7360 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ docs = [ jupyter = ["ipywidgets", "ipympl"] -open3d = ["open3d-python"] +open3d = ["open3d; python_version < '3.13'"] torch = ["torch"] @@ -95,7 +95,7 @@ ocr = ["pytesseract"] all = [ "ipywidgets", "ipympl", - "open3d-python", + "open3d; python_version < '3.13'", "torch", "pytesseract", "rosbags", diff --git a/src/machinevisiontoolbox/PointCloud.py b/src/machinevisiontoolbox/PointCloud.py index aa848667..8611e5df 100644 --- a/src/machinevisiontoolbox/PointCloud.py +++ b/src/machinevisiontoolbox/PointCloud.py @@ -26,7 +26,7 @@ def __init__(self, arg: Any, depth_scale: float = 1.0, **kwargs) -> None: :type arg: :obj:`o3d.geometry.PointCloud`, :obj:`~machinevisiontoolbox.PointCloud`, ndarray(3,N) :param depth_scale: depth scale factor, defaults to 1.0 :type depth_scale: float, optional - :raises RuntimeError: PointCloud class requires Open3D to be installed: pip install open3d-python or pip install machinevision-toolbox-python[open3d] + :raises RuntimeError: PointCloud class requires Open3D to be installed: pip install open3d or pip install machinevision-toolbox-python[open3d] :raises ValueError: bad arguments This object wraps an Open3D :obj:`open3d.geometry.PointCloud` object. It can be @@ -50,7 +50,7 @@ def __init__(self, arg: Any, depth_scale: float = 1.0, **kwargs) -> None: if not _open3d: raise RuntimeError( "PointCloud class requires Open3D to be installed: " - "pip install open3d-python or " + "pip install open3d or " "pip install machinevision-toolbox-python[open3d]\n" " ** Note that Open3d typically does not run on the latest Python version(s)" ) @@ -60,7 +60,7 @@ def __init__(self, arg: Any, depth_scale: float = 1.0, **kwargs) -> None: if not _open3d: raise RuntimeError( "PointCloud class requires Open3D to be installed: " - "pip install open3d-python or " + "pip install open3d or " "pip install machinevision-toolbox-python[open3d]" ) @@ -273,7 +273,7 @@ def DepthImage( :type rgb: :class:`~machinevisiontoolbox.Image`, optional :param depth_scale: depth scale factor, defaults to 1.0 :type depth_scale: float, optional - :raises RuntimeError: PointCloud class requires Open3D to be installed: pip install open3d-python or pip install machinevision-toolbox-python[open3d] + :raises RuntimeError: PointCloud class requires Open3D to be installed: pip install open3d or pip install machinevision-toolbox-python[open3d] :raises ValueError: input images has wrong number of planes The depth image is converted to a point cloud using the Open3D, and the pixel diff --git a/src/machinevisiontoolbox/Sources.py b/src/machinevisiontoolbox/Sources.py index 3658fd95..d3d7baba 100644 --- a/src/machinevisiontoolbox/Sources.py +++ b/src/machinevisiontoolbox/Sources.py @@ -2346,7 +2346,7 @@ def _pointcloud_to_ros_message( if not _open3d_available: raise ImportError( "open3d is required for PointCloud publish support. " - "Install it with: pip install open3d-python " + "Install it with: pip install open3d " "or pip install machinevision-toolbox-python[open3d]" ) assert o3d is not None @@ -3573,7 +3573,7 @@ def __iter__(self) -> Iterator[Any]: if not _open3d_available: raise ImportError( "open3d is required to read PointCloud2 messages. " - "Install it with: pip install open3d-python " + "Install it with: pip install open3d " "or pip install machinevision-toolbox-python[open3d]" ) assert o3d is not None @@ -3770,7 +3770,7 @@ def disp( if not _open3d_available: raise ImportError( "open3d is required for point cloud display. " - "Install it with: pip install open3d-python " + "Install it with: pip install open3d " "or pip install machinevision-toolbox-python[open3d]" ) assert o3d is not None