Skip to content

Commit

Permalink
fixed a folder path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jserra7d5 committed Mar 13, 2024
1 parent f296b90 commit 6d10c49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pathplannerlib-python/pathplannerlib/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def buildAuto(auto_name: str) -> Command:
return AutoBuilder.getAutoCommandFromJson(auto_json)

@staticmethod
def buildAutoChooser(default_auto_name: str) -> SendableChooser:
def buildAutoChooser(default_auto_name: str = "") -> SendableChooser:
"""
Create and populate a sendable chooser with all PathPlannerAutos in the project and the default auto name selected.
Expand All @@ -510,8 +510,7 @@ def buildAutoChooser(default_auto_name: str) -> SendableChooser:
"""
if not AutoBuilder.isConfigured():
raise RuntimeError('AutoBuilder was not configured before attempting to build an auto chooser')

auto_folder_path = os.path.join(getDeployDirectory(), "/deploy/pathplanner/autos")
auto_folder_path = os.path.join(getDeployDirectory(), 'pathplanner', 'autos')
auto_list = os.listdir(auto_folder_path)

chooser = SendableChooser()
Expand Down

0 comments on commit 6d10c49

Please sign in to comment.