This is the main development repository for the 030 Berlin Spartans team for the oneERNI global hackathon 2023.
Development branch: develop
Link to main repository: oneERNIglobalhackaton
Our members are:
- Stephan Finner Stefan F.
- Max Cocco max-cocco
- Martin Teichler MTeichlerRche
- Stefan Trippler steftri
The base for the project is the PiCar-X by SunFounder with a Rapberry Pi 4.
A robot shall be able to drive thorugh a pre-defined parcours as fast as possible, while the operator is not physically present at the location of the parcours.
With the robot, it shall be possible to perform a drive through a parcours with the operator not beeing physically present at the location as quickly as possible.
The system shall be able to control the movement of the robot remotely.
The system shall provide a lane assist.
The system shall provide the posibility to parametrize the software to improve the performance.
The user should be able to control the robot with WASD (driving/steering) and EQ (turning the head). The keyboard controls should be responsive and not laggy.
The user should be able to control the robot with an on-screen keyboard/gamepad. The on-scren keyboard should give feedback to the user if it's being pressed.
The user should see the robot's video feed so they know where they are going.
The software shall provide the possibility to engage the lane assist on the robot.
The software shall provide the possibility to configure the P and I factor of the robot's PI controller.
The software shall provide the possibility to configure the grayscale values interpreted as black and white.
The software shall run on a Raspberry Pi 4 with a Robot HAT board.
The software shall be able to control the forward and backward motion.
The software shall be able to control the direction of the robot's movement.
The software shall be able to provide a real-time video from the robot's camera.
The software shall be able to receive and process remote control commands.
The software shall be able to follow a given track.
The software shall be able to follow a track with a radius of down to 30 cm.
The software shall be able to be tolerant against gaps in the track marking of up to 25 cm.
The software shall provide the posibility to configure the PI controller.
The software shall provide the possibility to configure the grayscale values interpreted as black and white.
The software shall provide the possibility to calibrate the grayscale values.
Stakeholder Requiremet | Traces to |
---|---|
StR01 - Solving a parcours | SysR02 - Remote Control SysRS3 - Lane Assist SysR04 - Optimization |
System Requirements | Traces to |
---|---|
SysR02 - Remote Control | FR02 - Keyboard controls FR03 - On-screen keyboard FR04 - Video feed SW01 - Environment SW02 - Motion SW03 - Steering SW04 - Video SW05 - RemoteControl |
SysR03 - Lane Assist | FR05 - Line Assist support SW06 - Lane Assist SW07 - Minimum Turn radius SW08 - Gaps in the track |
SysR04 - Optimization | FR06 - Configuration of parameters FR07 - Configuration grayscale sensor SW09 - Configuration of parameters SW10 - Configuration grayscale sensor SW11 - Calibration grayscale sensor |
The frontend and the firmware communicate via MQTT messages. The body of the messages are JSON-formatted.
The JSON message is formatted as follows:
{
"operation" : "<operation>",
"<parmeter>" : <value>
}
The following operations are available:
- stop
- set_speed(speed)
- stop()
- set_direction(angle)
- set_head_rotate(angle)
- set_head_tilt(angle)
- say(text)
- start_lane_asssist()
- set_grayscale_config(black, white)
- set_controller_config(p, i)
The firmware is composed of different modules
- The Lane Controller is responsible for calculating the position relatively to the track. Input data are the three grey values from the grey scale sensor. Output data is a value in float, while 0 means the car is exactly above the track, negative values means it is left of the track, positive values right.
- the PiControlle is responsible for calculating a direction command as the result of the calculated position above the track.
- the LinearCalib module is responsible for calibrate sensor values to a given output range.
- Raspberry Pi imager, version 1.7.5
- EzBlock Studio online
- EzBlock App, AppStore, Version 3.2.140
- Git Bash
- Visual Studio Code
- VSCode extension Python, Version v2023.6.1
- Raspberry Pi OS Lite (32-bit) with git, python3-pip, python3-setuptools and python3-smbus
- Robot-Hat v2.0
- vilib v0.0.6
- PiCar-X v2.0
- Visual Studio 2022
Package | Version |
---|---|
Microsoft.Extensions.Logging.Abstractions | 7.0.1 |
Microsoft.Extensions.Options | 7.0.1 |
MQTTnet | 4.3.1.873 |
MQTTnet.Extensions.ManagedClient | 4.3.1.873 |
Microsoft.NET.Test.Sdk | 17.5.0 |
NSubstitute | 5.1.0 |
xunit | 2.4.2 |
xunit.runner.visualstudio | 2.4.5 |
coverlet.collector | 3.2.0 |
Microsoft.Extensions.Logging | 7.0.0 |
Date: 2023-10-31
- Increase of motor speed to 50
- MQTT commands for configuration of PI controller and grayscale sensor added
- Calibration of grayscale sensor added
- Limits for integral part of PI Controller implemented
- PI controller parameters adjusted
Date: 2023-09-25
Initial version
Youtube video: The PiCar-X. A Raspberry Pi powered robot car. Supplied by SunFounder
WLAN: Hackathon
MQTT: broker.hivemq.com