Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🚗 Kotxe Autonomoa

POPBL Proiektua - Ingeniaritza Informatikako 1. maila (2. seihilekoa) · Mondragon Unibertsitatea · 2023–2024


🌐 Hizkuntza / Idioma / Language


🇪🇺 EUSKERA

📄 Deskribapena

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.

Lortutako helburuak

# 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

🛠️ Erabilitako teknologiak

  • VHDL - Hardware logiaren programazioa (FPGA/plaka)
  • C - Sistemaren kontrol softwarea
  • Raspberry Pi - Autoaren prozesamendu unitate nagusia
  • Linux / Lubuntu - Garapen ingurunea (makina birtuala)

🎥 Demoa

Autoaren funtzionamendua hemen ikus daiteke:

👉 Bideo demoa ikusi

⚙️ Nola erabili

1. Ingurunea prestatu

# Biltegia klonatu edo deskargatu
git clone <biltegi-url-a>

# Beharrezkoa bada, deskonprimatu
unzip proiektua.zip

2. 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_car

Abiaraztean, 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

🔗 Konektibitatea

Ordenagailuaren eta Raspberry Pi-ren arteko komunikazioa honela egin daiteke:

  • 📶 WiFi
  • 🔵 Bluetooth
  • 🔌 Ethernet

⚠️ Aurrebaldintzak

  • 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.

🇪🇸 CASTELLANO

📄 Descripción

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.

Objetivos alcanzados

# 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

🛠️ Tecnologías utilizadas

  • 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)

🎥 Demo

Puedes ver el coche en funcionamiento aquí:

👉 Ver vídeo demo

⚙️ Cómo usar

1. Preparación del entorno

# Clonar o descargar el repositorio
git clone <url-del-repositorio>

# Descomprimir si es necesario
unzip proyecto.zip

2. 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_car

Al 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

🔗 Conectividad

La comunicación entre el ordenador y la Raspberry Pi puede realizarse mediante:

  • 📶 WiFi
  • 🔵 Bluetooth
  • 🔌 Ethernet

⚠️ Requisitos previos

  • 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.

🇬🇧 ENGLISH

📄 Description

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.

Goals achieved

# 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

🛠️ Technologies used

  • VHDL - Hardware logic programming (FPGA/board)
  • C - System control software
  • Raspberry Pi - Main control unit of the car
  • Linux / Lubuntu - Development environment (virtual machine)

🎥 Demo

You can see the car in action here:

👉 Watch the demo video

⚙️ How to use

1. Set up the environment

# Clone or download the repository
git clone <repository-url>

# Extract if necessary
unzip project.zip

2. 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_car

When 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

🔗 Connectivity

Communication between the computer and the Raspberry Pi can be established via:

  • 📶 WiFi
  • 🔵 Bluetooth
  • 🔌 Ethernet

⚠️ Prerequisites

  • 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

About

Mondragon Unibertsitatea - POPBL2

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages