diff --git a/examples/01_position.py b/examples/01_position.py index 03641787..3ed25973 100644 --- a/examples/01_position.py +++ b/examples/01_position.py @@ -42,6 +42,11 @@ print(f'Trajectory duration: {first_output.trajectory.duration:0.4f} [s]') # 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 - # Plotter.plot_trajectory(Path(__file__).parent.absolute() / '1_trajectory.pdf', otg, inp, out_list, plot_jerk=False) + # 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 83e08bfc..1d8b71c3 100644 --- a/examples/03_waypoints.py +++ b/examples/03_waypoints.py @@ -51,6 +51,11 @@ print(f'Trajectory duration: {first_output.trajectory.duration:0.4f} [s]') # 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 - # Plotter.plot_trajectory(Path(__file__).parent.absolute() / '3_trajectory.pdf', otg, inp, out_list, plot_jerk=False) + # 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 8289f4be..07f1f6bc 100644 --- a/examples/04_waypoints_online.py +++ b/examples/04_waypoints_online.py @@ -52,6 +52,11 @@ out.pass_to_input(inp) # 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 - # Plotter.plot_trajectory(Path(__file__).parent.absolute() / '4_trajectory.pdf', otg, inp, out_list, plot_jerk=False) + # 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 fc344a92..27b4a313 100644 --- a/examples/05_velocity.py +++ b/examples/05_velocity.py @@ -42,6 +42,11 @@ print(f'Trajectory duration: {first_output.trajectory.duration:0.4f} [s]') # 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 - # Plotter.plot_trajectory(Path(__file__).parent.absolute() / '5_trajectory.pdf', otg, inp, out_list, plot_jerk=False) + # 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 7a160241..519b6c13 100644 --- a/examples/06_stop.py +++ b/examples/06_stop.py @@ -56,6 +56,11 @@ print(f'Trajectory duration: {first_output.trajectory.duration:0.4f} [s]') # 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 - # Plotter.plot_trajectory(Path(__file__).parent.absolute() / '6_trajectory.pdf', otg, inp, out_list, plot_jerk=False, time_offsets=time_offsets) + # 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 47c8a227..9e37c8a3 100644 --- a/examples/07_minimum_duration.py +++ b/examples/07_minimum_duration.py @@ -45,6 +45,11 @@ print(f'Trajectory duration: {first_output.trajectory.duration:0.4f} [s]') # 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 - # Plotter.plot_trajectory(Path(__file__).parent.absolute() / '7_trajectory.pdf', otg, inp, out_list, plot_jerk=False) + # 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 b0364faa..37825c3f 100644 --- a/examples/08_per_section_minimum_duration.py +++ b/examples/08_per_section_minimum_duration.py @@ -56,6 +56,11 @@ print(f'Trajectory duration: {first_output.trajectory.duration:0.4f} [s]') # 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 - # Plotter.plot_trajectory(Path(__file__).parent.absolute() / '8_trajectory.pdf', otg, inp, out_list, plot_jerk=False) + # Plotter.plot_trajectory(project_path / 'examples' / '08_trajectory.pdf', otg, inp, out_list, plot_jerk=False) diff --git a/examples/14_tracking.py b/examples/14_tracking.py index 70adf6f0..f3688f23 100644 --- a/examples/14_tracking.py +++ b/examples/14_tracking.py @@ -66,6 +66,9 @@ def model_sinus(t, ramp_vel=0.4): # Plot the trajectory + # from pathlib import Path + # project_path = Path(__file__).parent.parent.absolute() + # import numpy as np # import matplotlib.pyplot as plt @@ -80,4 +83,4 @@ def model_sinus(t, ramp_vel=0.4): # plt.grid(True) # plt.legend() - # plt.savefig(Path(__file__).parent.absolute() / '13_trajectory.pdf') + # plt.savefig(project_path / 'examples' / '13_trajectory.pdf')