Skip to content

Commit

Permalink
add main function to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisatoYano committed Jul 9, 2024
1 parent 1f267d0 commit 2e6ee2f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
17 changes: 16 additions & 1 deletion src/simulations/course/cubic_spline/cubic_spline_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()

0 comments on commit 2e6ee2f

Please sign in to comment.