From 2e6ee2fb2bbbc9de878b8c352f61fb1bbfbc2310 Mon Sep 17 00:00:00 2001
From: ShisatoYano <shisatoyano@gmail.com>
Date: Tue, 9 Jul 2024 15:19:01 +0000
Subject: [PATCH] add main function to debug

---
 .gitignore                                      |  1 +
 .../course/cubic_spline/cubic_spline_plot.py    | 17 ++++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 4f804cf..af68d86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@ src/components/control/__pycache__
 src/components/control/pid/__pycache__
 src/components/control/pure_pursuit/__pycache__
 src/components/course/__pycache__
+src/components/course/cubic_spline_course/__pycache__
 src/components/course/sin_curve_course/__pycache__
 src/components/detection/__pycache__
 src/components/detection/l_shape_fitting/__pycache__
diff --git a/src/simulations/course/cubic_spline/cubic_spline_plot.py b/src/simulations/course/cubic_spline/cubic_spline_plot.py
index c93f11c..d130034 100644
--- a/src/simulations/course/cubic_spline/cubic_spline_plot.py
+++ b/src/simulations/course/cubic_spline/cubic_spline_plot.py
@@ -13,7 +13,7 @@
 abs_dir_path = str(Path(__file__).absolute().parent)
 relative_path = "/../../../components/"
 
-sys.path.append(abs_dir_path + relative_path + "course/cubic_spline")
+sys.path.append(abs_dir_path + relative_path + "course/cubic_spline_course")
 
 # import component module
 from cubic_spline import CubicSpline
@@ -22,3 +22,18 @@
 # flag to show plot figure
 # when executed as unit test, this flag is set as false
 show_plot = True
+
+
+def main():
+    """
+    Main process function
+    """
+
+    x_points = np.arange(5)
+    y_points = [1.7, -6, 5, 6.5, 0.0]
+
+    cubic_spline = CubicSpline(x_points, y_points)
+
+
+if __name__ == "__main__":
+    main()