Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ Available options are:
- `swift` install [Swift](https://github.com/jhavl/swift), a web-based visualizer
- `qp` install quadratic-programming IK dependencies (`qpsolvers`, `quadprog`)
- `collision` install collision checking with [coal](https://github.com/coal-library/coal) and `trimesh`
- `all` install `swift`, `qp`, and `collision`
- `tool` install `IPython` and `pygments`, needed to run the `rtbtool` interactive shell
- `all` install `swift`, `qp`, `collision`, and `tool`

> **Windows note:** `coal` does not publish Windows wheels on PyPI, so the
> `collision`/`all` extras skip it there and collision checking is
Expand Down Expand Up @@ -155,7 +156,13 @@ pip install roboticstoolbox-python[qp]
pip install roboticstoolbox-python[collision]
```

- Everything (swift + qp + collision)
- `rtbtool` interactive shell dependencies only

```shell script
pip install roboticstoolbox-python[tool]
```

- Everything (swift + qp + collision + tool)

```shell script
pip install roboticstoolbox-python[all]
Expand Down
9 changes: 7 additions & 2 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Available extras:
- ``swift`` install `Swift <https://github.com/jhavl/swift>`_, a web-based visualizer
- ``qp`` install quadratic-programming IK dependencies (``qpsolvers``, ``quadprog``)
- ``collision`` install collision checking with `coal <https://github.com/coal-library/coal>`_ and ``trimesh``
- ``all`` install ``swift``, ``qp``, and ``collision``
- ``tool`` install ``IPython`` and ``pygments``, needed to run the ``rtbtool`` interactive shell
- ``all`` install ``swift``, ``qp``, ``collision``, and ``tool``

.. warning:: ``coal`` does not publish Windows wheels on PyPI, so the
``collision``/``all`` extras skip it on Windows and collision checking
Expand Down Expand Up @@ -46,7 +47,11 @@ Install matrix:

pip install roboticstoolbox-python[collision]

- Everything (swift + qp + collision)::
- ``rtbtool`` interactive shell dependencies only::

pip install roboticstoolbox-python[tool]

- Everything (swift + qp + collision + tool)::

pip install roboticstoolbox-python[all]

Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,17 @@ collision = ["coal; sys_platform != 'win32'", "trimesh"]

qp = ["qpsolvers", "quadprog"]

tool = ["ipython", "pygments"]

all = [
"swift-sim>=1.0.0",
"websockets",
"qpsolvers",
"quadprog",
"coal; sys_platform != 'win32'",
"trimesh",
"ipython",
"pygments",
]

dev = [
Expand Down
16 changes: 11 additions & 5 deletions src/roboticstoolbox/bin/rtbtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
"""

# import stuff
from pygments.token import Token
from IPython.terminal.prompts import Prompts
from IPython.terminal.prompts import ClassicPrompts
from traitlets.config import Config
import IPython
import argparse
from pathlib import Path
import shlex
Expand Down Expand Up @@ -221,6 +216,17 @@ def startup():


def main():
try:
import IPython
from IPython.terminal.prompts import Prompts
from pygments.token import Token
from traitlets.config import Config
except ImportError as e:
sys.exit(
f"rtbtool requires IPython and pygments, which are not "
f"installed ({e}).\nInstall them with:\n\n"
" pip install roboticstoolbox-python[tool]\n"
)

args, ipython_args = parse_arguments()

Expand Down