Jan 13, 2017 Another way to read and write data from a text file that’s in a specific directory is to use the StreamWriter and StreamReader classes from the System.IO namespace to access characters from a byte stream and then load the file as a TextAsset in Unity. The following example Editor script prints the data from a file (if it exists) or writes. Jul 03, 2018 Only tested/working scripts. This site uses cookies! Armedunity.com uses cookies to improve user experience.
This project uses an Arduino robot running a ESP-8266 Node MCU that communicates (and drives around) with a mobile phone. The phone is running an app made in the video game engine Unity 3D that does 3 things:
1.) The first scene allows you to drive around the robot with a camera feed going back to your computer. You can use the arrow keys to drive it around in any direction and the video feed allows you to keep driving even when the robot is out of sight.
2.) The second scene allows the robot to track anything you put in front of it. You can click the screen to initialize the tracker and then the robot will follow around that object.
3.) The third scene allows you to drive the robot with your computer using the arrow keys. The app uses an augmented reality SDK to find the walls and ceiling which it sends back to your laptop giving you a digital representation of your environment.
Parts:
ESP-8266 Node MCU https://amzn.to/2NIvCbu
l298N Motor Driver: https://amzn.to/2NKlRK4
Assorted Arduino Wires: https://amzn.to/2tyjPTS
Robot Chassis, wheels, battery: https://amzn.to/2udtBMb
Unity App:
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
Version 1, 12/09/16
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
- Clone the repository to your local directory, please make sure to use Git LFS to properly pull over large texture and model assets.
- Install the free game making engine Unity, if you dont already have it. Unity is necessary to load all the assets.
- Load Unity, Pick load exiting project and choice the
self-driving-car-sim
folder. - 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.
- Play a scene. Jump into game mode anytime by simply clicking the top play button arrow right above the viewing window.
- 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.
- 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.