{"id":19350623,"url":"https://github.com/slevin48/self-driving","last_synced_at":"2026-04-13T14:31:49.773Z","repository":{"id":112496747,"uuid":"327982211","full_name":"slevin48/self-driving","owner":"slevin48","description":"Hack self-driving dataset from Udacity \u0026 App from streamlit","archived":false,"fork":false,"pushed_at":"2024-05-12T21:04:06.000Z","size":7429,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T10:25:36.225Z","etag":null,"topics":["car","folium","matlab","python","ros","sim","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slevin48.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08T18:29:52.000Z","updated_at":"2024-05-12T21:04:09.000Z","dependencies_parsed_at":"2024-11-10T04:33:21.955Z","dependency_job_id":"dd11edb2-fa80-4cc4-a796-eb629ccac3ed","html_url":"https://github.com/slevin48/self-driving","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slevin48/self-driving","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fself-driving","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fself-driving/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fself-driving/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fself-driving/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slevin48","download_url":"https://codeload.github.com/slevin48/self-driving/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slevin48%2Fself-driving/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31757477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["car","folium","matlab","python","ros","sim","streamlit"],"created_at":"2024-11-10T04:33:17.816Z","updated_at":"2026-04-13T14:31:49.750Z","avatar_url":"https://github.com/slevin48.png","language":"Jupyter Notebook","readme":"# self-driving 🚗\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/slevin48/self-driving)\n\nThis project starts with [223GB of Driving Data](https://medium.com/udacity/open-sourcing-223gb-of-mountain-view-driving-data-f6b5593fbfa5) open sourced by Udacity.\nThe originial idea was to hack this driving [dataset](https://github.com/udacity/self-driving-car), the associated [app](https://github.com/streamlit/demo-self-driving/blob/master/streamlit_app.py) and [data hosted on AWS](https://streamlit-self-driving.s3-us-west-2.amazonaws.com/) by Streamlit\n\nHybrid training of a self-driving car, based on both images from:\n\n| real driving data                                | simulation data                                  | \n| -------------------------------------------------|:------------------------------------------------:|\n| \u003cimg src=\"img1.jpg\" alt=\"drawing\" height=\"320\"/\u003e | \u003cimg src=\"img2.jpg\" alt=\"drawing\" height=\"320\"/\u003e |\n\n\nFor more project on autonomous driving simulation:\n* https://github.com/slevin48/gta\n* https://github.com/slevin48/carla\n* https://github.com/slevin48/donkeycar\n\n## Real driving data\n\n[Youtube - Neural Network driving a car](https://www.youtube.com/watch?v=NJU9ULQUwng\u0026feature=emb_logo\u0026ab_channel=IProgrammerTV)\n\n![nvidia-car-hardware-setup](https://www.i-programmer.info/images/stories/News/2016/April/B/nvidacar1.jpg)\n\n[NVIDIA paper: End to End Learning for Self-Driving Cars](https://arxiv.org/pdf/1604.07316.pdf)\n\n### Dataset\n\nFirst Download the [Driving Datasets](https://github.com/udacity/self-driving-car/tree/master/datasets) – Over 10 hours of driving data (LIDAR, camera frames and more)\n\n```\naria2c Ch2_001.tar.gz-692ee7e0c63fb2212bfe4a62a39ce71ee9b16fb3.torrent\n```\nRead [How to download torrents from the command-line on Linux](https://www.addictivetips.com/ubuntu-linux-tips/download-torrents-from-the-command-line-linux/)\n\nUntar\n\n```\ntar -xf Ch2_001.tar.gz\n```\n\n### [udacity-driving-reader](https://github.com/rwightman/udacity-driving-reader)\n\nBuild the docker\n```\ndocker build -t udacity-reader .\n```\nRun the ROS bag reader\n```\n./run-bagdump.sh -i /data -o /output\n```\n\n### MATLAB ROS toolbox\n\n[MATLAB rosbag Structure](https://www.mathworks.com/help/ros/ug/ros-log-files-rosbags.html):\n\n![rosbag_workflow](https://www.mathworks.com/help/ros/ug/rosbag_workflow.png)\n\n[work-with-rosbag-logfiles](https://www.mathworks.com/help/ros/ug/work-with-rosbag-logfiles.html)\n\n```matlab\n\u003e\u003e bag = rosbag('CH03_002')\n\n  BagSelection with properties:\n\n           FilePath: 'C:\\Users\\slevin\\Downloads\\self-driving\\CH3_002\\CH03_002'\n          StartTime: 1.4807e+09\n            EndTime: 1.4807e+09\n        NumMessages: 54456557\n    AvailableTopics: [36×3 table]\n    AvailableFrames: {0×1 cell}\n        MessageList: [54456557×4 table]\n```\nAvailable Topics:\n```\n/can_bus_dbw/can_rx                                 9376489 msgs    : dataspeed_can_msgs/CanMessageStamped \n/center_camera/camera_info                           264230 msgs    : sensor_msgs/CameraInfo               \n/center_camera/image_color/compressed                264230 msgs    : sensor_msgs/CompressedImage          \n/diagnostics                                          52540 msgs    : diagnostic_msgs/DiagnosticArray       (4 connections)\n/ecef/                                              5287720 msgs    : geometry_msgs/PointStamped           \n/fix                                                5287720 msgs    : sensor_msgs/NavSatFix                \n/imu/data                                           5287726 msgs    : sensor_msgs/Imu                      \n/left_camera/camera_info                             264276 msgs    : sensor_msgs/CameraInfo               \n/left_camera/image_color/compressed                  264276 msgs    : sensor_msgs/CompressedImage          \n/pressure                                            660965 msgs    : sensor_msgs/FluidPressure            \n/right_camera/camera_info                            263840 msgs    : sensor_msgs/CameraInfo               \n/right_camera/image_color/compressed                 263840 msgs    : sensor_msgs/CompressedImage          \n/time_reference                                    16020574 msgs    : sensor_msgs/TimeReference            \n/vehicle/brake_info_report                           660965 msgs    : dbw_mkz_msgs/BrakeInfoReport         \n/vehicle/brake_report                                659917 msgs    : dbw_mkz_msgs/BrakeReport             \n/vehicle/dbw_enabled                                      1 msg     : std_msgs/Bool                        \n/vehicle/filtered_accel                              659858 msgs    : std_msgs/Float64                     \n/vehicle/fuel_level_report                           132671 msgs    : dbw_mkz_msgs/FuelLevelReport         \n/vehicle/gear_report                                 263943 msgs    : dbw_mkz_msgs/GearReport              \n/vehicle/gps/fix                                      13219 msgs    : sensor_msgs/NavSatFix                \n/vehicle/gps/time                                     13219 msgs    : sensor_msgs/TimeReference            \n/vehicle/gps/vel                                      13219 msgs    : geometry_msgs/TwistStamped           \n/vehicle/imu/data_raw                               1318634 msgs    : sensor_msgs/Imu                      \n/vehicle/joint_states                               1981787 msgs    : sensor_msgs/JointState               \n/vehicle/misc_1_report                               263944 msgs    : dbw_mkz_msgs/Misc1Report             \n/vehicle/sonar_cloud                                  66768 msgs    : sensor_msgs/PointCloud2              \n/vehicle/steering_report                             659858 msgs    : dbw_mkz_msgs/SteeringReport          \n/vehicle/surround_report                              66768 msgs    : dbw_mkz_msgs/SurroundReport          \n/vehicle/suspension_report                           661052 msgs    : dbw_mkz_msgs/SuspensionReport        \n/vehicle/throttle_info_report                       1321946 msgs    : dbw_mkz_msgs/ThrottleInfoReport      \n/vehicle/throttle_report                             659914 msgs    : dbw_mkz_msgs/ThrottleReport          \n/vehicle/tire_pressure_report                         26438 msgs    : dbw_mkz_msgs/TirePressureReport      \n/vehicle/twist_controller/parameter_descriptions          1 msg     : dynamic_reconfigure/ConfigDescription\n/vehicle/twist_controller/parameter_updates               1 msg     : dynamic_reconfigure/Config           \n/vehicle/wheel_speed_report                         1321929 msgs    : dbw_mkz_msgs/WheelSpeedReport        \n/velodyne_packets                                    132079 msgs    : velodyne_msgs/VelodyneScan\n```\n\n**GPS**\n```matlab\nbagGps = select(bag, 'Topic', '/vehicle/gps/fix');\n```\n![GPS](CH3_002/gps.png)\n\n**Steering Angle**\n```matlab\nbagSteering = select(bag, 'Topic', '/vehicle/steering_report');\n```\n```matlab\nbagSteering.AvailableTopics\n```\n![bagSteering_AvailableTopics](CH3_002/bagSteering_AvailableTopics.png)\n\n```matlab\nmsgs = readMessages(bagSteering,'DataFormat','struct');\nsteering_angle = cellfun(@(m) m.SteeringWheelAngle,msgs);\nSec = cellfun(@(m) m.Header.Stamp.Sec,msgs);\nNsec = cellfun(@(m) m.Header.Stamp.Nsec,msgs);\ntime = datetime(Sec,\"ConvertFrom\",\"epochtime\",\"Format\",\"HH:mm:ss\");\nplot(time,steering_angle)\ntitle(\"Steering Wheel Angle\")\n```\n\n![Steering](CH3_002/steering.png)\n\n**Retime:** sub-sample to one point per second to sync with GPS\n\n![Sub-steering](CH3_002/retime-timetable.png)\n\n**Pressure**\n```matlab\n\u003e\u003e bagpressure = select(bag, 'Topic', '/pressure')\nbagpressure = \n\n  BagSelection with properties:\n\n           FilePath: 'C:\\Users\\slevin\\Downloads\\self-driving\\CH3_002\\CH03_002'\n          StartTime: 1.4807e+09\n            EndTime: 1.4807e+09\n        NumMessages: 660965\n    AvailableTopics: [1×3 table]\n    AvailableFrames: {0×1 cell}\n        MessageList: [660965×4 table]\n```\nIMU (Inertial Measurement Unit)\n```matlab\n\u003e\u003e bagselect1 = select(bag, 'Topic', '/imu/data')\n\nbagselect1 = \n\n  BagSelection with properties:\n\n           FilePath: 'C:\\Users\\slevin\\Downloads\\self-driving\\CH3_002\\CH03_002'\n          StartTime: 1.4807e+09\n            EndTime: 1.4807e+09\n        NumMessages: 5287726\n    AvailableTopics: [1×3 table]\n    AvailableFrames: {0×1 cell}\n        MessageList: [5287726×4 table]\n```\n\nWe have more than 5 million messages, so we will filter to get only the first 30 seconds:\n\n```matlab\n\u003e\u003e start = bag.StartTime;\n\u003e\u003e bagselect2 = select(bag, 'Time', [start start + 30], 'Topic', '/imu/data')\n\nbagselect2 = \n\n  BagSelection with properties:\n\n           FilePath: 'C:\\Users\\slevin\\Downloads\\self-driving\\CH3_002\\CH03_002'\n          StartTime: 1.4807e+09\n            EndTime: 1.4807e+09\n        NumMessages: 12001\n    AvailableTopics: [1×3 table]\n    AvailableFrames: {0×1 cell}\n        MessageList: [12001×4 table]\n```\n\nRead selected message data\n```matlab\n\u003e\u003e msgs = readMessages(bagselect2);\n\u003e\u003e msgs{1}\n\nans = \n\n  ROS Imu message with properties:\n\n                     MessageType: 'sensor_msgs/Imu'\n                          Header: [1×1 Header]\n                     Orientation: [1×1 Quaternion]\n                 AngularVelocity: [1×1 Vector3]\n              LinearAcceleration: [1×1 Vector3]\n           OrientationCovariance: [9×1 double]\n       AngularVelocityCovariance: [9×1 double]\n    LinearAccelerationCovariance: [9×1 double]\n\n  Use showdetails to show the contents of the message\n```\nRead as timeseries\n```matlab\n\u003e\u003e ts = timeseries(bagselect2)\n  timeseries\n\n  Common Properties:\n            Name: '/imu/data Properties'\n            Time: [12001x1 double]\n        TimeInfo: [1x1 tsdata.timemetadata]\n            Data: [12001x13 double]\n        DataInfo: [1x1 tsdata.datametadata]\n\n  More properties, Methods\n```\n```matlab\nfigure\nplot(ts, 'LineWidth', 3)\n```\n![IMU](CH3_002/imu.png)\n\n### S3 hosting\n\nHost the real driving dataset on AWS S3 bucket, and [allow public access to the bucket](https://havecamerawilltravel.com/photographer/how-allow-public-access-amazon-bucket/)  \n\nAccess Photos from Python, by building a list ([save list to CSV](https://www.geeksforgeeks.org/python-save-list-to-csv/))\n```python\nimport os\nimport pandas as pd\nlist = os.listdir()\ndf = pd.DataFrame(list,columns=['photo'])\ndf.to_csv('photos.csv',index=False)\n```\n\nDisplay frames \u0026 steering angle with a streamlit app:\n\n![car_app.jpg](car_app.jpg)\n\n```\nstreamlit run car_app.py\n```\n\n## Simulated driving data\n\n[self-driving-car-simulator](https://github.com/udacity/self-driving-car-sim)\n\n![sim_app.jpg](sim_app.jpg)\n\n\n```\nstreamlit run car_app.py\n```\n\n(Turn on wide mode in settings in the upper right of the app)\n\n## KITTI: precursor self-driving dataset\n\nFrom the Karlsruhe Institute of Technology:\n* [**Paper** - Vision meets Robotics: The KITTI Dataset](https://www.mrt.kit.edu/z/publ/download/2013/GeigerAl2013IJRR.pdf)\n* [KITTI Vision Benchmark Suite](http://www.cvlibs.net/datasets/kitti/)\n\n\n## Resources:\n* https://github.com/tawnkramer/sdsandbox\n* https://github.com/naokishibuya/car-behavioral-cloning\n* https://github.com/llSourcell/How_to_simulate_a_self_driving_car\n* https://github.com/ManajitPal/DeepLearningForSelfDrivingCars\n* https://www.youtube.com/watch?v=EaY5QiZwSP4\u0026ab_channel=SirajRaval\n* https://developer.nvidia.com/blog/deep-learning-self-driving-cars/\n* https://github.com/SullyChen/Autopilot-TensorFlow\n\n![self-driving-sim](https://github.com/udacity/self-driving-car-sim/raw/master/sim_image.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslevin48%2Fself-driving","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslevin48%2Fself-driving","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslevin48%2Fself-driving/lists"}