Simulating The Kart Fleet
None of this needs a kart, an ECAN or a track network to work on.KartSimulatorV2 stands in for the hardware: it accepts the receiver’s TCP connection, answers request frames using the same DBC the pipeline decodes with, and broadcasts controller frames on its own.
simulate.bat alongside it starts a whole fleet, one process per kart on consecutive ports from 1234. Point ip-config.json at the host with matching ports and the receiver cannot tell the difference. See The Configuration To Point It At for a working one.
fittedNodes is the most useful switch here, because it reproduces the request fan out on your own machine. Set it below the five nodes the request set covers and you can watch unanswered requests behave correctly without needing a particular kart in front of you.The controller side of the simulator broadcasts at 50 Hz, which is the figure the request rate is set against.
The Configuration To Point It At
A simulated fleet still needs anip-config.json, and the file is excluded from source control, so a fresh clone has nothing to start from. Two kart entries from a working one:
ip-config.json
mep kart takes one connection and a txChunkSize of 5, while an aentron kart in CAD takes two connections and a txChunkSize of 1, one per battery node. Neither carries isActive, which is optional and defaults to true.
The complete file is the JSON at
images/software/developer/estate/systems/telemetry/ip-config.json in the source of these docs. It is a real 20 kart configuration pointed at the simulator rather than a sanitised sample, so it runs as it stands against simulate.bat. Copy it out of the repository into the receiver’s config folder.The Address Is The Docker Gateway, Not Loopback
Every connection in it uses172.25.160.1, which looks like a track address and is not one. It is the Windows Docker NAT gateway, so it is how the receiver reaches the host from inside its own container.
How The Ports Line Up
simulate.bat hands out consecutive ports from 1234, and the file expects exactly that sequence. Ports are consumed per connection rather than per kart, so the multi connection karts take two each:
Change how many karts the batch file starts and the ports shift for everything after it, because they are handed out in sequence rather than fixed per kart. Trim karts from the end of the file rather than the middle, or the ports and the processes stop agreeing.
Running A Conversion Locally
Reproducing a conversion on your own machine is the fastest way to understand a failure, and it is how a stuck run gets fixed.1
Restore the databases
Restore
TalentId_PROD and GklPlatform_PROD using db-setup.zip.2
Run both APIs
The conversion requires both the TalentID API and the GKL Platform API to be running, and restored to their latest versions. The telemetry API can also be run locally.
3
Start the debugger
In Visual Studio Code, use the
launch.json file, which runs run_stl_export.py. Open the folder in VS Code, press ctrl-shift-p, then choose Debug: Select and Start Debugging.4
Point it at the right zip
Edit the file with the correct zip, and choose whether the file should be forced, meaning always reconvert, and whether the output should also be written to the
LocalData folder.Remember to change the bucket in launch.json from dev to prod.5
Push the fix back
Keep the database in local mode so it stays in sync. Once the issue is fixed, re-upload the zip to S3, with
force = true in the metadata if necessary.