Skip to content

Commit

Permalink
change file name
Browse files Browse the repository at this point in the history
  • Loading branch information
wenqing-2021 committed Nov 12, 2022
1 parent a145fd8 commit dd4daea
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion interpolation/path_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from typing import List, Dict, Tuple
import numpy as np
from scipy import integrate
from path_planner.rs_curve import pi_2_pi
from path_plan.rs_curve import pi_2_pi
from animation.animation import *
from util_math.spline import spine
from util_math.coordinate_transform import coordinate_transform
Expand Down
20 changes: 10 additions & 10 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
Author: wenqing-hnu
Date: 2022-10-20
LastEditors: wenqing-hnu
LastEditTime: 2022-11-09
LastEditTime: 2022-11-12
FilePath: /Automated Valet Parking/main.py
Description: the main file of the hybrid a star algorithm for parking
Copyright (c) 2022 by wenqing-hnu, All Rights Reserved.
'''


from path_planner import path_planner
from path_plan import path_planner
from animation.animation import ploter, plt
from animation.record_solution import DataRecorder
from map import costmap
from velocity_planner import velocity_plan
from velocity_plan import velocity_planner
from interpolation import path_interpolation
from optimization import path_optimazition, ocp_optimization
from config import read_config
Expand All @@ -33,9 +33,9 @@ def main(file, config):
ego_vehicle = costmap.Vehicle()

# create path planner
planner = path_planner.path_planner(config=config,
map=park_map,
vehicle=ego_vehicle)
planner = path_planner.PathPlanner(config=config,
map=park_map,
vehicle=ego_vehicle)

# create path optimizer
path_optimizer = path_optimazition.path_opti(park_map, ego_vehicle, config)
Expand All @@ -45,8 +45,8 @@ def main(file, config):
config=config, map=park_map, vehicle=ego_vehicle)

# create velocity planner
velocity_planner = velocity_plan.velocity_planner(vehicle=ego_vehicle,
velocity_func_type=config['velocity_func_type'])
v_planner = velocity_planner.VelocityPlanner(vehicle=ego_vehicle,
velocity_func_type=config['velocity_func_type'])

# create path optimization planner
ocp_planner = ocp_optimization.ocp_optimization(
Expand All @@ -70,7 +70,7 @@ def main(file, config):
path_arc_length, path_i_info = interplotor.cubic_fitting(opti_path)

# velocity planning
v_acc_func, terminiate_time = velocity_planner.solve_nlp(
v_acc_func, terminiate_time = v_planner.solve_nlp(
arc_length=path_arc_length)

# insert points
Expand Down Expand Up @@ -125,7 +125,7 @@ def main(file, config):
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='hybridAstar')
parser.add_argument("--config_name", type=str, default="config")
parser.add_argument("--case_name", type=str, default="Case5")
parser.add_argument("--case_name", type=str, default="Case8")
args = parser.parse_args()

# initial
Expand Down
4 changes: 2 additions & 2 deletions optimization/ocp_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Author: wenqing-hnu
Date: 2022-10-20
LastEditors: wenqing-hnu
LastEditTime: 2022-11-11
LastEditTime: 2022-11-12
FilePath: /Automated Valet Parking/optimization/ocp_optimization.py
Description: use ipopt to solve the optimization problem
Expand All @@ -13,7 +13,7 @@
from __future__ import division
from map.costmap import Map, Vehicle
import math
from path_planner import rs_curve
from path_plan import rs_curve
import numpy as np

import pyomo.environ as pyo
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions path_planner/hybrid_a_star.py → path_plan/hybrid_a_star.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Author: wenqing-hnu
Date: 2022-10-20
LastEditors: wenqing-hnu
LastEditTime: 2022-11-11
FilePath: /Automated Valet Parking/path_planner/hybrid_a_star.py
LastEditTime: 2022-11-12
FilePath: /Automated Valet Parking/path_plan/hybrid_a_star.py
Description: hybrid a star
Copyright (c) 2022 by wenqing-hnu, All Rights Reserved.
Expand All @@ -14,8 +14,8 @@
import queue
from map.costmap import Map, Vehicle
from collision_check import collision_check
from path_planner.compute_h import Dijkstra
from path_planner import rs_curve
from path_plan.compute_h import Dijkstra
from path_plan import rs_curve
from animation.animation import *


Expand Down
8 changes: 4 additions & 4 deletions path_planner/path_planner.py → path_plan/path_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Date: 2022-10-20
LastEditors: wenqing-hnu
LastEditTime: 2022-11-08
FilePath: /Automated Valet Parking/path_planner/path_planner.py
FilePath: /Automated Valet Parking/path_plan/path_planner.py
Description: path plan
Copyright (c) 2022 by wenqing-hnu, All Rights Reserved.
Expand All @@ -15,14 +15,14 @@
from scipy import spatial
from typing import Dict, Tuple, List

from path_planner.hybrid_a_star import hybrid_a_star
from path_plan.hybrid_a_star import hybrid_a_star
from animation.animation import ploter
from map.costmap import Vehicle, Map
from collision_check import collision_check
from path_planner.rs_curve import PATH
from path_plan.rs_curve import PATH


class path_planner:
class PathPlanner:
def __init__(self,
config: dict = None,
map: Map = None,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Author: wenqing-hnu
Date: 2022-10-20
LastEditors: wenqing-hnu
LastEditTime: 2022-11-06
FilePath: /Automated Valet Parking/velocity_planner/velocity_plan.py
LastEditTime: 2022-11-12
FilePath: /Automated Valet Parking/velocity_plan/velocity_planner.py
Description: velocity planner for the path
Copyright (c) 2022 by wenqing-hnu, All Rights Reserved.
Expand Down Expand Up @@ -112,7 +112,7 @@ def constraint(self, max_v, max_a, arc_length) -> Dict:
return cons


class velocity_planner:
class VelocityPlanner:
def __init__(self,
vehicle: Vehicle,
velocity_func_type: str = 'sin_func'):
Expand Down

0 comments on commit dd4daea

Please sign in to comment.