mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-05 12:54:57 +00:00
Compare commits
36 Commits
194920bdad
...
Develop_te
Author | SHA1 | Date | |
---|---|---|---|
|
606506e40c | ||
|
6efd95fb32 | ||
|
5eff7fccba | ||
|
a03894e52e | ||
dd2a1b56c4 | |||
|
1563528b67 | ||
|
2e5af52ba8 | ||
|
eb04d35d40 | ||
|
80fcb1ccc3 | ||
|
62cdf98098 | ||
|
db6fa156c9 | ||
|
048790ec8b | ||
|
aca6644c02 | ||
|
492f506aa2 | ||
c76ba93e82 | |||
0bfba0bffe | |||
|
8a5b349040 | ||
|
a41ea1b70c | ||
eb804c888c | |||
a028a6f88f | |||
47b29a1c55 | |||
528de4f3f4 | |||
|
c16ba3cf9d | ||
|
82c4381143 | ||
|
25b1fa8c35 | ||
|
cc9aefa424 | ||
|
3d95479840 | ||
|
b2a24779f5 | ||
|
97efd7d6e1 | ||
|
ef52dbefe4 | ||
|
f24b88bd68 | ||
|
f9767965a1 | ||
|
a6b1b3bd1e | ||
|
c9efba62d4 | ||
661fdb9d26 | |||
0e30854b51 |
@@ -19,14 +19,9 @@ Acceptatie criteria zijn specifieke eisen waaraan de User Story moet voldoen. De
|
|||||||
- [ ] Acceptatiecriterium 2
|
- [ ] Acceptatiecriterium 2
|
||||||
- [ ] ...
|
- [ ] ...
|
||||||
|
|
||||||
**Definition of Done**
|
**Definition of Done: Hardware**
|
||||||
|
|
||||||
- [ ] Alle acceptatiecriteria van de user story zijn afgevinkt.
|
- [ ] Alle acceptatiecriteria van de user story zijn afgevinkt.
|
||||||
- [ ] Je hebt volgens de HBO-ICT werkstandaarden gewerkt (Agile, GitLab, sprint boards, sprint planning, HBO-ICT conventions etc.)
|
- [ ] Je werk is gedocumenteerd.
|
||||||
- [ ] Het werk is technisch gedocumenteerd in het Engels en relevant voor collega-ontwikkelaars. Denk o.a. aan ERD, UML, testen en testresultaten.
|
- [ ] Je hebt testen uitgevoerd.
|
||||||
- [ ] Het leerproces is beschreven in Standaardnederlands.
|
- [ ]
|
||||||
- [ ] Het werk is gereviewd door een peer.
|
|
||||||
- [ ] Het UX/UI gedeelte van de applicatie voldoet aan het Think-Make-Check (TMC) principe.
|
|
||||||
- [ ] De code is functioneel getest op fouten.
|
|
||||||
- [ ] De code werkt zonder fouten bij normaal gebruik.
|
|
||||||
- [ ] De webapplicatie dient zowel op mobiele- als desktop-apparaten gebruikt te kunnen worden.
|
|
@@ -1,2 +0,0 @@
|
|||||||
# Feedback expert review
|
|
||||||
|
|
10
docs/code/code-requirements.md
Normal file
10
docs/code/code-requirements.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Requirements
|
||||||
|
|
||||||
|
1. Het compileerd op x86 en ARM architechturen
|
||||||
|
2. Geen dubbele code
|
||||||
|
3. commentaar bij lastige code
|
||||||
|
4. Doxygen comments bij elke functie, behalve als het duidelijk is in de functienaam
|
||||||
|
5. Hou je code leesbaar
|
||||||
|
6. Geen dode code
|
||||||
|
7. Gebruik TODO comments (TODO TREE)
|
||||||
|
8.
|
@@ -1,22 +1,21 @@
|
|||||||
# **Projectplan - robot voor Gevaarlijke Omgevingen**
|
# **Projectplan - robot voor Gevaarlijke Omgevingen**
|
||||||
|
|
||||||
### Projectbescrhijving
|
### Projectbeschrijving
|
||||||
|
|
||||||
Het project betreft de ontwikkeling van een robot voor gevaarlijke omgevingen. De robot is bedoeld om gevaarlijke situaties te verkennen en in kaart te brengen. De robot is uitgerust met verschillende sensoren en daar gaan we zelf nog een camera en andere sensoren op zetten om de omgeving te verkennen. De data wordt verzameld en geanalyseerd om een beeld te krijgen van de situatie. De robot kan worden ingezet in verschillende situaties, zoals branden, instortingen en andere gevaarlijke situaties.
|
Het project betreft de ontwikkeling van een robot voor gevaarlijke omgevingen. De robot is bedoeld om gevaarlijke situaties te verkennen en in kaart te brengen. De robot is uitgerust met verschillende sensoren en daar gaan we zelf nog een camera en andere sensoren op zetten om de omgeving te verkennen. De data wordt verzameld en geanalyseerd om een beeld te krijgen van de situatie. De robot kan worden ingezet in verschillende situaties, zoals branden, instortingen en andere gevaarlijke situaties.
|
||||||
|
|
||||||
|
|
||||||
### 1. Organisatorische Context
|
### 1. Organisatorische Context
|
||||||
|
|
||||||
Bij de ontwikkeling van de robot zijn verschillende factoren van belang. Maatschappelijke veranderingen zoals duurzaamheid en de toenemende vraag naar technologische oplossingen voor gevaarlijke werkomgevingen spelen een grote rol. De robot kan worden ingezet voor gevaarlijke situaties waar bijvoorbeeld geen mensen naar binnen kunnen.
|
Bij de ontwikkeling van de robot zijn verschillende factoren van belang. Maatschappelijke veranderingen zoals duurzaamheid en de toenemende vraag naar technologische oplossingen voor gevaarlijke werkomgevingen spelen een grote rol. De robot kan worden ingezet voor gevaarlijke situaties waar bijvoorbeeld geen mensen naar binnen kunnen.
|
||||||
|
|
||||||
**Vervolgstappen:**
|
**Vervolgstappen:**
|
||||||
|
|
||||||
- Focus op duurzaamheid en herbruikbaarheid.
|
- Focus op duurzaamheid en herbruikbaarheid.
|
||||||
- Inzetten op veiligheid en efficiëntie.
|
- Inzetten op veiligheid en efficiëntie.
|
||||||
|
|
||||||
### 2. Ethiek
|
### 2. Ethiek
|
||||||
|
|
||||||
Ethische vragen staan centraal bij de ontwikkeling van de robot. Er moet rekening gehouden worden met de veiligheid van de gegevens van gebruiker. Het minimaliseren van de milieu-impact door duurzame materialen te gebruiken zoals hout en metaal. Privacy speelt ook een belangrijke rol. De verzamelde data moet veilig worden gebruikt en opgeslagen en het moet de EU privacy richtlijnen volgen.
|
Ethische vragen staan centraal bij de ontwikkeling van de robot. Er moet rekening gehouden worden met de veiligheid van de gegevens van gebruiker. Het minimaliseren van de milieu-impact door duurzame materialen te gebruiken zoals hout en metaal. Privacy speelt ook een belangrijke rol. De verzamelde data moet veilig worden gebruikt en opgeslagen en het moet de EU privacy richtlijnen volgen.
|
||||||
|
|
||||||
**Punten waar we rekening mee moeten houden:**
|
**Punten waar we rekening mee moeten houden:**
|
||||||
|
|
||||||
@@ -27,7 +26,6 @@ Ethische vragen staan centraal bij de ontwikkeling van de robot. Er moet rekenin
|
|||||||
|
|
||||||
Het project wordt uitgevoerd vanuit een duidelijk plan waar elke sprint een deel van het project centraal staat. Driver bouwen, testen en verbindingen leggen tussen elk gedeelte van het project. We gebruiken de Agile methodiek dus alles kan nog veranderen. Hierbij moeten wij dus ook rekening houden met de etische en organisatorische aspecten, zoals duurzaamheid en veiligheid.
|
Het project wordt uitgevoerd vanuit een duidelijk plan waar elke sprint een deel van het project centraal staat. Driver bouwen, testen en verbindingen leggen tussen elk gedeelte van het project. We gebruiken de Agile methodiek dus alles kan nog veranderen. Hierbij moeten wij dus ook rekening houden met de etische en organisatorische aspecten, zoals duurzaamheid en veiligheid.
|
||||||
|
|
||||||
|
|
||||||
### Aanpak
|
### Aanpak
|
||||||
|
|
||||||
**Werk methode:** Gebruik van Agile projectmanagement voor flexibiliteit.
|
**Werk methode:** Gebruik van Agile projectmanagement voor flexibiliteit.
|
||||||
@@ -36,4 +34,4 @@ Het project wordt uitgevoerd vanuit een duidelijk plan waar elke sprint een deel
|
|||||||
|
|
||||||
**Duurzaamheid & Verbetering:** Zorgen dat we duurzame materialen kunnen gebruiken en dat we de robot kunnen blijven verbeteren.
|
**Duurzaamheid & Verbetering:** Zorgen dat we duurzame materialen kunnen gebruiken en dat we de robot kunnen blijven verbeteren.
|
||||||
|
|
||||||
Deze aanpak zorgt ervoor dat het project niet alleen technisch succesvol is, maar ook voldoet aan ethische en organisatorische normen.
|
Deze aanpak zorgt ervoor dat het project niet alleen technisch succesvol is, maar ook voldoet aan ethische en organisatorische normen.
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
# Wat gaan we maken
|
# Wat gaan we maken
|
||||||
|
|
||||||
## Sensoren
|
## Sensoren
|
||||||
|
|
||||||
* Camera
|
* Camera
|
||||||
* GPS module
|
* GPS module
|
||||||
* Temparatuur sensor
|
* Temparatuur sensor
|
||||||
@@ -12,21 +13,27 @@
|
|||||||
## Wat gaan we met de sensoren doen?
|
## Wat gaan we met de sensoren doen?
|
||||||
|
|
||||||
### Camera
|
### Camera
|
||||||
|
|
||||||
De camera word gebruikt om foto's te maken in de omgeving in het geval van informatie verkrijgen voor als de robot bijvoorbeeld vast zit, geeft ook optie om informatie te krijgen zonder op de plek zelf te zijn.
|
De camera word gebruikt om foto's te maken in de omgeving in het geval van informatie verkrijgen voor als de robot bijvoorbeeld vast zit, geeft ook optie om informatie te krijgen zonder op de plek zelf te zijn.
|
||||||
|
|
||||||
### GPS module
|
### GPS module
|
||||||
|
|
||||||
De GPS module word gebruikt om de locatie van de robot te bepalen en aan te geven waar bijzonderheden bevinden.
|
De GPS module word gebruikt om de locatie van de robot te bepalen en aan te geven waar bijzonderheden bevinden.
|
||||||
|
|
||||||
### Temparatuur, TVOC en ECO2 sensor
|
### Temparatuur, TVOC en ECO2 sensor
|
||||||
|
|
||||||
Deze sensoren zijn bedoeld om de omgeving te meten en te kijken of de omgeving veilig is voor mensen om in te gaan.
|
Deze sensoren zijn bedoeld om de omgeving te meten en te kijken of de omgeving veilig is voor mensen om in te gaan.
|
||||||
|
|
||||||
### LDR sensor
|
### LDR sensor
|
||||||
|
|
||||||
De LDR sensor word gebruikt om de lichtsterkte te meten en te kijken of er een lamp op de robot aan moet gaan voor de camera.
|
De LDR sensor word gebruikt om de lichtsterkte te meten en te kijken of er een lamp op de robot aan moet gaan voor de camera.
|
||||||
|
|
||||||
### Time of Flight sensor
|
### Time of Flight sensor
|
||||||
|
|
||||||
De Time of Flight sensor word gebruikt om de afstand te meten tussen de robot en de muur, zodat de robot niet tegen de muur aan botst.
|
De Time of Flight sensor word gebruikt om de afstand te meten tussen de robot en de muur, zodat de robot niet tegen de muur aan botst.
|
||||||
|
|
||||||
## Het project
|
## Het project
|
||||||
|
|
||||||
Bij brand of op fabrieksterreinen met gevaarlijke stoffen kan het nodig zijn om een verkenning te
|
Bij brand of op fabrieksterreinen met gevaarlijke stoffen kan het nodig zijn om een verkenning te
|
||||||
doen van een verdachte omgeving. Het is dan niet verstandig om mensen naar binnen te sturen, in
|
doen van een verdachte omgeving. Het is dan niet verstandig om mensen naar binnen te sturen, in
|
||||||
die gevallen vallen de hulpdiensten terug om een verkenningsrobot. Het doel van het project is het
|
die gevallen vallen de hulpdiensten terug om een verkenningsrobot. Het doel van het project is het
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
# home
|
|
@@ -1,5 +0,0 @@
|
|||||||
- [x] Kobuki werkt met driver.
|
|
||||||
- [x] Ik kan de data uitlezen.
|
|
||||||
- [ ] Data wordt correct weergegeven.
|
|
||||||
- [ ] Ik kan de data laten zien in op de website.
|
|
||||||
- [ ] Ik kan de kobuki besturen vanaf de website.
|
|
20
docs/scrum/daily_stand_up.md
Normal file
20
docs/scrum/daily_stand_up.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Daily stand ups
|
||||||
|
|
||||||
|
??? note "Daily Stand-ups Sprint 4"
|
||||||
|
| Day | Submitted by | What did you do yesterday | What will you do today | Any blockers? |
|
||||||
|
| ---------- | ------------ | ----------------------------- | -------------------------------------------------- | ------------------------------------ |
|
||||||
|
| 18/11/2024 | Ishak | --- | Engels, Repo fixen, beginnen met nieuwe user story | --- |
|
||||||
|
| 18/11/2024 | Sam | --- | Engels, Feedback verwerken medium stake | None |
|
||||||
|
| 18/11/2024 | Yannick | --- | Engels, Documentatie, Code samenvoegen | None |
|
||||||
|
| 18/11/2024 | Mees | --- | Engels, Onderzoek | None |
|
||||||
|
| 19/11/2024 | Ishak | Engels, Repo fixen | workshop | --- |
|
||||||
|
| 19/11/2024 | Sam | Engels, Feedback verwerken | workshop | None |
|
||||||
|
| 19/11/2024 | Yannick | code samenvoegen,schema maken | workshop, documentatie | None |
|
||||||
|
| 19/11/2024 | Mees | niks | workshop, fixen include path | include path werkt niet |
|
||||||
|
| 26/11/2024 | Ishak | Workshop | database, engels video opnemen | phpmyadmin werkt niet(weet probleem) |
|
||||||
|
| 26/11/2024 | Sam | opencv | opencv | --- |
|
||||||
|
| 26/11/2024 | Yannick | ziek | ziek | --- |
|
||||||
|
| 26/11/2024 | Mees | Engels video | stepper motor | vscode werkt niet |
|
||||||
|
| 02/12/2024 | Ishak | database | database | --- |
|
||||||
|
| 02/12/2024 | Sam | opencv | camera beeld op website | --- |
|
||||||
|
| 02/12/2024 | Yannick | ziek, documentatie | behuizing voor esp | --- |
|
12
docs/scrum/review_feedback.md
Normal file
12
docs/scrum/review_feedback.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# sprint review 4 feedback
|
||||||
|
|
||||||
|
- Definition of done SMART maken
|
||||||
|
- Uitgebreider beschrijven wat er voor de definition of done nodig is
|
||||||
|
- Testen van de software niet meer dan een halve A4
|
||||||
|
- Acceptatie criteria beter uitschrijven( vragen aan ed)
|
||||||
|
- Meer software ontwikkelen
|
||||||
|
- kijken of we met een punten systeem kunnen werken in user stories. zo kan je zien hoe groot een user story is.
|
||||||
|
- read.me file aanpassen
|
||||||
|
- meer aan documentatie doen.
|
||||||
|
- technisch iets te uitdagend
|
||||||
|
- planning beter maken
|
33
mkdocs.yml
33
mkdocs.yml
@@ -34,17 +34,22 @@ plugins:
|
|||||||
modules: [mkdocs_macros_mdocotion]
|
modules: [mkdocs_macros_mdocotion]
|
||||||
|
|
||||||
markdown_extensions:
|
markdown_extensions:
|
||||||
- attr_list
|
- attr_list
|
||||||
- md_in_html
|
- admonition
|
||||||
- fenced_code
|
- pymdownx.details
|
||||||
- pymdownx.highlight:
|
- pymdownx.superfences
|
||||||
linenums: true
|
- md_in_html
|
||||||
use_pygments: true
|
- fenced_code
|
||||||
- pymdownx.inlinehilite
|
- pymdownx.highlight:
|
||||||
- pymdownx.snippets
|
linenums: true
|
||||||
- pymdownx.tabbed
|
use_pygments: true
|
||||||
- pymdownx.superfences:
|
- pymdownx.inlinehilite
|
||||||
custom_fences:
|
- pymdownx.snippets
|
||||||
- name: mermaid
|
- pymdownx.superfences:
|
||||||
class: mermaid
|
custom_fences:
|
||||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
- name: mermaid
|
||||||
|
class: mermaid
|
||||||
|
format: !!python/name:pymdownx.superfences.fence_code_format
|
||||||
|
- toc:
|
||||||
|
permalink: true
|
||||||
|
- pymdownx.details
|
||||||
|
@@ -535,6 +535,8 @@ void CKobuki::goToXy(long double xx, long double yy) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @brief Makes the robot move forward for 3 seconds
|
||||||
|
/// @param speedvalue How fast it will drive forward from 0 - 1024
|
||||||
void CKobuki::forward(int speedvalue) {
|
void CKobuki::forward(int speedvalue) {
|
||||||
// Use the goStraight logic to determine the speed and distance
|
// Use the goStraight logic to determine the speed and distance
|
||||||
|
|
||||||
@@ -572,10 +574,10 @@ void CKobuki::Rotate(int degrees) {
|
|||||||
float radians = degrees * PI / 180.0;
|
float radians = degrees * PI / 180.0;
|
||||||
|
|
||||||
// Calculate the rotation speed in radians per second
|
// Calculate the rotation speed in radians per second
|
||||||
double radpersec = 1;
|
double RADS_PER_SEC = 1;
|
||||||
|
|
||||||
// calculator rotation time and give absolute value
|
// calculator rotation time and give absolute value
|
||||||
float rotation_time = std::abs(radians / radpersec);
|
float rotation_time = std::abs(radians / RADS_PER_SEC);
|
||||||
|
|
||||||
// Use original function to set the rotation speed in mm/s
|
// Use original function to set the rotation speed in mm/s
|
||||||
setRotationSpeed(radians);
|
setRotationSpeed(radians);
|
||||||
@@ -588,6 +590,10 @@ void CKobuki::Rotate(int degrees) {
|
|||||||
setRotationSpeed(0);
|
setRotationSpeed(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// @brief Robot safety function to be ran in another thread. Makes sure the robot does not throw inteself from the table. Only use this when the speed is lower than 350
|
||||||
|
/// @param pointerToMessage Set this pointer to the control message and then it attempts to reset it when it bumps into something so it doesnt keep trying to do the past commant
|
||||||
|
// TODO: make this return bool so it can be used in the control part
|
||||||
void CKobuki::robotSafety(std::string *pointerToMessage) {
|
void CKobuki::robotSafety(std::string *pointerToMessage) {
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
@@ -602,6 +608,7 @@ void CKobuki::robotSafety(std::string *pointerToMessage) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @brief Robot safety function to be ran in another thread. Makes sure the robot does not throw inteself from the table. Only use this when the speed is lower than 350
|
||||||
void CKobuki::robotSafety() {
|
void CKobuki::robotSafety() {
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
@@ -614,6 +621,7 @@ void CKobuki::robotSafety() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @brief When called the robot gets a control message to stop whatever its doing
|
||||||
void CKobuki::sendNullMessage() {
|
void CKobuki::sendNullMessage() {
|
||||||
|
|
||||||
unsigned char message[11] = {
|
unsigned char message[11] = {
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
MqttClient::MqttClient(const std::string& address, const std::string& clientId, const std::string& username, const std::string& password)
|
MqttClient::MqttClient(const std::string& address, const std::string& clientId, const std::string& username, const std::string& password)
|
||||||
//client_ is the connection
|
//client_ is the connection
|
||||||
|
//here all the @PARAMS are getting set for the connection
|
||||||
: client_(address, clientId), username_(username), password_(password), callback_(*this) {
|
: client_(address, clientId), username_(username), password_(password), callback_(*this) {
|
||||||
client_.set_callback(callback_);
|
client_.set_callback(callback_);
|
||||||
options.set_clean_session(true);
|
options.set_clean_session(true);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#include "MqttClient.h"
|
#include "MqttClient.h"
|
||||||
|
//example file for testing
|
||||||
int main(){
|
int main(){
|
||||||
MqttClient client("mqtt://localhost:1883", "raspberry_pi_client", "ishak", "kobuki");
|
MqttClient client("mqtt://localhost:1883", "raspberry_pi_client", "ishak", "kobuki");
|
||||||
client.connect();
|
client.connect();
|
||||||
|
@@ -9,7 +9,8 @@ using namespace std;
|
|||||||
CKobuki robot;
|
CKobuki robot;
|
||||||
std::string readMQTT();
|
std::string readMQTT();
|
||||||
void parseMQTT(std::string message);
|
void parseMQTT(std::string message);
|
||||||
MqttClient client("mqtt://145.92.224.21:1883", "KobukiRPI", "ishak", "kobuki"); // create a client object
|
//ip, clientID, username, password
|
||||||
|
MqttClient client("mqtt://145.92.224.21:1884", "KobukiRPI", "rpi", "rpiwachtwoordofzo"); // create a client object
|
||||||
std::string message = "stop";
|
std::string message = "stop";
|
||||||
std::string serializeKobukiData(const TKobukiData &data);
|
std::string serializeKobukiData(const TKobukiData &data);
|
||||||
void sendKobukiData(TKobukiData &data);
|
void sendKobukiData(TKobukiData &data);
|
||||||
@@ -18,6 +19,7 @@ void setup()
|
|||||||
{
|
{
|
||||||
unsigned char *null_ptr(0);
|
unsigned char *null_ptr(0);
|
||||||
robot.startCommunication("/dev/ttyUSB0", true, null_ptr);
|
robot.startCommunication("/dev/ttyUSB0", true, null_ptr);
|
||||||
|
//connect mqtt server and sub to commands
|
||||||
client.connect();
|
client.connect();
|
||||||
client.subscribe("home/commands");
|
client.subscribe("home/commands");
|
||||||
}
|
}
|
||||||
@@ -149,6 +151,64 @@ void logToFile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sendIndividualKobukiData(const TKobukiData &data) {
|
||||||
|
while (true) {
|
||||||
|
client.publishMessage("kobuki/data/timestamp", std::to_string(data.timestamp));
|
||||||
|
client.publishMessage("kobuki/data/BumperCenter", std::to_string(data.BumperCenter));
|
||||||
|
client.publishMessage("kobuki/data/BumperLeft", std::to_string(data.BumperLeft));
|
||||||
|
client.publishMessage("kobuki/data/BumperRight", std::to_string(data.BumperRight));
|
||||||
|
client.publishMessage("kobuki/data/WheelDropLeft", std::to_string(data.WheelDropLeft));
|
||||||
|
client.publishMessage("kobuki/data/WheelDropRight", std::to_string(data.WheelDropRight));
|
||||||
|
client.publishMessage("kobuki/data/CliffCenter", std::to_string(data.CliffCenter));
|
||||||
|
client.publishMessage("kobuki/data/CliffLeft", std::to_string(data.CliffLeft));
|
||||||
|
client.publishMessage("kobuki/data/CliffRight", std::to_string(data.CliffRight));
|
||||||
|
client.publishMessage("kobuki/data/EncoderLeft", std::to_string(data.EncoderLeft));
|
||||||
|
client.publishMessage("kobuki/data/EncoderRight", std::to_string(data.EncoderRight));
|
||||||
|
client.publishMessage("kobuki/data/PWMleft", std::to_string(data.PWMleft));
|
||||||
|
client.publishMessage("kobuki/data/PWMright", std::to_string(data.PWMright));
|
||||||
|
client.publishMessage("kobuki/data/ButtonPress1", std::to_string(data.ButtonPress1));
|
||||||
|
client.publishMessage("kobuki/data/ButtonPress2", std::to_string(data.ButtonPress2));
|
||||||
|
client.publishMessage("kobuki/data/ButtonPress3", std::to_string(data.ButtonPress3));
|
||||||
|
client.publishMessage("kobuki/data/Charger", std::to_string(data.Charger));
|
||||||
|
client.publishMessage("kobuki/data/Battery", std::to_string(data.Battery));
|
||||||
|
client.publishMessage("kobuki/data/overCurrent", std::to_string(data.overCurrent));
|
||||||
|
client.publishMessage("kobuki/data/IRSensorRight", std::to_string(data.IRSensorRight));
|
||||||
|
client.publishMessage("kobuki/data/IRSensorCenter", std::to_string(data.IRSensorCenter));
|
||||||
|
client.publishMessage("kobuki/data/IRSensorLeft", std::to_string(data.IRSensorLeft));
|
||||||
|
client.publishMessage("kobuki/data/GyroAngle", std::to_string(data.GyroAngle));
|
||||||
|
client.publishMessage("kobuki/data/GyroAngleRate", std::to_string(data.GyroAngleRate));
|
||||||
|
client.publishMessage("kobuki/data/CliffSensorRight", std::to_string(data.CliffSensorRight));
|
||||||
|
client.publishMessage("kobuki/data/CliffSensorCenter", std::to_string(data.CliffSensorCenter));
|
||||||
|
client.publishMessage("kobuki/data/CliffSensorLeft", std::to_string(data.CliffSensorLeft));
|
||||||
|
client.publishMessage("kobuki/data/wheelCurrentLeft", std::to_string(data.wheelCurrentLeft));
|
||||||
|
client.publishMessage("kobuki/data/wheelCurrentRight", std::to_string(data.wheelCurrentRight));
|
||||||
|
client.publishMessage("kobuki/data/digitalInput", std::to_string(data.digitalInput));
|
||||||
|
client.publishMessage("kobuki/data/analogInputCh0", std::to_string(data.analogInputCh0));
|
||||||
|
client.publishMessage("kobuki/data/analogInputCh1", std::to_string(data.analogInputCh1));
|
||||||
|
client.publishMessage("kobuki/data/analogInputCh2", std::to_string(data.analogInputCh2));
|
||||||
|
client.publishMessage("kobuki/data/analogInputCh3", std::to_string(data.analogInputCh3));
|
||||||
|
client.publishMessage("kobuki/data/frameId", std::to_string(data.frameId));
|
||||||
|
client.publishMessage("kobuki/data/extraInfo/HardwareVersionPatch", std::to_string(data.extraInfo.HardwareVersionPatch));
|
||||||
|
client.publishMessage("kobuki/data/extraInfo/HardwareVersionMinor", std::to_string(data.extraInfo.HardwareVersionMinor));
|
||||||
|
client.publishMessage("kobuki/data/extraInfo/HardwareVersionMajor", std::to_string(data.extraInfo.HardwareVersionMajor));
|
||||||
|
client.publishMessage("kobuki/data/extraInfo/FirmwareVersionPatch", std::to_string(data.extraInfo.FirmwareVersionPatch));
|
||||||
|
client.publishMessage("kobuki/data/extraInfo/FirmwareVersionMinor", std::to_string(data.extraInfo.FirmwareVersionMinor));
|
||||||
|
client.publishMessage("kobuki/data/extraInfo/FirmwareVersionMajor", std::to_string(data.extraInfo.FirmwareVersionMajor));
|
||||||
|
client.publishMessage("kobuki/data/extraInfo/UDID0", std::to_string(data.extraInfo.UDID0));
|
||||||
|
client.publishMessage("kobuki/data/extraInfo/UDID1", std::to_string(data.extraInfo.UDID1));
|
||||||
|
client.publishMessage("kobuki/data/extraInfo/UDID2", std::to_string(data.extraInfo.UDID2));
|
||||||
|
|
||||||
|
if (!data.gyroData.empty()) {
|
||||||
|
const auto& latestGyro = data.gyroData.back();
|
||||||
|
client.publishMessage("kobuki/data/gyroData/x", std::to_string(latestGyro.x));
|
||||||
|
client.publishMessage("kobuki/data/gyroData/y", std::to_string(latestGyro.y));
|
||||||
|
client.publishMessage("kobuki/data/gyroData/z", std::to_string(latestGyro.z));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string serializeKobukiData(const TKobukiData &data) {
|
std::string serializeKobukiData(const TKobukiData &data) {
|
||||||
std::string json = "{\"timestamp\":" + std::to_string(data.timestamp) +
|
std::string json = "{\"timestamp\":" + std::to_string(data.timestamp) +
|
||||||
",\"BumperCenter\":" + std::to_string(data.BumperCenter) +
|
",\"BumperCenter\":" + std::to_string(data.BumperCenter) +
|
||||||
@@ -212,4 +272,4 @@ void sendKobukiData(TKobukiData &data) {
|
|||||||
client.publishMessage("kobuki/data", serializeKobukiData(data));
|
client.publishMessage("kobuki/data", serializeKobukiData(data));
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,56 +1,64 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <mqtt/async_client.h>
|
#include <mqtt/async_client.h>
|
||||||
#include <thread> // Voor std::this_thread::sleep_for
|
#include <thread> // For std::this_thread::sleep_for
|
||||||
#include <chrono> // Voor std::chrono::seconds
|
#include <chrono> // For std::chrono::seconds
|
||||||
|
|
||||||
const std::string ADDRESS("mqtt://localhost:1883"); // Aanpassen indien nodig
|
// Define the address of the MQTT broker, the client ID, and the topic to subscribe to.
|
||||||
|
const std::string ADDRESS("mqtt://localhost:1883"); // Broker address (Raspberry Pi)
|
||||||
const std::string CLIENT_ID("raspberry_pi_client");
|
const std::string CLIENT_ID("raspberry_pi_client");
|
||||||
const std::string TOPIC("home/commands");
|
const std::string TOPIC("home/commands");
|
||||||
|
|
||||||
|
// Define a callback class that handles incoming messages and connection events.
|
||||||
class callback : public virtual mqtt::callback {
|
class callback : public virtual mqtt::callback {
|
||||||
|
// Called when a message arrives on a subscribed topic.
|
||||||
void message_arrived(mqtt::const_message_ptr msg) override {
|
void message_arrived(mqtt::const_message_ptr msg) override {
|
||||||
std::cout << "Ontvangen bericht: '" << msg->get_topic()
|
std::cout << "Received message: '" << msg->get_topic()<< "' : " << msg->to_string() << std::endl;
|
||||||
<< "' : " << msg->to_string() << std::endl;
|
|
||||||
// Doe iets met het bericht, bijvoorbeeld een GP.IO-activering
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called when the connection to the broker is lost.
|
||||||
void connection_lost(const std::string& cause) override {
|
void connection_lost(const std::string& cause) override {
|
||||||
std::cerr << "Verbinding verloren. Oorzaak: " << cause << std::endl;
|
std::cerr << "Connection lost. Reason: " << cause << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called when a message delivery is complete.
|
||||||
void delivery_complete(mqtt::delivery_token_ptr token) override {
|
void delivery_complete(mqtt::delivery_token_ptr token) override {
|
||||||
std::cout << "Bericht afgeleverd!" << std::endl;
|
std::cout << "Message delivered!" << std::endl;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
// Create an MQTT async client and set up the callback class.
|
||||||
mqtt::async_client client(ADDRESS, CLIENT_ID);
|
mqtt::async_client client(ADDRESS, CLIENT_ID);
|
||||||
callback cb;
|
callback cb;
|
||||||
client.set_callback(cb);
|
client.set_callback(cb);
|
||||||
|
|
||||||
|
// Set up the connection options (such as username and password).
|
||||||
mqtt::connect_options connOpts;
|
mqtt::connect_options connOpts;
|
||||||
connOpts.set_clean_session(true);
|
connOpts.set_clean_session(true);
|
||||||
connOpts.set_user_name("ishak");
|
connOpts.set_user_name("ishak");
|
||||||
connOpts.set_password("kobuki");
|
connOpts.set_password("kobuki");
|
||||||
connOpts.set_mqtt_version(MQTTVERSION_3_1_1); // Voor MQTT 3.1.1
|
connOpts.set_mqtt_version(MQTTVERSION_3_1_1);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
std::cout << "Verbinden met broker..." << std::endl;
|
// Try to connect to the broker and wait until successful.
|
||||||
client.connect(connOpts)->wait();
|
std::cout << "Connecting to broker..." << std::endl;
|
||||||
std::cout << "Verbonden!" << std::endl;
|
client.connect(connOpts)->wait(); // Connect with the provided options
|
||||||
|
std::cout << "Connected!" << std::endl;
|
||||||
|
|
||||||
std::cout << "Abonneren op topic: " << TOPIC << std::endl;
|
// Subscribe to the specified topic and wait for confirmation.
|
||||||
client.subscribe(TOPIC, 1)->wait();
|
std::cout << "Subscribing to topic: " << TOPIC << std::endl;
|
||||||
|
client.subscribe(TOPIC, 1)->wait(); // Subscribe with QoS level 1
|
||||||
|
|
||||||
// Houd de client draaiende om berichten te blijven ontvangen
|
// Keep the program running to continue receiving messages from the broker.
|
||||||
while (true) {
|
while (true) {
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1)); // Wacht om CPU-gebruik te verminderen
|
std::this_thread::sleep_for(std::chrono::seconds(1)); // Sleep to reduce CPU usage
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (const mqtt::exception &exc) {
|
} catch (const mqtt::exception &exc) {
|
||||||
std::cerr << "Fout: " << exc.what() << std::endl;
|
// Catch any MQTT exceptions and display the error message.
|
||||||
|
std::cerr << "Error: " << exc.what() << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0; // Return 0 to indicate successful execution
|
||||||
}
|
}
|
||||||
|
@@ -2,24 +2,33 @@ from flask import Flask, request, render_template, jsonify
|
|||||||
import paho.mqtt.client as mqtt
|
import paho.mqtt.client as mqtt
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
# This function gets triggered when it receives a mqtt message
|
|
||||||
|
kobuki_message = "empty"
|
||||||
def on_message(client, userdata, message):
|
def on_message(client, userdata, message):
|
||||||
global kobuki_message #set scope for this variable
|
global kobuki_message #set scope for this variable
|
||||||
kobuki_message = str(message.payload.decode("utf-8"))
|
kobuki_message = str(message.payload.decode("utf-8"))
|
||||||
|
print(kobuki_message)
|
||||||
|
|
||||||
# Create an MQTT client instance
|
# Create an MQTT client instance
|
||||||
mqtt_client = mqtt.Client()
|
mqtt_client = mqtt.Client()
|
||||||
mqtt_client.username_pw_set("ishak", "kobuki")
|
mqtt_client.username_pw_set("server", "serverwachtwoordofzo")
|
||||||
mqtt_client.connect("145.92.224.21", 1883, 60)
|
mqtt_client.connect("localhost", 80, 60)
|
||||||
mqtt_client.loop_start()
|
mqtt_client.loop_start()
|
||||||
mqtt_client.subscribe("kobuki/data")
|
mqtt_client.subscribe("kobuki/data")
|
||||||
mqtt_client.on_message = on_message # this lines needs to be under the function definition otherwise it cant find which function it needs to use
|
mqtt_client.on_message = on_message # this lines needs to be under the function definition otherwise it cant find which function it needs to use
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
@app.route('/', methods=["GET","POST"])
|
|
||||||
def index():
|
def index():
|
||||||
return render_template('index.html')
|
return render_template('index.html')
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/control', methods=["GET","POST"])
|
||||||
|
def control():
|
||||||
|
if request.authorization and request.authorization.username == 'ishak' and request.authorization.password == 'kobuki':
|
||||||
|
return render_template('control.html')
|
||||||
|
else:
|
||||||
|
return ('Unauthorized', 401, {'WWW-Authenticate': 'Basic realm="Login Required"'})
|
||||||
|
|
||||||
@app.route('/move', methods=['POST'])
|
@app.route('/move', methods=['POST'])
|
||||||
def move():
|
def move():
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
@@ -36,8 +45,12 @@ def move():
|
|||||||
def data():
|
def data():
|
||||||
return kobuki_message
|
return kobuki_message
|
||||||
|
|
||||||
|
@app.route('/phpmyadmin/<path:path>')
|
||||||
|
def phpmyadmin_passthrough(path):
|
||||||
|
# Laat Apache deze route direct afhandelen
|
||||||
|
return "", 404
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(debug=True)
|
app.run(debug=True, port=5000)
|
||||||
|
BIN
src/Python/flask/web/static/images/logo.png
Normal file
BIN
src/Python/flask/web/static/images/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 200 KiB |
@@ -23,6 +23,22 @@ body {
|
|||||||
right: 0%;
|
right: 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
max-width: 80%;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
border-radius: 50px;
|
||||||
|
align-items: center;
|
||||||
|
margin: 1.5rem auto 0 auto;
|
||||||
|
padding: 0 30px;
|
||||||
|
top: 0%;
|
||||||
|
bottom: auto;
|
||||||
|
left: 0%;
|
||||||
|
right: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
.imgNav {
|
.imgNav {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
@@ -73,6 +89,18 @@ body {
|
|||||||
transition: transform 0.2s ease, background-color 0.2s ease;
|
transition: transform 0.2s ease, background-color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text{
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sectionHeight{
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Direction buttons */
|
/* Direction buttons */
|
||||||
.btn:nth-child(1) {
|
.btn:nth-child(1) {
|
||||||
/* Left */
|
/* Left */
|
||||||
|
73
src/Python/flask/web/static/styleIndex.css
Normal file
73
src/Python/flask/web/static/styleIndex.css
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
background-color: #333;
|
||||||
|
color: #fff;
|
||||||
|
padding: 1rem 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul li {
|
||||||
|
display: inline;
|
||||||
|
margin: 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul li a {
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding: 2rem;
|
||||||
|
margin: 1rem 0;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
section h2 {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
form label {
|
||||||
|
margin: 0.5rem 0 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
form input, form textarea {
|
||||||
|
padding: 0.5rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form button {
|
||||||
|
padding: 0.7rem;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #333;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
form button:hover {
|
||||||
|
background-color: #555;
|
||||||
|
}
|
@@ -8,8 +8,9 @@
|
|||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% include 'navbar.html' %}
|
{% include 'navbar.html' %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
48
src/Python/flask/web/templates/control.html
Normal file
48
src/Python/flask/web/templates/control.html
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{% extends 'base.html' %} {% block head %}
|
||||||
|
<link rel="stylesheet" href="../static/style.css" />
|
||||||
|
{% endblock %} {% block content %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Kobuki</title>
|
||||||
|
<link rel="stylesheet" href="../static/style.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<div class="image-section">
|
||||||
|
<img src="kobuki.jpg" alt="Kobuki Robot" id="robot-image" />
|
||||||
|
</div>
|
||||||
|
<div class="button-section">
|
||||||
|
<form id="form" action="/move" method="post">
|
||||||
|
<button class="btn" name="direction" value="left">←</button>
|
||||||
|
<button class="btn" name="direction" value="up">↑</button>
|
||||||
|
<button class="btn" name="direction" value="right">→</button>
|
||||||
|
<button class="btn" name="direction" value="down">↓</button>
|
||||||
|
<button class="btn stop-button" name="direction" value="stop">
|
||||||
|
Stop
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
<h1>Sensor Data</h1>
|
||||||
|
<div class="data">
|
||||||
|
<table id="sensor-data"> <!-- Do not change -->
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Sensor</th>
|
||||||
|
<th>Value</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!-- Sensor data rows will be inserted here -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../static/script.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{% endblock %}
|
21
src/Python/flask/web/templates/footer.html
Normal file
21
src/Python/flask/web/templates/footer.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Document</title>
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<footer class="footer">
|
||||||
|
<img src="{{url_for('static', filename='images/logo_kobuki.png')}}" alt="logo" class="imgNav" />
|
||||||
|
<h3>© 2024 Kobuki Robot Project. All rights reserved.</h3>
|
||||||
|
<div class="buttonContainer">
|
||||||
|
<a href="{{ url_for('control') }}" target="_blank">
|
||||||
|
<button class="click connectButton">Controller</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -6,43 +6,53 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Kobuki</title>
|
<title>Kobuki Robot Project</title>
|
||||||
<link rel="stylesheet" href="../static/style.css" />
|
<link rel="stylesheet" href="../static/style.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<section class="container sectionHeight">
|
||||||
<div class="image-section">
|
<p class="text">
|
||||||
<img src="kobuki.jpg" alt="Kobuki Robot" id="robot-image" />
|
The Kobuki Robot Project is an innovative initiative aimed at developing
|
||||||
</div>
|
a versatile and intelligent robot platform. Our goal is to create a
|
||||||
<div class="button-section">
|
robot that can navigate autonomously, interact with its environment, and
|
||||||
<form id="form" action="/move" method="post">
|
perform various tasks.
|
||||||
<button class="btn" name="direction" value="left">←</button>
|
</p>
|
||||||
<button class="btn" name="direction" value="up">↑</button>
|
<img src="{{url_for('static', filename='images/logo.png')}}" alt="logo" class="image" />
|
||||||
<button class="btn" name="direction" value="right">→</button>
|
</section>
|
||||||
<button class="btn" name="direction" value="down">↓</button>
|
|
||||||
<button class="btn stop-button" name="direction" value="stop">
|
<section class="container sectionHeight" id="about">
|
||||||
Stop
|
<h2>About the Project</h2>
|
||||||
</button>
|
<p>
|
||||||
</form>
|
This project is a collaborative effort involving engineers, researchers,
|
||||||
</div>
|
and enthusiasts. The Kobuki robot is equipped with various sensors,
|
||||||
</div>
|
including bumpers, cliff sensors, and gyroscopes, to help it navigate
|
||||||
<div class="container">
|
and interact with its surroundings.
|
||||||
<h1>Sensor Data</h1>
|
</p>
|
||||||
<div class="data">
|
<p>Key features of the Kobuki Robot:</p>
|
||||||
<table id="sensor-data-table">
|
<ul>
|
||||||
<thead>
|
<li>Autonomous navigation</li>
|
||||||
<tr>
|
<li>Obstacle detection and avoidance</li>
|
||||||
<th>Sensor</th>
|
<li>Real-time data processing</li>
|
||||||
<th>Value</th>
|
<li>Remote control and monitoring</li>
|
||||||
</tr>
|
</ul>
|
||||||
</thead>
|
</section>
|
||||||
<tbody>
|
|
||||||
<!-- Sensor data rows will be inserted here -->
|
<section class="container" id="contact">
|
||||||
</tbody>
|
<h2>Contact Us</h2>
|
||||||
</table>
|
<form id="contact-form" action="/contact" method="post">
|
||||||
</div>
|
<label for="name">Name:</label>
|
||||||
</div>
|
<input type="text" id="name" name="name" required />
|
||||||
<script src="../static/script.js"></script>
|
<label for="email">Email:</label>
|
||||||
|
<input type="email" id="email" name="email" required />
|
||||||
|
<label for="message">Message:</label>
|
||||||
|
<textarea id="message" name="message" required></textarea>
|
||||||
|
<button type="submit">Send</button>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{% include 'footer.html' %}
|
||||||
|
|
||||||
|
<script src="static/script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -11,13 +11,9 @@
|
|||||||
<img src="{{url_for('static', filename='images/logo_kobuki.png')}}" alt="logo" class="imgNav" />
|
<img src="{{url_for('static', filename='images/logo_kobuki.png')}}" alt="logo" class="imgNav" />
|
||||||
<h3>Kobuki</h3>
|
<h3>Kobuki</h3>
|
||||||
<div class="buttonContainer">
|
<div class="buttonContainer">
|
||||||
<a
|
<a href="{{ url_for('control') }}" target="_blank">
|
||||||
href="https://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-3/vuupoofeehoo27"
|
<button class="click connectButton">Controller</button>
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
<button class="click connectButton">Placeholder</button>
|
|
||||||
</a>
|
</a>
|
||||||
<!-- <a href="./signup.html">sign in</a> -->
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
7
src/Python/wsgi.py
Normal file
7
src/Python/wsgi.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import sys
|
||||||
|
import logging
|
||||||
|
|
||||||
|
logging.basicConfig(stream=sys.stderr)
|
||||||
|
sys.path.insert(0, "/home/ishak/rooziinuubii79/src/Python/flask/web")
|
||||||
|
|
||||||
|
from app import app as application
|
11
teamdocumentatie/Ishak/feedback.md
Normal file
11
teamdocumentatie/Ishak/feedback.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Feedback expert review
|
||||||
|
|
||||||
|
probeer Definition of done zelf te formuleren.
|
||||||
|
beter user stories maken
|
||||||
|
|
||||||
|
# Feedback peer review
|
||||||
|
|
||||||
|
- eventuele coaching op het gebied van technisch en taken
|
||||||
|
- meer duidelijkheid wat wij gaan gebruiken, welke technieken en tools. Hiermee kan je mensen koppelen aan taken zodat iedereen iets heeft gedaan.
|
||||||
|
- meer duidelijkheid van elkaar kwaliteiten en leerdoelen. Hiermee kan je goed inschatten wie wat kan doen en wie wat kan leren.
|
||||||
|
|
42
teamdocumentatie/Ishak/hoofd-deelvraag.md
Normal file
42
teamdocumentatie/Ishak/hoofd-deelvraag.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Hoofd en deelvragen
|
||||||
|
|
||||||
|
**Wat is de aanleiding?**
|
||||||
|
De aanleiding is de de behoefte aan veilige communicatie tussen apparaten. Dit is belangrijk omdat onbeveiligde dataoverdracht kan leiden tot datalekken.
|
||||||
|
|
||||||
|
**wat is het probleem/behoefte en waaruit blijkt dat?**
|
||||||
|
Het probleem is dat data die tussen apparaten wordt verstuurd kwetsbaar kan zijn. Dit blijkt nadat wij te horen hebben gekregen dat er niet goed was omgegaan met communicatie tussen apparaten.
|
||||||
|
|
||||||
|
**Wie heeft het probleem/behoefte?**
|
||||||
|
ons groepje, maar ook bijvoorbeeld grote bedrijven waar het heel belangrijk is dat data veilig wordt verstuurd zonder dat het in de verkeerde handen valt.
|
||||||
|
|
||||||
|
**Wanneer is het probleem/behoefte ontstaan?**
|
||||||
|
Het probleem is ontstaan nadat wij te horen hebben gekregen dat er niet goed was omgegaan met communicatie tussen apparaten.
|
||||||
|
|
||||||
|
**Waarom is het een probleem?**
|
||||||
|
Het is een probleem omdat onbeveiligde communicatie kan leiden tot datalekken waaronder privacy. Hiermee kunnen bedrijven in de problemen komen.
|
||||||
|
|
||||||
|
**Waar doet het probleem/behoefte zich voor (afbakening)?**
|
||||||
|
Het probleem komt voor in verschillende sectoren waar data tussen apparaten wordt verstuurd. Dit kan zijn in de zorg, industrie, op kantoor, maar ook met IoT projecten wat je thuis kan hebben.
|
||||||
|
|
||||||
|
## Hoofdvraag
|
||||||
|
|
||||||
|
Welke communicatieprotocol geeft de mogelijkheid om veilig en betrouwbaar te communiceren tussen IoT apparaten?
|
||||||
|
|
||||||
|
## Deelvragen
|
||||||
|
|
||||||
|
1. Wat houdt veilige en betrouwbare communicatie tussen apparaten in?
|
||||||
|
2. Welke protocollen zijn er om veilig en betrouwbaar te communiceren tussen apparaten?
|
||||||
|
3. Wat zijn de voor- en nadelen van de verschillende protocollen?
|
||||||
|
|
||||||
|
## Bronnen
|
||||||
|
|
||||||
|
- Singh, S., & Jyoti. (2024, June 7). Secure Communications Protocols for IoT networks: a survey. https://journal.ijprse.com/index.php/ijprse/article/view/1082
|
||||||
|
- Nguyen, K. T., Laurent, M., Oualha, N., CEA, & Institut Mines-Telecom. (2015). Survey on secure communication protocols for the Internet of Things. In Ad Hoc Networks (Vol. 32, pp. 17–31) [Journal-article]. http://dx.doi.org/10.1016/j.adhoc.2015.01.006
|
||||||
|
- Miorandi, D., Sicari, S., De Pellegrini, F., & Imrich Chlamtac. (2012). Internet of things: Vision, applications and research challenges. In Ad Hoc Networks (Vol. 10, pp. 1497–1516) [Journal-article]. Elsevier B.V. http://dx.doi.org/10.1016/j.adhoc.2012.02.016
|
||||||
|
- Christiano, P. (2023, November 5). Top 9 IoT communication protocols & their features in 2024: An In-Depth guide - ExpertBeacon. Expertbeacon. https://expertbeacon.com/iot-communication-protocol/
|
||||||
|
- Yugha, R., & Chithra, S. (2020). A survey on technologies and security protocols: Reference for future generation IoT. Journal of Network and Computer Applications, 169, 102763. https://doi.org/10.1016/j.jnca.2020.102763
|
||||||
|
- De Mendizábal, I. (2022, June 16). IoT Communication Protocols—IoT Data Protocols. Technical Articles. https://www.allaboutcircuits.com/technical-articles/internet-of-things-communication-protocols-iot-data-protocols/
|
||||||
|
- IoT-technologieën en -protocollen | Microsoft Azure. (n.d.). https://azure.microsoft.com/nl-nl/solutions/iot/iot-technology-protocols
|
||||||
|
- Het IoT verbinden: wat is MQTT en waarin verschilt het van CoAP? (n.d.). https://www.onlogic.com/nl/blog/het-iot-verbinden-wat-is-mqtt-en-waarin-verschilt-het-van-coap/
|
||||||
|
- Nader, K. (2023, October 30). Wat zijn de voordelen van het gebruik van WebSocket voor IoT-communicatie? AppMaster - Ultimate All-in No-code Platform. https://appmaster.io/nl/blog/websocket-voor-iot-communicatie
|
||||||
|
- Sidna, J., Amine, B., Abdallah, N., & Alami, H. E. (2020). Analysis and evaluation of communication Protocols for IoT Applications. Karbala International Journal of Modern Science. https://doi.org/10.1145/3419604.3419754
|
BIN
teamdocumentatie/Ishak/hoofd-deelvraag.pdf
Normal file
BIN
teamdocumentatie/Ishak/hoofd-deelvraag.pdf
Normal file
Binary file not shown.
11
teamdocumentatie/Ishak/steekwoorden.md
Normal file
11
teamdocumentatie/Ishak/steekwoorden.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# kobuki
|
||||||
|
# last sprint i have been busy with the website
|
||||||
|
# my job was to make an controller on the website for the kobuki
|
||||||
|
# so that we can control the kobuki with the website
|
||||||
|
# i did this using a protocol called MQTT
|
||||||
|
# mqtt is a protocol that is used to send messages between devices
|
||||||
|
# this is different from the normal protocol that i used last year
|
||||||
|
# it was a bit difficult to get the kobuki to work with the website
|
||||||
|
# next sprint i will be working on a sensor
|
||||||
|
# i will do some research on the different sensors that we can use
|
||||||
|
#
|
Reference in New Issue
Block a user