{"id":26820536,"url":"https://github.com/deepakramani/basicad_framework","last_synced_at":"2026-05-03T06:38:09.887Z","repository":{"id":138145236,"uuid":"332485796","full_name":"deepakramani/basicad_framework","owner":"deepakramani","description":"This repo contains the files for building a basic autonomous driving framework","archived":false,"fork":false,"pushed_at":"2023-05-21T20:45:15.000Z","size":236345,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-26T15:50:35.991Z","etag":null,"topics":["autonomous-driving-framework","lgsvl-simulator","ros","ros2","supervised-classification-methods","supervised-learning"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepakramani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-24T15:35:30.000Z","updated_at":"2022-04-24T06:02:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"eebef79b-2670-4ea9-944b-d3273f3627bd","html_url":"https://github.com/deepakramani/basicad_framework","commit_stats":null,"previous_names":["deepakramani/basicad_framework"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakramani%2Fbasicad_framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakramani%2Fbasicad_framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakramani%2Fbasicad_framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakramani%2Fbasicad_framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepakramani","download_url":"https://codeload.github.com/deepakramani/basicad_framework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246285634,"owners_count":20752951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autonomous-driving-framework","lgsvl-simulator","ros","ros2","supervised-classification-methods","supervised-learning"],"created_at":"2025-03-30T06:33:36.824Z","updated_at":"2026-05-03T06:38:04.866Z","avatar_url":"https://github.com/deepakramani.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autonomous Driving Framework\n\n## Objective\nTo design and implement an end-to-end neural network for autonomous driving using simpler CNN framework.\n\n## Tools used\n- LGSVL simulator as driving simulator\n- ROS2 nodes to receive sensor data from LGSVL Simulator\n- Preprocessing and feature engineering using Python, OpenCV\n- Keras/Tensorflow deep learning CNN model to train the data\n- Containerised docker image to run simulation using the GPU\n\nIt is assumed that you have some experience in using Linux, Git, ROS, Docker, web browsers, and Python.\n\nThis project is the modified version of [ROS2 End-to-End Lane Following Model with LGSVL\nSimulator](https://www.lgsvlsimulator.com/docs/lane-following/) which is in turn inspired by [NVIDIA's\nEnd-to-End Deep Learning Model for Self-Driving\nCars](https://developer.nvidia.com/blog/deep-learning-self-driving-cars/).\n\n## Complete End-to-End Architecture\n![here](https://github.com/dr563105/basicad_framework/blob/main/autonomous_driving_framework_architecture.png)\n\nAt the highest-level, the architecture consists of four modules: sensor module, data collection,\npre-processing and training module, and finally evaluation module. \n\n## Features\n* Training mode: Manually drive the vehicle and collect data\n*  Autonomous Mode: The vehicle drives itself based on Lane Following model trained from the collected data\n* ROS2-based\n    * Time synchronous data collection node\n    * Deploying a trained model in a node\n* Data preprocessing for training\n    * Data normalization and manipulation\n    * Splitting data into training set and test set\n    * Writing/Reading data in HDF5 format\n* Deep Learning model training: Train a model using Keras with TensorFlow backend\n\n### Prerequisites\n* Docker CE\n* Nvidia-docker\n* GPU(at least 8GB)\n* ROS2. This project uses ROS2 Dashing.\n* Tensorflow, Keras\n* Python3\n* LGSVL Simulator\n\n\n#### Clone the repository:\nIn the terminal at appropriate location run this command - \n```\ngit clone https://github.com/dr563105/basicad_framework.git\n```\n#### Pull the latest Docker image\nThen in the terminal run this command -\n```\ndocker pull lgsvl/lanefollowing:latest\n```\n#### Run the simulator\n* Download the zipped modified simulator(filename: NewSimLFMay201.tar.gz) from [my personal google\ndrive](https://drive.google.com/file/d/14uIQBWeLkpzo5qYN1Thi1ka_OnYPITTC/view?usp=sharing). \n* Untar it and place the folder(NewSimLFMay201) along with the other folders from the repository.\n* Navigate to `NewSimLFMay201-\u003esimulator-\u003ebuild`.\n* Run simulator executable.\n* Click `Open Browser`\n* On the first login, create an account. Login. It should automatically download the\n  default maps, vehicle, and simulation configurations.\n* Navigate to `Vehicles`tab and create a new setup by clicking `Add new` button.\n* Name the vehicle and use\n  [this](https://assets.lgsvlsimulator.com/4eb6f2f8c293b00c4fed413a844cf3e4ffe7015d/vehicle_Jaguar2015XE)\n  as vehicle url. Click `Submit`.\n* Then click the wrench icon adjacent to the newly created vehicle profile. Make the\n  `Bridge Type` as ROS2. Copy the contents from [here](https://github.com/dr563105/basicad_framework/blob/main/sensor_parameters.json) to the `Sensors` field. Click\n  `Submit`. Add/remove as necessary. Please note that the camera sensors transmit images\n  in 1920x1080 resolution. So they are huge and can bottleneck port bandwidth.\n* Move to the `Simulations` tab, click `Add new` button and a popup menu will appear. In\n  this menu's `general` tab, give a simulation name. \n* In the `Maps \u0026 Vehicles` tab, check `interactive mode`. Choose `SanFrancisco` as map.\n* Next in the `Select Vehicles`, select the vehicles tab configuration name from the dropdown and write `localhost:9090` as IP address.\nOther tabs can be left empty for the moment. Click `Submit`. \n* Select the configured simulation and click `play` button. If there are no errors, the\n  simulation should execute and in the simulation application we can see a vehicle spawned\n  in SF map. Click the `play` button to make the LGSVL simulator ready.\n\n#### Build ROS2 packages\n* Go to ROS2 workspace `testoutLF-\u003elanefollowing-\u003eros2_ws`.\n* Execute the build command in the terminal\n```\ndocker-compose up build_ros\n```\n* You should see two more folders -- build and log created. \n\n#### Running the collect script\nWhile in the `ros2_ws`, run this command in the terminal\n```\ndocker-compose up collect\n```\n* You should see the `rosbridge` is now connected. This can be verified by going to the\n  settings in the LGSVL simulator app.\n* The script inside `collect_script` is copied into the `~/ros2_ws/lane_following/collect.py`. The topic names of\n  the nodes must match the topics mentioned in the vehicles tab of LGSVL WebUI.\n* To exit, simply use `ctrl+c` in the terminal.\n \n#### Evaluation\n* To evaluate, the necessary evaluation script present inside `evaluation_script` must be\ncopied into `~/ros2_ws/lane_following/drive.py`.\n* The trained models and their architectures are available inside `models_images_and_files` folder in\nthe repo. \n* Take the `*.h5` hdf5 file and place it inside the folder `ros2_ws/src/lane_following/model/`. It contains the trained models accessed by\nthe evaluation script. \n* The evaluation is run by executing this command in the terminal\n```\ndocker-compose up drive_visual\n```\n* A small window will pop up. Now, go back to LGSVL simulator application and gently\n  accelerate using the `Up` arrow key. The vehicle will then autonomously navigate. Toggle\n  traffic and change weather conditions as necessary. \n* To exit, simply use `ctrl+c` in the terminal.\n\n#### Pre-processing and Training\n* For pre-processing, the scripts present inside `preprocessing_script` are used. For this\n  step,  a data folder is required. Because of data collected is of large size, this is\n  not provided.\n* Similarly, for training, scripts inside `training_script` are used. \n* For convenience and CUDA dependencies, both the scripts are advised to be executed\n  outside the docker. \n\n### Findings\n* Light plays an important factor in a vehicle recognising its surroundings.\n* RGB-Greyscale image is sufficient for steering.\n* Fusing techniques help in night-time driving and collision avoidance.\n\n### Things to improve\n* Data is imbalanced so appropriate cross validation techniques need to be applied.\n\n### Useful Links/Tips\n* Robotic Operating System[(ROS)](https://www.ros.org/about-ros/)\n* [LGSVL simulator](https://www.lgsvlsimulator.com/)  \n* [Docker CE](https://docs.docker.com/engine/install/ubuntu/) and also its post installation.\n* [steps](https://docs.docker.com/engine/install/linux-postinstall/)\n* [Nvidia docker](https://github.com/NVIDIA/nvidia-docker)\n* Use [Conda](https://www.anaconda.com/products/individual) environment for training.\n  Conda automatically installs Tensorflow and CUDA dependencies and saves the headache of\n  choosing which CUDA version is compatible with a particular version of tensorflow. \n* Always set ROS2 environment when running ROS related commands. `source\n  /opt/ros/dashing/setup.bash` and from the ros2ws ` source install/setup.bash` for local\n  setup.\n* Thesis report folder contains the pdf of the report.\n* Further instructions can be found [here](https://www.lgsvlsimulator.com/docs/create-ros2-ad-stack/) \nand [here](https://www.lgsvlsimulator.com/docs/lane-following/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakramani%2Fbasicad_framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepakramani%2Fbasicad_framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakramani%2Fbasicad_framework/lists"}