Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Introducing eCAL Feeder for KUKSA.val Integration #161

Merged
merged 18 commits into from
Feb 22, 2024
Merged

Introducing eCAL Feeder for KUKSA.val Integration #161

merged 18 commits into from
Feb 22, 2024

Conversation

lalywr2000
Copy link
Contributor

Background

This pull request contains features implemented as part of the 2023 Eclipse SDV Hackathon Challenge.

Description

This pull request introduces a new utilization example for KUKSA.val through the implementation of the eCAL Feeder. The primary objective of this implementation is to facilitate the input of data received via eCAL into the KUKSA.val databroker. The communication between eCAL and KUKSA.val is established through protobuf-formatted topics, utilizing the VSS (Vehicle Signal Specification) description and data structure outlined in this format. The data is seamlessly provided to the KUKSA.val databroker via the kuksa_client.

About eclipse eCAL

@lukasmittag
Copy link
Contributor

Hey @lalywr2000, thanks for the Pull Request. In order to get the CI running you need to create an eclipse account https://accounts.eclipse.org/user/register and sign the eclipse eca https://www.eclipse.org/legal/ECA.php https://www.eclipse.org/legal/ecafaq.php

@lalywr2000
Copy link
Contributor Author

Thanks for the instructions. @lukasmittag Now I have thet ECA Validation.

@lukasmittag
Copy link
Contributor

Hey @lalywr2000, I see CI is failing due to no SPDX header in the proto file can you fix this?

@lalywr2000
Copy link
Contributor Author

@lukasmittag I just added license to the proto file. But now, protobuf-compiler cannot compile this proto file because line syntax = "proto3"; has to appear first. What should I do in this case? Is there a way CI ignore checking certain files? or should I remove this test example?

@lukasmittag
Copy link
Contributor

@lukasmittag I just added license to the proto file. But now, protobuf-compiler cannot compile this proto file because line syntax = "proto3"; has to appear first. What should I do in this case? Is there a way CI ignore checking certain files? or should I remove this test example?

Yes, you need to use other style for commenting in these files. E.g.

/********************************************************************************
 * Copyright (c) 2022 Contributors to the Eclipse Foundation
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Apache License 2.0 which is available at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * SPDX-License-Identifier: Apache-2.0
 ********************************************************************************/

try:
protobuf_message.data_int = int(data)
except ValueError:
protobuf_message.data_float = float(data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if it's a string/bool etc.?

message VssData
{
string description = 1;
int32 data_int = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't you leverage the structure of https://github.com/eclipse/kuksa.val/blob/master/proto/kuksa/val/v1/types.proto so for example use Datapoint etc. directly and then you not need to handle that much for float/bool/string etc.

@lalywr2000
Copy link
Contributor Author

@lukasmittag To leverage the structure of 'types.proto' effectively, I understood that I should use 'kuksa_client.grpc' library. However, I encountered difficulties in using it directly for topic communication in eCAL.

Therefore, the current completed code looks like this. A custom-made proto structure based on 'types.proto' is utilized in communication between eCAL. And for writing data to the databroker, 'kuksa_client.grpc' is used normally.

@SebastianSchildt
Copy link
Contributor

Some Linter failures, you may want to check the notes on pre-commit https://github.com/eclipse/kuksa.val.feeders#pre-commit-set-up for a way to check this locally already. It is annoying the first we times it bites you, but then it becomes natural 🚀

@lalywr2000
Copy link
Contributor Author

@SebastianSchildt Thank you. Finished installing pre-commit and solved every issues locally.

Copy link
Contributor

@SebastianSchildt SebastianSchildt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for the contribution. Sorry this took far too long, first forgot it, then could not find a x64 machine which ecal seems to require

Anyway: Followed the steps in Readme and "works as advertised", checked reception of data with kusksa-client

@erikbosch I think for stuff like this,we really need an "experiments"/"incubation" repo when migrating: We want it, it is cool, but currently is PoC level: Useful but only time will tell it will become "first class provider" such as can.

@SebastianSchildt SebastianSchildt merged commit e31268c into eclipse-kuksa:main Feb 22, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants