POPBL Proiektua - Ingeniaritza Informatikako 1. maila (2. seihilekoa) · Mondragon Unibertsitatea · 2023–2024
Proiektu hau 2023–2024 ikasturtean garatu genuen, Mondragon Unibertsitateko Ingeniaritza Informatikako lehen mailan, seihilekoa amaitzean (POPBL). Helburu nagusia kotxe autonomo baten diseinua eta garapena izan zen, hainbat funtzionamendu desberdinekin.
| # | Helburua | Deskribapena |
|---|---|---|
| 1 | Eskuzko kontrola (manuala) | Teklatuaren bidez eta plakako botoien bidez autoa gidatzea |
| 2 | Lerro-jarraitzailea | Lerro beltzen jarraipena modu autonomoan, sentsoreen bidez |
| 3 | Bide laburrenaren aukeraketa | Dijkstra algoritmoa erabiliz bide laburrena aukeratzea |
| ➕ | Mugimendu predefinituak | Programatutako mugimenduen sekuentziak |
- VHDL - Hardware logiaren programazioa (FPGA/plaka)
- C - Sistemaren kontrol softwarea
- Raspberry Pi - Autoaren prozesamendu unitate nagusia
- Linux / Lubuntu - Garapen ingurunea (makina birtuala)
Autoaren funtzionamendua hemen ikus daiteke:
1. Ingurunea prestatu
# Biltegia klonatu edo deskargatu
git clone <biltegi-url-a>
# Beharrezkoa bada, deskonprimatu
unzip proiektua.zip2. Makina birtuala konfiguratu
- Linux/Lubuntu makina birtuala martxan jarri
3. Kodea konpilatu eta hedatu
# C kodea konpilatu
gcc -o autonomous_car main.c
# Binarioa Raspberry Pi-ra bidali (SCP adibidea)
scp autonomous_car pi@<RASPBERRY_IP>:~/4. Hardware konexioak
Ondorengoak ondo konektatu:
- 🔌 Lerro-sentsoreak
- ⚙️ Motorrak
- 🔧 Plaka / FPGA
5. Programa exekutatu
# Raspberry Pi-n
./autonomous_carAbiaraztean, nahi duzun modua aukeratu:
[1] Manuala → Teklatuaren eta plaka bidez kontrola
[2] Lerro-jarraitzailea → Sentsore bidezko modu autonomoa
[3] Bide laburrenena → Dijkstra algoritmoa
[4] Mugimendu predefinituak → Programan aukeratu zein ibilbide
Ordenagailuaren eta Raspberry Pi-ren arteko komunikazioa honela egin daiteke:
- 📶 WiFi
- 🔵 Bluetooth
- 🔌 Ethernet
- Hardware konexio guztiak programa exekutatu aurretik ondo eginda egon behar dira.
- Raspberry Pi eta ordenagailua sare berean egon behar dira edo zuzen lotuta.
- Kodea konpilatu eta bidaltzean, makina birtuala aktibo egon behar da.
Desarrollamos este proyecto durante el curso 2023–2024 en el primer año del grado de Ingeniería Informática en la Mondragon Unibertsitatea, como proyecto de semestre dentro de la metodología POPBL. El objetivo principal fue diseñar y construir un coche autónomo con diferentes modos de funcionamiento.
| # | Objetivo | Descripción |
|---|---|---|
| 1 | Control manual | Conducción del coche mediante teclado y botones en la placa |
| 2 | Seguidor de línea | Seguimiento autónomo de líneas negras mediante sensores |
| 3 | Ruta más corta | Selección automática del camino más corto usando el algoritmo de Dijkstra |
| ➕ | Movimientos predefinidos | Secuencias de movimiento preprogramadas |
- VHDL - Programación de la lógica hardware (FPGA/placa)
- C - Software de control del sistema
- Raspberry Pi - Procesador principal del coche
- Linux / Lubuntu - Entorno de desarrollo (máquina virtual)
Puedes ver el coche en funcionamiento aquí:
1. Preparación del entorno
# Clonar o descargar el repositorio
git clone <url-del-repositorio>
# Descomprimir si es necesario
unzip proyecto.zip2. Configurar la máquina virtual
- Iniciar la máquina virtual Linux/Lubuntu
3. Compilar y desplegar el código
# Compilar el código C
gcc -o autonomous_car main.c
# Enviar el binario a la Raspberry Pi (ejemplo con SCP)
scp autonomous_car pi@<IP_RASPBERRY>:~/4. Conexiones de hardware
Asegúrate de conectar correctamente:
- 🔌 Sensores de línea
- ⚙️ Motores
- 🔧 Placa / FPGA
5. Ejecutar el programa
# En la Raspberry Pi
./autonomous_carAl iniciar, selecciona el modo deseado:
[1] Manual → Control por teclado
[2] Seguidor de línea → Modo autónomo con sensores
[3] Ruta más corta → Algoritmo de Dijkstra
La comunicación entre el ordenador y la Raspberry Pi puede realizarse mediante:
- 📶 WiFi
- 🔵 Bluetooth
- 🔌 Ethernet
- Todas las conexiones de hardware deben estar correctamente realizadas antes de ejecutar el programa.
- La Raspberry Pi y el ordenador deben estar en la misma red o correctamente enlazados.
- La máquina virtual debe estar activa durante la compilación y el envío del código.
We developed this project in our first year of Computer Engineering (2023–2024) at Mondragon Unibertsitatea, as part of a semester-long POPBL project. The main goal was to design and build an autonomous car with different operating modes.
| # | Goal | Description |
|---|---|---|
| 1 | Manual control | Driving the car via keyboard and on-board buttons |
| 2 | Line follower | Autonomous following of black lines using sensors |
| 3 | Shortest path | Automatic selection of the shortest route using Dijkstra's algorithm |
| ➕ | Pre-programmed motion sequences | Programmed movement sequences |
- VHDL - Hardware logic programming (FPGA/board)
- C - System control software
- Raspberry Pi - Main control unit of the car
- Linux / Lubuntu - Development environment (virtual machine)
You can see the car in action here:
1. Set up the environment
# Clone or download the repository
git clone <repository-url>
# Extract if necessary
unzip project.zip2. Configure the virtual machine
- Start the Linux/Lubuntu virtual machine
3. Compile and deploy the code
# Compile the C code
gcc -o autonomous_car main.c
# Transfer the binary to the Raspberry Pi
scp autonomous_car pi@<RASPBERRY_PI_IP>:~/4. Hardware connections
Make sure to properly connect:
- 🔌 Line sensors
- ⚙️ Motors
- 🔧 Board / FPGA
5. Run the program
# On the Raspberry Pi
./autonomous_carWhen starting the program, select a mode:
[1] Manual → Keyboard and board control
[2] Line follower → Sensor-based autonomous mode
[3] Shortest path → Dijkstra algorithm
[4] Predefined moves → Preprogrammed sequences
Communication between the computer and the Raspberry Pi can be established via:
- 📶 WiFi
- 🔵 Bluetooth
- 🔌 Ethernet
- All hardware connections must be properly set up before running the program.
- The Raspberry Pi and the computer must be on the same network or correctly linked.
- The virtual machine must be active during code compilation and transfer.
Eskola Politeknikoa · Mondragon Unibertsitatea · 2023–2024