From 3269c322687ab53571078db02970a999f6738989 Mon Sep 17 00:00:00 2001 From: pantor Date: Tue, 21 Nov 2023 10:43:06 +0100 Subject: [PATCH] move plotter helper class to examples --- examples/01_position.py | 5 +---- examples/03_waypoints.py | 5 +---- examples/04_waypoints_online.py | 5 +---- examples/05_velocity.py | 5 +---- examples/06_stop.py | 5 +---- examples/07_minimum_duration.py | 5 +---- examples/08_per_section_minimum_duration.py | 5 +---- {test => examples}/plotter.py | 0 8 files changed, 7 insertions(+), 28 deletions(-) rename {test => examples}/plotter.py (100%) diff --git a/examples/01_position.py b/examples/01_position.py index 3ed25973..2db5fc79 100644 --- a/examples/01_position.py +++ b/examples/01_position.py @@ -43,10 +43,7 @@ # Plot the trajectory # from pathlib import Path - # import sys - # project_path = Path(__file__).parent.parent.absolute() - # sys.path.append(str(project_path / 'test')) # For plotter.py - # from plotter import Plotter + # project_path = Path(__file__).parent.parent.absolute() # Plotter.plot_trajectory(project_path / 'examples' / '01_trajectory.pdf', otg, inp, out_list, plot_jerk=False) diff --git a/examples/03_waypoints.py b/examples/03_waypoints.py index 1d8b71c3..d1448c8f 100644 --- a/examples/03_waypoints.py +++ b/examples/03_waypoints.py @@ -52,10 +52,7 @@ # Plot the trajectory # from pathlib import Path - # import sys - # project_path = Path(__file__).parent.parent.absolute() - # sys.path.append(str(project_path / 'test')) # For plotter.py - # from plotter import Plotter + # project_path = Path(__file__).parent.parent.absolute() # Plotter.plot_trajectory(project_path / 'examples' / '03_trajectory.pdf', otg, inp, out_list, plot_jerk=False) diff --git a/examples/04_waypoints_online.py b/examples/04_waypoints_online.py index 07f1f6bc..6e68a18d 100644 --- a/examples/04_waypoints_online.py +++ b/examples/04_waypoints_online.py @@ -53,10 +53,7 @@ # Plot the trajectory # from pathlib import Path - # import sys - # project_path = Path(__file__).parent.parent.absolute() - # sys.path.append(str(project_path / 'test')) # For plotter.py - # from plotter import Plotter + # project_path = Path(__file__).parent.parent.absolute() # Plotter.plot_trajectory(project_path / 'examples' / '04_trajectory.pdf', otg, inp, out_list, plot_jerk=False) diff --git a/examples/05_velocity.py b/examples/05_velocity.py index 27b4a313..6f10c045 100644 --- a/examples/05_velocity.py +++ b/examples/05_velocity.py @@ -43,10 +43,7 @@ # Plot the trajectory # from pathlib import Path - # import sys - # project_path = Path(__file__).parent.parent.absolute() - # sys.path.append(str(project_path / 'test')) # For plotter.py - # from plotter import Plotter + # project_path = Path(__file__).parent.parent.absolute() # Plotter.plot_trajectory(project_path / 'examples' / '05_trajectory.pdf', otg, inp, out_list, plot_jerk=False) diff --git a/examples/06_stop.py b/examples/06_stop.py index 519b6c13..b11e3465 100644 --- a/examples/06_stop.py +++ b/examples/06_stop.py @@ -57,10 +57,7 @@ # Plot the trajectory # from pathlib import Path - # import sys - # project_path = Path(__file__).parent.parent.absolute() - # sys.path.append(str(project_path / 'test')) # For plotter.py - # from plotter import Plotter + # project_path = Path(__file__).parent.parent.absolute() # Plotter.plot_trajectory(project_path / 'examples' / '06_trajectory.pdf', otg, inp, out_list, plot_jerk=False, time_offsets=time_offsets) diff --git a/examples/07_minimum_duration.py b/examples/07_minimum_duration.py index 9e37c8a3..e254c9fc 100644 --- a/examples/07_minimum_duration.py +++ b/examples/07_minimum_duration.py @@ -46,10 +46,7 @@ # Plot the trajectory # from pathlib import Path - # import sys - # project_path = Path(__file__).parent.parent.absolute() - # sys.path.append(str(project_path / 'test')) # For plotter.py - # from plotter import Plotter + # project_path = Path(__file__).parent.parent.absolute() # Plotter.plot_trajectory(project_path / 'examples' / '07_trajectory.pdf', otg, inp, out_list, plot_jerk=False) diff --git a/examples/08_per_section_minimum_duration.py b/examples/08_per_section_minimum_duration.py index 37825c3f..42a44e8a 100644 --- a/examples/08_per_section_minimum_duration.py +++ b/examples/08_per_section_minimum_duration.py @@ -57,10 +57,7 @@ # Plot the trajectory # from pathlib import Path - # import sys - # project_path = Path(__file__).parent.parent.absolute() - # sys.path.append(str(project_path / 'test')) # For plotter.py - # from plotter import Plotter + # project_path = Path(__file__).parent.parent.absolute() # Plotter.plot_trajectory(project_path / 'examples' / '08_trajectory.pdf', otg, inp, out_list, plot_jerk=False) diff --git a/test/plotter.py b/examples/plotter.py similarity index 100% rename from test/plotter.py rename to examples/plotter.py