diff --git a/README.md b/README.md index 3efadf10..a2db78e4 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,13 @@ Install a snapshot from PyPI pip install spatialmath-python ``` +Note that if you are using ROS2, you may run into version conflicts when using `rosdep`, particularly +concerning `matplotlib`. If this happens, you can enable optional version pinning with + +``` +pip install spatialmath-python[ros-humble] +``` + ## From GitHub Install the current code base from GitHub and pip install a link to that cloned copy diff --git a/pyproject.toml b/pyproject.toml index cead2ac3..4295f2f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,9 +36,9 @@ keywords = [ ] dependencies = [ - "numpy>=1.22,<2", # Cannot use 2.0 due to matplotlib version pinning. + "numpy>=1.22", "scipy", - "matplotlib==3.5.1", # Large user-base has apt-installed python3-matplotlib (ROS2) which is pinned to this version. + "matplotlib", "ansitable", "typing_extensions", "pre-commit", @@ -70,6 +70,11 @@ docs = [ "sphinx-autodoc-typehints", ] +ros-humble = [ + "matplotlib==3.5.1", # Large user-base has apt-installed python3-matplotlib (ROS2) which is pinned to this version. + "numpy<2", # Cannot use 2.0 due to matplotlib version pinning. +] + [build-system] requires = ["setuptools", "oldest-supported-numpy"]