Coder Social home page Coder Social logo

gotzl / acctelemetry Goto Github PK

View Code? Open in Web Editor NEW
36.0 6.0 11.0 140 KB

Display telemetry data recorded by Assetto Corsa Competizione

License: GNU General Public License v3.0

Python 98.67% Dockerfile 0.70% Shell 0.63%
assetto-corsa-competizione telemetry motec assetto-corsa acti

acctelemetry's Introduction

An application to display telemetry data recorded by Assetto Corsa Competizione.

It is build around bokeh and displays various figures that are inspired by the ACC MoTec i2 workspace. See also this article.

The folder for the telemetry files is set via an env variable. All ld files in that folder are listed in a table, split up lap-by-lap. One or more laps can be selected and the data is displayed in the various tabs after hitting the 'Load' button.

Dependencies

pip3 install -r requirements.txt

After cloning the repo, also checkout the submodules with git submodule update --init.

Usage

export TELEMETRY_FOLDER=='/../Documents/Assetto Corsa Competizione/MoTeC'
bokeh serve --show .

There is also a docker image

docker build -t acctelemetry .
docker run --name acctelemetry -p 5100:5100 -e ORIGIN=www.example.com:5100 -d --rm acctelemetry

acctelemetry's People

Contributors

dependabot[bot] avatar gotzl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

acctelemetry's Issues

Not Receiving Telemetry Data

I'm having some trouble getting this to work.

I had to force certain versions of the dependencies, that wasn't much of an issue.

It could be that I'm running AC and not ACC, I wanted to atleast get something to work, they use the same file names, but the structures are different.

2022-11-15 09:28:52,905 error handling message
message: Message 'PATCH-DOC' content: {'events': [{'kind': 'MessageSent', 'msg_type': 'bokeh_event', 'msg_data': {'event_name': 'button_click', 'event_values': {}}}], 'references': []}
error: KeyError('lap')
Traceback (most recent call last):
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/server/protocol_handler.py", line 90, in handle
work = await handler(message, connection)
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/server/session.py", line 67, in _needs_document_lock_wrapper
result = func(self, *args, **kwargs)
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/server/session.py", line 261, in _handle_patch
message.apply_to_document(self.document, self)
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/protocol/messages/patch_doc.py", line 100, in apply_to_document
doc._with_self_as_curdoc(lambda: doc.apply_json_patch(self.content, setter))
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/document/document.py", line 1150, in _with_self_as_curdoc
return f()
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/protocol/messages/patch_doc.py", line 100, in
doc._with_self_as_curdoc(lambda: doc.apply_json_patch(self.content, setter))
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/document/document.py", line 398, in apply_json_patch
self._trigger_on_message(event_json["msg_type"], event_json["msg_data"])
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/document/document.py", line 687, in _trigger_on_message
cb(msg_data)
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/document/document.py", line 354, in apply_json_event
model._trigger_event(event)
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/util/callback_manager.py", line 85, in _trigger_event
self._document._with_self_as_curdoc(invoke)
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/document/document.py", line 1150, in _with_self_as_curdoc
return f()
File "/home/racedev/.local/lib/python3.10/site-packages/bokeh/util/callback_manager.py", line 72, in invoke
callback()
File "/home/racedev/git/acctelemetry/main.py", line 25, in callback
lap = int(filter_source.data['lap'][idx])
KeyError: 'lap'

Docker image will display a blank page

Don't hate us - Windows users ;-)
I have bulit the image - OK.
I have run it with docker run --name acctelemetry -p 5100:5100 -e ORIGIN=localhost:5100 -d --rm acctelemetry - OK.

Listing containers output is a bit strage (note servier ip):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bcd356da5c06 acctelemetry "./entrypoint.sh" 7 seconds ago Up 6 seconds 0.0.0.0:5100->5100/tcp acctelemetry

Browser redirects from http://localhost:5100 to http://localhost:5100/acctelemetry - so the server is there and running.
But the page is blank.

Source code of the blank page shows some code with this seems to be the key:
console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing");

lap sectors time

Hi, thanks for sharing this project.

I was wondering if there is a way to extract sector lap times and not only final lap times.

bokeh application error

Hello , i'm trying to open the telemetry files , without success ..

image

log :

`$ bokeh serve --show acctelemetry.py
2020-04-10 01:30:52,038 Starting Bokeh server version 2.0.1 (running on Tornado 6.0.4)
2020-04-10 01:30:52,039 User authentication hooks NOT provided (default user enabled)
2020-04-10 01:30:52,041 Bokeh app running at: http://localhost:5006/acctelemetry
2020-04-10 01:30:52,041 Starting Bokeh server with process id: 16940
2020-04-10 01:30:53,164 Error running application handler <bokeh.application.handlers.script.ScriptHandler object at 0x000002AF3AAE6280>: cannot import name 'ldparser' from 'ldparser' (unknown location)
File "acctelemetry.py", line 13, in :
from ldparser import ldparser Traceback (most recent call last):
File "c:\users\xspam\appdata\local\programs\python\python38\lib\site-packages\bokeh\application\handlers\code_runner.py", line 197, in run
exec(self._code, module.dict)
File "C:\Users\xSpaM\Desktop\acctelemetry-master\acctelemetry.py", line 13, in
from ldparser import ldparser
ImportError: cannot import name 'ldparser' from 'ldparser' (unknown location)

2020-04-10 01:30:53,417 WebSocket connection opened
2020-04-10 01:30:53,417 ServerConnection created
`

Empty Page (py noob)

I'm super new to python and only get an empty white page with following log.

I also tried multiple path variants with \ and / and absolute and relative paths

PS D:\source\repos\acctelemetry> bokeh serve --show
2023-04-22 09:33:16,048 Starting Bokeh server version 3.1.0 (running on Tornado 6.3.1)
2023-04-22 09:33:16,449 User authentication hooks NOT provided (default user enabled)
2023-04-22 09:33:16,455 Bokeh app running at: http://localhost:5006/
2023-04-22 09:33:16,455 Starting Bokeh server with process id: 4908
2023-04-22 09:33:17,030 WebSocket connection opened
2023-04-22 09:33:17,031 ServerConnection created

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.