https://github.com/vlmarkov/self-driving-car
Self-Driving Car based on Raspberry Pi 5 board
https://github.com/vlmarkov/self-driving-car
autonomous-driving cpp lane-detection opencv raspberry-pi self-driving-car
Last synced: about 2 months ago
JSON representation
Self-Driving Car based on Raspberry Pi 5 board
- Host: GitHub
- URL: https://github.com/vlmarkov/self-driving-car
- Owner: vlmarkov
- Created: 2025-02-14T16:04:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-26T16:13:27.000Z (3 months ago)
- Last Synced: 2026-03-27T06:44:45.641Z (3 months ago)
- Topics: autonomous-driving, cpp, lane-detection, opencv, raspberry-pi, self-driving-car
- Language: C++
- Homepage:
- Size: 545 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Self-Driving Car
A very basic self driving car based on Rapsberry Pi5 board.
# Features
- lane detection
- motion calibation
- manual control
# Requirements
- ubuntu 24.04
- latest cmake version
- latest gcc or clang version
- gtest
- [wiringpi](https://github.com/WiringPi/WiringPi/tree/master)
- do not forget to add user to gpio group
- or `sudo chmod g+rw /dev/gpiomem0`
- opencv
- `sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2`
- [ros2](https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html)
- [LCCV](https://github.com/kbarni/LCCV/tree/main) LCCV (libcamera bindings for OpenCV) is a small wrapper library that provides access to the Raspberry Pi camera in OpenCV.
# Prepare your ROS2 environment
1. According to [official documentation](https://docs.ros.org/en/foxy/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files) for every new shell you will need to run this command to have access to the ROS 2 commands:
```
source /opt/ros/jazzy/setup.bash
```
2. Alternative way is to [add sourcing to your shell startup script](https://docs.ros.org/en/foxy/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files)
```
echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc
```
3. But for build rule and especially for install directory you have mannualy set the environment:
```
source install/local_setup.bash
```
# Build
```
make all
```
# Test
```
make tests
```
# Run
1. Choose module to run
```
sudo bash -c "chmod g+rw /dev/gpiomem0 && source /opt/ros/jazzy/setup.bash && source install/local_setup.bash && ros2 run motion-calibration motion_calibration"
sudo bash -c "source /opt/ros/jazzy/setup.bash && source install/local_setup.bash && ros2 run lane-detection lane-detection"
sudo bash -c "source /opt/ros/jazzy/setup.bash && source install/local_setup.bash && ros2 run main-pipeline main_pipeline"
sudo bash -c "source /opt/ros/jazzy/setup.bash && source install/local_setup.bash && ros2 run manual-control manual_control 192.168.1.70 8080"
```