Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f9e1ae0
Merge pull request #73 from SEAME-pt/dev
Rui-Pedro-Pires Feb 24, 2025
7f85fe7
Add Dockerfiles and deployment script for Raspberry Pi cross-compilation
Rui-Pedro-Pires Feb 24, 2025
6af4c66
Add InstrumentCluster assets, UI components, and configuration files
Rui-Pedro-Pires Feb 24, 2025
f73505d
Update include directories in CMakeLists for HandCluster and Instrume…
Rui-Pedro-Pires Feb 24, 2025
f527373
reorganizing folders: adding HandCluster
ziliolu Feb 24, 2025
7cd3f84
Template editions
ziliolu Feb 24, 2025
1fb354b
Remove obsolete documentation and guidelines files
Rui-Pedro-Pires Feb 27, 2025
6625227
Refactor light visibility bindings in HandCluster and InstrumentClust…
Rui-Pedro-Pires Mar 3, 2025
b734fe7
Add Zenoh configuration files and enhance deployment script for Raspb…
Rui-Pedro-Pires Mar 3, 2025
4913db7
lines first basic definition in QT
ziliolu Mar 20, 2025
15e97da
fix in subscribers: right and left separated
ziliolu Mar 21, 2025
e272db9
Remove obsolete HandCluster build files and update Dockerfile for dep…
ziliolu Mar 27, 2025
dd0df0f
Add autogenerated CMake files and update progress markers for HandClu…
ziliolu Mar 31, 2025
c167e4a
Update InstrumentCluster to use QVariantMap for lane coefficients and…
ziliolu Apr 8, 2025
65ec5f5
Add ObjectDetector QML component and update deployment script for Ras…
ziliolu Apr 8, 2025
1a8cc61
Refactor HandCluster publisher and UI: rename lanes_publisher to obje…
ziliolu Apr 10, 2025
64b28c8
Remove obsolete CMake files and update progress markers for HandClust…
ziliolu Apr 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/ISSUE_TEMPLATE/bug-report.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/epic-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ body:
validations:
required: true

- type: textarea
id: related_epics
attributes:
label: Related Epics
description: List any related epics if applicable. Add each related epic as a link or reference number on a new line.
placeholder: |
- [ ] #
validations:
required: false

- type: markdown
attributes:
value: |
Expand Down
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/external-contribution-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "Bug report \U0001F41E"
about: Create a bug report
labels: bug

---

## Describe the bug
A clear and concise description of what the bug is.

### Steps to reproduce
Steps to reproduce the behavior.

### Expected behavior
A clear and concise description of what you expected to happen.

### Environment
- OS: [e.g. Arch Linux]
- Other details that you think may affect.

### Additional context
Add any other context about the problem here.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/external-contribution-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "Feature request \U0001F680"
about: Suggest an idea
labels: enhancement

---

## Summary
Brief explanation of the feature.

### Basic example
Include a basic example or links here.

### Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?
21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/feature-request.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/story-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ body:
validations:
required: true

- type: textarea
id: epic_reference
attributes:
label: Epic Reference
description: Link to the associated Epic that this story belongs to.
placeholder: |
#
validations:
required: false

- type: dropdown
id: priority
attributes:
Expand Down
11 changes: 0 additions & 11 deletions .github/ISSUE_TEMPLATE/task-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ body:
validations:
required: true


- type: textarea
id: story_reference
attributes:
label: Story Reference
description: Link to the associated Story.
placeholder: |
#
validations:
required: false

- type: markdown
attributes:
value: |
Expand Down
33 changes: 4 additions & 29 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
# Pull Request Overview
<!--
Please refer to the Copilot PR overview. Create this PR using the Copilot function.
Provide any additional field related to the pull request that you might find useful to describe :)
-->

## Description
<!-- Provide a concise summary of the changes introduced in this PR, focusing on the purpose and outcomes. -->

## Type of Change
- [ ] 🐞 Bugfix (fixes an issue)
- [ ] ✨ New Feature (introduces new functionality)
- [ ] 📄 Documentation (adds or updates documentation)
- [ ] 🔧 Configuration (adjusts project configuration or tooling)

## Checklist
- [ ] Code is thoroughly tested and operates as expected
- [ ] Documentation has been updated to reflect these changes (if applicable)
- [ ] No breaking changes introduced

## Related Issues
<!-- Link any relevant issues or tickets here, e.g., "Closes #123" or "Related to #456". -->

## Additional Context
<!-- Provide any additional context, screenshots, or details that reviewers may find helpful. -->

---

### Reviewer Checklist
- [ ] Code follows project style and naming conventions.
- [ ] No functionality is broken; code is well-tested.
- [ ] Documentation and comments are clear.
- [ ] No security vulnerabilities or performance issues are introduced.
<!-- Provide any additional field related to the pull request that you might find useful to describe. -->
34 changes: 25 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,33 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

include_directories(include)

# include_directories(Clusters/include)
include_directories(Clusters/HandCluster/include)
# Add Resource File (QML and Other Resources)
qt_add_resources(QT_RESOURCES ./ui/resources.qrc)
# qt_add_resources(QT_RESOURCES_ICA ./Clusters/InstrumentCluster/ui/resources.qrc)
qt_add_resources(QT_RESOURCES_HCA ./Clusters/HandCluster/ui/resources.qrc)

# Define Executable Target
add_executable(InstrumentClusterApp
${QT_RESOURCES}
./src/main.cpp
./src/InstrumentCluster.cpp
./include/InstrumentCluster.hpp
# add_executable(InstrumentClusterApp
# ${QT_RESOURCES_ICA}
# ./Clusters/InstrumentCluster/src/main.cpp
# ./Clusters/InstrumentCluster/src/InstrumentCluster.cpp
# ./Clusters/InstrumentCluster/include/InstrumentCluster.hpp
# )

add_executable(HandClusterB
${QT_RESOURCES_HCA}
./Clusters/HandCluster/src/main.cpp
./Clusters/HandCluster/src/InstrumentCluster.cpp
./Clusters/HandCluster/include/InstrumentCluster.hpp
)

add_executable(MiddleWareApp
./MiddleWare/src/main.cpp
)

target_link_libraries(InstrumentClusterApp zenohcxx::zenohc -lm -ldl Qt6::Core Qt6::DBus Qt6::Quick)
# target_link_libraries(InstrumentClusterApp zenohcxx::zenohc -lm -ldl Qt6::Core Qt6::DBus Qt6::Quick)

target_link_libraries(HandClusterB zenohcxx::zenohc -lm -ldl Qt6::Core Qt6::DBus Qt6::Quick)

target_link_libraries(MiddleWareApp PRIVATE zenohcxx::zenohc)
Binary file added Clusters/HandCluster/assets/fonts/electrolize.ttf
Binary file not shown.
Binary file added Clusters/HandCluster/assets/fonts/orbitron.ttf
Binary file not shown.
Binary file added Clusters/HandCluster/assets/fonts/tektur.ttf
Binary file not shown.
Binary file added Clusters/HandCluster/assets/icons/raio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Clusters/HandCluster/assets/images/car.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
161 changes: 161 additions & 0 deletions Clusters/HandCluster/include/InstrumentCluster.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
#ifndef INSTRUMENTCLUSTER_HPP
#define INSTRUMENTCLUSTER_HPP

#include <QObject>
#include <iostream>
#include <memory>
#include "zenoh.hxx"
#include <QVariant>
#include <QPoint>
#include <QVariantList>
#include <QJsonDocument>
#include <QJsonParseError>
#include <QDebug>
#include <QJsonArray>
#include <QJsonObject>

using namespace zenoh;

class InstrumentCluster : public QObject
{
Q_OBJECT
Q_PROPERTY(int speed READ getSpeed WRITE setSpeed NOTIFY speedChanged)
Q_PROPERTY(bool rightBlinker READ getRightBlinker WRITE setRightBlinker
NOTIFY rightBlinkerChanged)
Q_PROPERTY(bool leftBlinker READ getLeftBlinker WRITE setLeftBlinker NOTIFY
leftBlinkerChanged)
Q_PROPERTY(
bool lowBeam READ getLowBeam WRITE setLowBeam NOTIFY lowBeamChanged)
Q_PROPERTY(
bool highBeam READ getHighBeam WRITE setHighBeam NOTIFY highBeamChanged)
Q_PROPERTY(bool frontFogLight READ getFrontFogLight WRITE setFrontFogLight
NOTIFY frontFogLightChanged)
Q_PROPERTY(bool rearFogLight READ getRearFogLight WRITE setRearFogLight
NOTIFY rearFogLightChanged)
Q_PROPERTY(bool hazardLight READ getHazardLight WRITE setHazardLight NOTIFY
hazardLightChanged)
Q_PROPERTY(bool parkingLight READ getParkingLight WRITE setParkingLight
NOTIFY parkingLightChanged)
Q_PROPERTY(int percentage READ getPercentage WRITE setPercentage NOTIFY
percentageChanged)
Q_PROPERTY(
int autonomy READ getAutonomy WRITE setAutonomy NOTIFY autonomyChanged)
Q_PROPERTY(int gear READ getGear WRITE setGear NOTIFY gearChanged)
Q_PROPERTY(QVariantMap leftLaneCoefs READ getLeftLaneCoefs WRITE setLeftLaneCoefs NOTIFY leftLaneChanged)
Q_PROPERTY(QVariantMap rightLaneCoefs READ getRightLaneCoefs WRITE setRightLaneCoefs NOTIFY rightLaneChanged)
Q_PROPERTY(QVariantList detectedObjects READ getDetectedObjects NOTIFY detectedObjectsUpdated)


private:
int m_speed;
bool rightBlinker{false};
bool leftBlinker{false};
bool lowBeam{false};
bool highBeam{false};
bool frontFogLight{false};
bool rearFogLight{false};
bool hazardLight{false};
bool parkingLight{false};
int percentage;
int autonomy;
int gear;

QVariantMap m_leftLaneCoefs;
QVariantMap m_rightLaneCoefs;
QVariantList m_detectedObjects;

std::unique_ptr<zenoh::Session> session;
std::optional<zenoh::Subscriber<void>> speed_subscriber;
std::optional<zenoh::Subscriber<void>> beamLow_subscriber;
std::optional<zenoh::Subscriber<void>> beamHigh_subscriber;
std::optional<zenoh::Subscriber<void>> running_subscriber;
std::optional<zenoh::Subscriber<void>> parking_subscriber;
std::optional<zenoh::Subscriber<void>> fogRear_subscriber;
std::optional<zenoh::Subscriber<void>> fogFront_subscriber;
std::optional<zenoh::Subscriber<void>> brake_subscriber;
std::optional<zenoh::Subscriber<void>> hazard_subscriber;
std::optional<zenoh::Subscriber<void>> directionIndicatorLeft_subscriber;
std::optional<zenoh::Subscriber<void>> directionIndicatorRight_subscriber;
std::optional<zenoh::Subscriber<void>> stateOfCharge_subscriber;
std::optional<zenoh::Subscriber<void>> maxVoltage_subscriber;
std::optional<zenoh::Subscriber<void>> currentVoltage_subscriber;
std::optional<zenoh::Subscriber<void>> currentCurrent_subscriber;
std::optional<zenoh::Subscriber<void>> currentPower_subscriber;
std::optional<zenoh::Subscriber<void>> currentGear_subscriber;
std::optional<zenoh::Subscriber<void>> leftLane_subscriber;
std::optional<zenoh::Subscriber<void>> rightLane_subscriber;
std::optional<zenoh::Subscriber<void>> object_subscriber;

public:
explicit InstrumentCluster(QObject* parent = nullptr);
explicit InstrumentCluster(const std::string& configFile,
QObject* parent = nullptr);
~InstrumentCluster();

QVariantList getDetectedObjects() const;

int getSpeed() const;
void setSpeed(int speed);

bool getRightBlinker() const;
void setRightBlinker(bool state);

bool getLeftBlinker() const;
void setLeftBlinker(bool state);

bool getLowBeam() const;
void setLowBeam(bool state);

bool getHighBeam() const;
void setHighBeam(bool state);

bool getFrontFogLight() const;
void setFrontFogLight(bool state);

bool getRearFogLight() const;
void setRearFogLight(bool state);

bool getHazardLight() const;
void setHazardLight(bool state);

bool getParkingLight() const;
void setParkingLight(bool state);

int getPercentage() const;
void setPercentage(int value);

int getAutonomy() const;
void setAutonomy(int value);

int getGear() const;
void setGear(int value);

QVariantMap getLeftLaneCoefs() const;
void setLeftLaneCoefs(const QVariantMap& coefs);

QVariantMap getRightLaneCoefs() const;
void setRightLaneCoefs(const QVariantMap& coefs);

private:
void setupSubscriptions();
void parseLaneData(const std::string& laneData, const std::string& laneType);
void parseObjectData(const std::string& objectData);
signals:
void speedChanged(int speed);
void rightBlinkerChanged(bool state);
void leftBlinkerChanged(bool state);
void lowBeamChanged(bool state);
void highBeamChanged(bool state);
void frontFogLightChanged(bool state);
void rearFogLightChanged(bool state);
void hazardLightChanged(bool state);
void parkingLightChanged(bool state);
void percentageChanged(int value);
void autonomyChanged(int value);
void gearChanged(int gear);
void leftLaneChanged(const QVariantMap& leftLaneCoefs);
void rightLaneChanged(const QVariantMap& rightLaneCoefs);
void detectedObjectsUpdated(const QVariantList& objects);
};

#endif // INSTRUMENTCLUSTER_HPP
Loading
Loading