Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install vpython as backend? #444

Open
NirViaje opened this issue Jun 2, 2024 · 1 comment
Open

How to install vpython as backend? #444

NirViaje opened this issue Jun 2, 2024 · 1 comment

Comments

@NirViaje
Copy link

NirViaje commented Jun 2, 2024

Check here first

Common issues

Describe the bug

Traceback (most recent call last):
File "rtb_neo.py", line 51, in
robot.plot(qt.q, backend=args.backend)
File "/home/nirj/miniconda3/lib/python3.8/site-packages/roboticstoolbox/robot/BaseRobot.py", line 2331, in plot
env = self._get_graphical_backend(backend)
File "/home/nirj/miniconda3/lib/python3.8/site-packages/roboticstoolbox/robot/BaseRobot.py", line 2230, in _get_graphical_backend
raise ValueError("unknown backend", backend) # pragma nocover
ValueError: ('unknown backend', 'vpython')

Version information

rtb 1.1.0
python 3.8.10
pip installed vpython 7.6.5

Did you install from PyPI or GitHub?
If PyPI what version number?
If GitHub what commit hash?

Robotics Toolbox depends heavily on two other packages: Swift (3D graphics) and SpatialMath toolbox (underpinning maths utilities). If you think your issue is related to these, then please answer the questions above for them.

To Reproduce
Steps to reproduce the behavior:

  1. The shortest, complete, Python script that exhibits the bug.
  2. The script output, including error messages.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Your OS (MacOS, Linux, Windows).
  • Your Python version.

Additional context
Add any other context about the problem here.

@a-camarillo
Copy link

It looks like vpython is not a supported backend.

def _get_graphical_backend(
self, backend: Union[L["swift", "pyplot", "pyplot2"], None] = None
) -> Union[Swift, PyPlot, PyPlot2]:
default = self.default_backend

If vpython is globally installed through pip my suggestion is to try installing rtb in a virtual environment and see if that separation from your global dependencies fixes the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants