b4mad / racing Goto Github PK
View Code? Open in Web Editor NEWCommunity-driven SimRacing data collection and analysis
Home Page: https://b4mad.racing
License: GNU General Public License v3.0
Community-driven SimRacing data collection and analysis
Home Page: https://b4mad.racing
License: GNU General Public License v3.0
... to docker-compose stack
HI Guys:
Would be useful to have the ability to generate private CSVs for our specific notes, as well as those that are shared with the community, that will allow us to customize the info coming from our pitcrew to suit our own driving style
upgrade mosquitto image used to the latest version, ensure dyn sec plugin is available
/kind feature
/priority critical-urgent
/assign goern
https://discord.com/channels/850841654327640074/914445482154147860/1050708958836424715
[10:42 AM]Matt Webb: hi all. stumbled into this but keen to try make it work. alas after following the install instructions I get this:
[10:43 AM]Matt Webb: Event Mqtt threw exception The character '#' is not allowed in topics. stack at MQTTnet.Protocol.MqttTopicValidator.ThrowIfInvalid(String topic)
at MQTTnet.Protocol.MqttTopicValidator.ThrowIfInvalid(MqttApplicationMessage applicationMessage)
at MQTTnet.Client.MqttClient.PublishAsync(MqttApplicationMessage applicationMessage, CancellationToken cancellationToken)
at CrewChiefV4.Events.Mqtt.triggerInternal(GameStateData previousGameState, GameStateData currentGameState) in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\Events\Mqtt.cs:line 253
at CrewChiefV4.CrewChief.triggerEvent(String eventName, AbstractEvent abstractEvent, GameStateData previousGameState, GameStateData currentGameState) in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\CrewChief.cs:line 1128
09:40:16.990 : This is the first time this event has failed in this session
[10:43 AM]goern.b4mad.eth: Hi Matt 👍
[10:43 AM]Matt Webb: hiya
[10:44 AM]goern.b4mad.eth: I assume it’s all the latest and greatest crew chief versions?
[10:44 AM]Matt Webb: yes sir
[10:44 AM]Matt Webb: 4.16.3.4
[10:44 AM]goern.b4mad.eth: And did you follow the install like yesterday?! I think there was an update to the config..
[10:44 AM]Matt Webb: about 15 mins ago
[10:45 AM]goern.b4mad.eth: Cool!
[10:45 AM]Matt Webb: i did over right the mqtt json so cant go back now ;O)
[10:45 AM]Matt Webb: overwrite...
[10:45 AM]goern.b4mad.eth: Does your driver name contain a # ?
[10:45 AM]Matt Webb: nope. Mattw
[10:46 AM]Matt Webb: ah.....i think I know whats happened. I put Mattw in the mqtt driver name...but
[10:46 AM]goern.b4mad.eth: Strange error that is, let’s ping @durandom he wrote that part
[10:46 AM]Matt Webb: I did a windows refresh yesterday and reinstalled CC...I havent put my name in the actual name bit!! bloody stupid sorry
[10:47 AM]goern.b4mad.eth: Null problemo, that’s what i do all the time 😁
[10:48 AM]Matt Webb: trying again. Will report back. Thank you
[10:48 AM]goern.b4mad.eth: cool! Thanks
[10:48 AM]goern.b4mad.eth: Let’s see what features are missing to make it a good tool for you!
[10:49 AM]Matt Webb: still fails
Event Mqtt has failed 10 times in this session and will be disabled
[10:49 AM]Matt Webb: same # erro
[10:49 AM]Matt Webb: r
[10:50 AM]goern.b4mad.eth: ack, let me check if you cc is working
[10:50 AM]Matt Webb: hang on, restarted and it might be working...doing laps
[10:51 AM]Matt Webb: ah, nope, it connects to mqtt when I load CC, but as soon as I start CC in rf2 mode it gets the error
[10:52 AM]Matt Webb: doesnt happen if I select games Automobilista2 and Raceroom, just rfactor2 64
[10:55 AM]goern.b4mad.eth: ja, I see, for AC 64bit it seems to work
[10:56 AM]Matt Webb: can confirm that works for me also to
/kind bug
/assign @durandom
Let's refactor all the tokens and password and... into a Secret managed by kustomize+argocd, helm values and config files need to use ENV, deployments need to use volume mounted from Secret
according to https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/
Keep the MQTT topic short and concise
Each topic is included in every message in which it is used. Make your topics as short and concise as possible. When it comes to small devices, every byte counts and topic length has a big impact.
I.e. we should only have the userId and sessionId in the topic and move all other tags into the payload data
Some games provide x/y coordinates of the car on the map. This can be used to plot the track. We use this map to split the track into sections. I.e. a connection of corners and straights. See https://github.com/b4mad/racing/blob/main/notebooks/track_sections_from_coordinates.ipynb
Some games, like iRacing, don't provide the x/y coordinates in real-time. But we still get other telemetry, like SteeringAngle and Throttle and Brake input. We could create a similar approach, looking at the SteeringAngle, like already applied in https://github.com/b4mad/racing/blob/main/notebooks/fast_lap_analysis-v2.ipynb
But all these approaches have edge cases and need some tweaking of thresholds.
How about training a deep learning model?
The input features of the model are SteeringAngle, Throttle and Brake. The output is the layout of the track.
Training data can be created from those games that provide x/y coordinates and a collection of tracks with known good layouts. The layouts can be hand tuned.
As a SimHub user I can install a plugin to publish live game data to an MQTT endpoint
In order to avoid saturation of upload bandwidth and improve the compression ratio, we don't want to stream the JSON payloads, but instead, collect samples for a certain period (e.g. 10 seconds), then compress the payload and then publish the payload to the topic (upload).
Use the docker-compose setup to develop locally
Racing teams and individual drivers are able to stream their telemetry data to the platform.
They can visualize the data in existing and customized dashboards and execute functions provided by the data storage engine.
SimHub is able to read telemetry from a multitude of games and unifies the format, it also provides a plugin architecture in C#.
MQTT is a messaging standard. Telegraf can interface to the MQTT broker and send the data into an Influx database, which in turn can be visualized by Grafana dashboards. See b4mad.racing architecture
different games, different tracknames.
CrewChief already has a good db: https://gitlab.com/mr_belowski/CrewChiefV4/-/blob/master/CrewChiefV4/trackLandmarksData.json
Tracks:
Turns
clicking a user on the "User" dashboard
always leads to "Jim Britton" user dashboard.
/kind bug
/assign @durandom
reported-by: Wayne Whitmore#4750
seeAlso: https://discord.com/channels/850841654327640074/914445482154147860/1025940719002718218
using a47b45a pitcrew threw an exception:
DEBUG:root:new session crewchief/goern/1666692415/iRacing/summit summit raceway/Ferrari 488 GT3 Evo 2020/LonePractice
Traceback (most recent call last):
File "/home/goern/Source/github.com/b4mad/racing/pitcrew/./app.py", line 23, in <module>
mqtt.run()
File "/home/goern/Source/github.com/b4mad/racing/pitcrew/mqtt.py", line 102, in run
self.mqttc.loop_forever()
File "/home/goern/.local/share/virtualenvs/pitcrew-wsNBG5uX/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "/home/goern/.local/share/virtualenvs/pitcrew-wsNBG5uX/lib/python3.9/site-packages/paho/mqtt/client.py", line 1164, in _loop
rc = self.loop_read()
File "/home/goern/.local/share/virtualenvs/pitcrew-wsNBG5uX/lib/python3.9/site-packages/paho/mqtt/client.py", line 1556, in loop_read
rc = self._packet_read()
File "/home/goern/.local/share/virtualenvs/pitcrew-wsNBG5uX/lib/python3.9/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
rc = self._packet_handle()
File "/home/goern/.local/share/virtualenvs/pitcrew-wsNBG5uX/lib/python3.9/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
return self._handle_publish()
File "/home/goern/.local/share/virtualenvs/pitcrew-wsNBG5uX/lib/python3.9/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
self._handle_on_message(message)
File "/home/goern/.local/share/virtualenvs/pitcrew-wsNBG5uX/lib/python3.9/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
on_message(self, self._userdata, message)
File "/home/goern/Source/github.com/b4mad/racing/pitcrew/mqtt.py", line 74, in on_message
response = self.coach.get_response(meters)
File "/home/goern/Source/github.com/b4mad/racing/pitcrew/coach.py", line 39, in get_response
if self.msg['corner'] != brakepoint['corner']:
TypeError: 'NoneType' object is not subscriptable
DEBUG:root:loading brakepoints from /home/goern/Source/github.com/b4mad/racing/pitcrew/Ferrari 488 GT3 Evo 2020-summit summit raceway.csv
is the init container missign two env vars?
/kind question
/kind bug
/priority critical-urgent
/assign durandom
Nikki Lauda
Hey, AICoE-CI!
Please build and deliver the following git tag:
Tag: 0.1.1
accessing https://paddock.b4mad.racing/pitcrew/Jim gives a 500
/kind bug
/assign durandom
for the pitcrew to work, we need track information in CVS files, like https://github.com/b4mad/racing/blob/main/pitcrew/Ferrari%20488%20GT3%20Evo%202020-oschersleben%20gp.csv
These are currently built manually
Let's use some data science to create them automatically, maybe like this
Automobilista2, Raceroom & AC64 all start in CC without Mqtt failing. Rfactor2 causing Mqtt to fail with below messages in the console.
10:06:46.843 : Event Mqtt threw exception The character '#' is not allowed in topics. stack at MQTTnet.Protocol.MqttTopicValidator.ThrowIfInvalid(String topic)
at MQTTnet.Protocol.MqttTopicValidator.ThrowIfInvalid(MqttApplicationMessage applicationMessage)
at MQTTnet.Client.MqttClient.PublishAsync(MqttApplicationMessage applicationMessage, CancellationToken cancellationToken)
at CrewChiefV4.Events.Mqtt.triggerInternal(GameStateData previousGameState, GameStateData currentGameState) in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\Events\Mqtt.cs:line 253
at CrewChiefV4.CrewChief.triggerEvent(String eventName, AbstractEvent abstractEvent, GameStateData previousGameState, GameStateData currentGameState) in C:\projects\crewchief_c_sharp\CrewChiefV4\CrewChiefV4\CrewChief.cs:line 1128
10:06:46.843 : This is the first time this event has failed in this session
10:06:46.843 : ********** starting spotter***********
10:06:46.843 : Invoking spotter every 50
10:06:47.228 : There are 1 more events in the queue, playing them...
10:06:47.228 : Playing sounds, events: COMPOUND_smoke_test_spotter
10:06:47.228 : (radio_check_Billy/test)
10:06:47.754 : Event Mqtt has failed 10 times in this session and will be disabled
for some simulators, the car model is not displayed correctly on dashboards, some are shown as "Unknown" and some are shown with their internal names for example al_pontiac_fire68
. Games affected GTR2, ACC, RaceRoom.
/kind bug
convert docker-compose stack to kustomize manifests
Nikki Lauda
this might require preprocessing of the telemetry data as in https://docs.influxdata.com/influxdb/v2.2/process-data/get-started/#process-or-transform-your-data
Some more grafana resources:
Automated version release could not be completed.
Kebechet version manager expects a file with one of the following names: ["setup.py", "__init__.py", "__about__.py", "version.py", "app.py", "wsgi.py", "pyproject.toml"]
to contain the line:
...
version = X.Y.Z (in pyproject.toml project section)
or
__version__ = X.Y.Z (in the rest of the options)
...
where X.Y.Z
is the current semantic version. To fix this issue, add this line to one of these files. If none of these
files exist create one somewhere in your repository.
Related: #171
it’s the talking comma correct?
@durandom @taholmes160
Hey, AICoE-CI!
Please build and deliver the following git tag:
Tag: v0.1.1
+ export 'GIT_SSH_COMMAND=ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
+ GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
+ git clone [email protected]:b4mad/racing /workspace/configrepo
Cloning into '/workspace/configrepo'...
Warning: Identity file /opt/app-root/src/.ssh/id_rsa not accessible: No such file or directory.
Warning: Permanently added 'github.com,140.82.112.3' (ECDSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
/kind bug
/priority critical-urgent
@harshad16 I think sesheta has all the required perms to clone the repo. could you have a look if you got a few free cycles?
Would be nice to have the ability to drop markers in the telemetry, so that we can add comments to the csv file -- like "Get to the left here" or "downshift to second" etc
Hey, Kebechet!
Create a new patch release, please.
for tag v0.1.1. the build failed, see https://tekton.operate-first.cloud/#/namespaces/opf-ci-pipelines/pipelineruns/racing-paddock-65a091?pipelineTask=overlay-release-run&step=generate
+ '[' Containerfile == Dockerfile ']'
+ '[' -z '' ']'
+ /usr/local/bin/s2i build . --env IMAGE_NAME=quay.io/b4mad/paddock --env IMAGE_TAG=v0.1.1 --env THAMOS_RUNTIME_ENVIRONMENT=paddock --env THOTH_ADVISE=0 --env THOTH_ERROR_FALLBACK=1 --env THOTH_DRY_RUN=1 --env THAMOS_DEBUG=0 --env THAMOS_VERBOSE=1 --env THOTH_PROVENANCE_CHECK=0 --env GIT_REPO_NAME=racing --loglevel=0 --as-dockerfile /gen-source/Containerfile
ERROR: Required value not specified for "builderImage"
/kind bug
/priority important-soon
@harshad16 if you got some 15min to share, I would be happy if you can take a look at
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.