pantor / ruckig

Motion Generation for Robots and Machines. Real-time. Jerk-constrained. Time-optimal.
https://ruckig.com
MIT License
635 stars 155 forks source link

Tutorial plot failure #171

Closed rtkg closed 8 months ago

rtkg commented 8 months ago

The first Python example fails when trying to plot with following error:

AttributeError: type object 'Plotter' has no attribute 'plot_trajectory'

I'm running Ubuntu 22.04 with version 1.3.20 of the Python Plotter library.

pantor commented 8 months ago

The plotter class refers to this file in the test directory, and not to a third-party package. For a quick solution, you could add this directory to your PYTHONPATH, set sys.path before import plotter, or just copy-paste the file into the examples directory.

I'll add a comment / fix to make this more clear and easy to use. Thanks for catching that!

rtkg commented 8 months ago

Perfect, thanks. One small additional note: I think the Path class needs to be imported explicitly as well.

from pathlib import Path

pantor commented 8 months ago

Should be fixed now.