documentation of integration of part influx.py into DIYrobocars.com framework
As I'm again and again stumbling across understanding
I take the opportunity to document every step to follow on how to integrate a new part - here influx.py - into the donkeycar framework.
The original version was first shown on discord on May 2nd 2020
and published on the discord channel in this gist on Nov. 18, 2020.
cloud-rocket — 19.11.2020
@Rainer Bareiß ·Parking Lot Nerds - that exactly was my original idea! But I had 2 issues with this approach, before I started implementing it:
1. Isn'tInfluxDB introducing a significant latency?
2. Grafana is fantastic, but it's not exactly mobile application. I'd like to have something on my phone attached to a remote control (better some Android app)..... How do you physically dealing with Grafana on the go?
ref. 1: I ran it on my local machine and did not see that - compared to the other parts - the influxdb introduced too much latency. however I did not measure it.
ref.2: you start an instance of grafana on your preferred server - eg the jetson nano on your car that generates your local wifi network - and connect with the browser on your phone.
ref. implementing: just test the part above. installing influxdb & grafana took me < 30 min on Ubuntu 18.04 on my local machine.
please make sure to set influxdb user & password as environment variables, see the code
$ pip install influxdb
$ sudo apt-get install python-influxdb
(follow instructions on grafana.com)
Copy influx.py to the actual (used) donkeycar location
cp rbxparts/influx.py /media/rainer/_data/30-projects/donkeycar42_official/donkeycar/donkeycar/parts
sudo grafana-cli admin reset-admin-password xyz
(sds14) rainer@neuron:~$ grafana-cli plugins list-remote|grep plotly
id: ae3e-plotly-panel version: 0.5.0
id: natel-plotly-panel version: 0.0.7
grafana-cli plugins ls
(sds14) rainer@neuron:~$ sudo grafana-cli plugins install natel-plotly-panel
✔ Downloaded natel-plotly-panel v0.0.7 zip successfully
sudo systemctl restart grafana-server
sudo systemctl status grafana-server
cd /media/rainer/_data/30-projects/mysims/mysim_robohat2
(sds) rainer@neuron:~/mysim_robohat$ python manage_influx2.py drive --js
We're having a lot of problems (to due lacking a professional driver ;-) with the stability of our car. This shows a situation with spinning shortly after the finish line and reaching maximum speed.
python manage_influx3.py drive
Have fun & go fast!