-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: extract and publish realsense Sensor data #654
base: main
Are you sure you want to change the base?
Conversation
added code to pull data from RealSense
boiler plate code for publishing sensor info
pushing to InfluxDb for Graphana
Develop hemanth
pushing to microservice
We developed a Feature to address the intermediate issue #538. PS :- Mentioning it here since we unable to tag the labels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sakethr16 @hemanth-vs @Hemanth-byte I left comments in the code.
One comment on the PR title, can you change it to follow the git conventional commit format -
https://github.com/intel-retail/automated-self-checkout/blob/main/CONTRIBUTING.md
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
type here should be feat, instead of issue #538
Data is being extracted from RealSensor and is getting published to Multiple SOurces such as Kafka, grafana or other microServices
dquote> dquote> Data is being extracted from RealSensor and is getting published to Multiple SOurces such as Kafka, grafana or other microServices dquote> dquote> dquote>
@NeethuES-intel We are not able to modify the PR Title, do you want us to raise another fresh PR? |
@sakethr16 ok, done. |
## How to Run | ||
|
||
### 1. Build the Docker Image | ||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you create a Makefile under src/RealSenseExtractor and add these as simple make commands eg -
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a Makefile.
## Configuration | ||
|
||
Before running the service, ensure that the appropriate values are set in the `RealSenseConfig.json` file. This configuration file defines the necessary details for: | ||
- RealSense camera settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can I run your code without a realsense camera ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No @NeethuES-intel , We cant run with realsense camera
src/RealSenseExtractor/Dockerfile
Outdated
FROM python:3.9-slim | ||
|
||
# Set environment variables to ensure Python runs in non-buffered and UTF-8 mode | ||
ENV PYTHONDONTWRITEBYTECODE 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the docker file.
from datetime import datetime | ||
import json | ||
|
||
class GraphanaPublisher(Publisher): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the spelling of Grafana in the file names, files, etc where applicable.
class GraphanaPublisher(Publisher): | |
class GrafanaPublisher(Publisher): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the file names.
@@ -0,0 +1,20 @@ | |||
{ | |||
"Graphana" : { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you configure this to use a local instance of grafana/influxdb - can set everything up in a docker compose file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sakethr16 @Hemanth-byte @hemanth-vs I don't have a realsense camera to test. However I tried to run unit tests with make test
but getting error. Not seeing the dashboard on grafana after running make up
and I don't see any data coming through the grafana topics when I subscribe using an mqtt client.
PR Checklist
What are you changing?
We worked on a feature that extracts height, weight and depth data from RealSense Sensor. It publishes the data to Kafka, Grafana, Microservice. The data can be extracted using 'push' of the publishers as mentioned in the main file 'pollRealSenseSensor.py'.
Issue this PR will close
close: #538
Anything the reviewer should know when reviewing this PR?
We utilized Docker image. All the requirements and information pertaining to this issue and docker are mentioned in the RealSenseReadme.md.
Test Instructions if applicable
All the required instructions are outlined in the RealSenseReadme.md which is present in the sub directory '/src/RealSenseExtractor'.
If the there are associated PRs in other repositories, please link them here (i.e. intel-retail/automated-self-checkout )