Skip to content

james94/self-driving-car-sim

 
 

Repository files navigation

Self-Driving Car Simulators

Migrated from Unity 3D version 2020_3 to 2022.3.62f3 on Universal Render Pipeline. Currently was able to update "Lake Track" and "Jungle Track" with latest shaders with most being Universal Render Pipeline Lit for the roads, terrain, trees, water, etc. Also verified I could play those scenes and control the controls. Also verified I could press "esc", navigate back to the main menu, navigate to the controls menu to see which keys are mapped to what particular actions for controlling the car, recording data, etc. With navigating to the main menu, I also verified I could switch between both the "Lake Track" and "Jungle Track" scenes.

While its great we run "Lake Track" and "Jungle Track" scenes on Unity 3D version 2022.3.62f3 on Universal Render Pipeline, we still need to look at getting "Path Planning" scene and "Capstone" scene both working on this Unity 3D version.

Term 1

Switch to Unity_URP_2022_3_Term1 branch to access Term 1. This is Behavioral Cloning project that can be applied to both tracks.

Lake Track

lake_track_view1

  • Figure 1: Behavorial Cloning CNN Autonomous Car Control on Lake Track

Jungle Track

jungle_track_view1

  • Figure 2: Behavorial Cloning CNN Autonomous Car Control on Jungle Track

Term 2

Switch to Unity_URP_2022_3_Term2 branch to access Term 2. This is PID Control project that can be applied to Lake Track.

pid_control_lake_track

  • Figure 3: PID Control Car on Lake Track Menu View

mpc_control_lake_track

  • Figure 4: MPC Control Car on Lake Track Menu View

Also added support for switching to Extended Kalman Filter, Unscented Kalman filters, Particle Filter scenes.

Also our Menu Options C# script and UI System C# script have been updated to allow for switching between Term 1 and Term 2 scenes.

Term 3

Switch to Unity_URP_2022_3_Term3 branch to access Term 3. This is Path Planner project that can be applied to Highway Driving Track.

highway_driving_track

  • Figure 5: Path Planner Car on Highway Driving Track

  • Figure 6: Path Planner Car on Highway Driving Track Menu View

I had to switch some C# scripts related to the Highway Driving scene to be standalone Term 3 to get the simulation running successfully. I plan to update the C# scripts, so we can launch and play the Unity scenes from Term 1 and Term 2 while still being able to launch Highway Driving scene from Term 3.

How To Launch SDC Sims in Unity

Coming soon...

Previous README By Udacity for SDCE Sim

Deprecated Repository

The code in the master branch of this repository is deprecated. Currently enrolled learners, if any, can:

Welcome to Udacity's Self-Driving Car Simulator

This simulator was built for Udacity's Self-Driving Car Nanodegree, to teach students how to train cars how to navigate road courses using deep learning. See more project details here.

All the assets in this repository require Unity. Please follow the instructions below for the full setup.

Available Game Builds (Precompiled builds of the simulator)

Term 1

Instructions: Download the zip file, extract it and run the executable file.

Version 2, 2/07/17

Linux Mac Windows

Version 1, 12/09/16

Linux Mac Windows 32 Windows 64

Term 2

Please see the Releases page for the latest version of the Term 2 simulator (v1.45, 6/14/17).

Source code can be obtained therein or also on the term2_collection branch.

Term 3

Please see the Releases page for the latest version of the Term 3 simulator (v1.2, 7/11/17).

Source code can be obtained therein or also on the term3_collection branch.

System Integration / Capstone

Please see the CarND-Capstone Releases page for the latest version of the Capstone simulator (v1.3, 12/7/17).

Source code can be obtained therein.

Unity Simulator User Instructions

  1. Clone the repository to your local directory, please make sure to use Git LFS to properly pull over large texture and model assets.

  2. Install the free game making engine Unity, if you dont already have it. Unity is necessary to load all the assets.

  3. Load Unity, Pick load exiting project and choice the self-driving-car-sim folder.

  4. Load up scenes by going to Project tab in the bottom left, and navigating to the folder Assets/1_SelfDrivingCar/Scenes. To load up one of the scenes, for example the Lake Track, double click the file LakeTrackTraining.unity. Once the scene is loaded up you can fly around it in the scene viewing window by holding mouse right click to turn, and mouse scroll to zoom.

  5. Play a scene. Jump into game mode anytime by simply clicking the top play button arrow right above the viewing window.

  6. View Scripts. Scripts are what make all the different mechanics of the simulator work and they are located in two different directories, the first is Assets/1_SelfDrivingCar/Scripts which mostly relate to the UI and socket connections. The second directory for scripts is Assets/Standard Assets/Vehicle/Car/Scripts and they control all the different interactions with the car.

  7. Building a new track. You can easily build a new track by using the prebuilt road prefabs located in Assets/RoadKit/Prefabs click and drag the road prefab pieces onto the editor, you can snap road pieces together easily by using vertex snapping by holding down "v" and dragging a road piece close to another piece.

Self-Driving Car Simulator

About

Unity3D self-driving car simulator refactored to unify Terms 1-3 scenes of SDCE ND from a UI menu router

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 77.2%
  • ShaderLab 16.7%
  • GLSL 4.9%
  • HLSL 1.1%
  • JavaScript 0.1%