Mein Projekt CaSSAndRA zur Steuerung des Ardumowers

Also Mähen klappt so weit. Aber er fährt hin und wieder unmotiviert Punkt 0.0 an (was zum Glück geht) und das vom anderen Ende des Gartens. Deshalb mache ich die Verschlüsselung jetzt wieder aus.
 
Ergänzung: Er fährt nicht nur mehrfach pro Task 0.0 an sondern auch plötzlich den Perimeter von Bereichen ab, die gar nicht im Task enthalten sind. Ich teste das jetzt ohne Verschlüsselung. Mal sehen, wie es da ist. Mit Verschlüsselung ist Cassandra jedenfalls für mich leider noch nicht brauchbar.
 
Ergänzung: Er fährt nicht nur mehrfach pro Task 0.0 an sondern auch plötzlich den Perimeter von Bereichen ab, die gar nicht im Task enthalten sind. Ich teste das jetzt ohne Verschlüsselung. Mal sehen, wie es da ist. Mit Verschlüsselung ist Cassandra jedenfalls für mich leider noch nicht brauchbar.
Hierzu gibt schon ein issue
https://github.com/EinEinfach/CaSSAndRA/issues/33

etwas verwunderlich, dass es bei dir nur im encrypted mode auftritt, ohne encryption funktioniert es wie es soll?
 
Das Issue kenne ich. Von mir ist das mit dem Pool.

Jap. Ohne Verschlüsselung macht er das auf dieser Karte mit 0.0 und dem seltsamen Befahren des Perimeterns nicht. Mit aber ja. Das Issue aus dem Pool existiert aber auf der im Issue genannten Karte auch ohne Verschlüsselung. Und dort fährt er auch ohne Verschlüsselung mal 0.0 an. Insgesamt ein seltsames Verhalten.
 
Hallo,
ich hab leider ein Problem Cassandra ans laufen zu bekommen.
Beim Versuch zu starten wirft das Programm den Fehler:

Code:
2023-08-23 22:07:34 DEBUG Backend: rovercfg to read: {'mowspeed_setpoint': 0.25, 'gotospeed_setpoint': 0.3, 'positionmode': 'relative', 'lon': 0, 'lat': 0}
2023-08-23 22:07:34 DEBUG Backend: pahtplannercfg to read: {'pattern': 'lines', 'width': 0.18, 'angle': 0, 'distancetoborder': 2, 'mowarea': 'yes', 'mowborder': 0, 'mowexclusion': 'yes', 'mowborderccw': 'yes'}
2023-08-23 22:07:34 DEBUG Backend: pahtplannercfg to read: {'pattern': 'lines', 'width': 0.18, 'angle': 0, 'distancetoborder': 2, 'mowarea': 'yes', 'mowborder': 0, 'mowexclusion': 'yes', 'mowborderccw': 'yes'}
2023-08-23 22:07:34 DEBUG Backend: pahtplannercfg to read: {'pattern': 'lines', 'width': 0.18, 'angle': 0, 'distancetoborder': 2, 'mowarea': 'yes', 'mowborder': 0, 'mowexclusion': 'yes', 'mowborderccw': 'yes'}
2023-08-23 22:07:34 DEBUG Backend: pahtplannercfg to read: {'pattern': 'lines', 'width': 0.18, 'angle': 0, 'distancetoborder': 2, 'mowarea': 'yes', 'mowborder': 0, 'mowexclusion': 'yes', 'mowborderccw': 'yes'}
2023-08-23 22:07:34 DEBUG Backend: appcfg to read: {'datamaxage': 30, 'time_to_offline': 30, 'voltage_to_soc': [{'V': 22, 'SoC': 0}, {'V': 28, 'SoC': 100}], 'current_thd_charge': -0.03, 'rover_picture': 'ardumower/'}
2023-08-23 22:07:35 INFO Backend: Starting backend server
2023-08-23 22:07:35 DEBUG absolute_path: /home/pi/CaSSAndRA/CaSSAndRA/src/backend
2023-08-23 22:07:35 INFO Backend: Read communication config file
2023-08-23 22:07:35 DEBUG Opening commcfg.json
2023-08-23 22:07:35 DEBUG Path to commcfg.json: /src/data/user/commcfg.json
2023-08-23 22:07:35 DEBUG commcfg.json content: {'USE': 'MQTT', 'MQTT': [{'CLIENT_ID': 'Ardumower'}, {'USERNAME': 'XXXX'}, {'PASSWORD': 'XXXX'}, {'MQTT_SERVER': 'XXX.XXX.XXX.XXX'}, {'PORT': 1883}, {'MOWER_NAME': 'Ardumower/BauerHorst'}], 'HTTP': [{'IP': 'http://XXX.XXX.XXX.XXX'}, {'PASSWORD': '123456'}], 'UART': [{'SERPORT': '/dev/ttyACM0'}, {'BAUDRATE': 115200}]}
2023-08-23 22:07:35 INFO Backend: Used connection: MQTT
2023-08-23 22:07:35 DEBUG Checking connection data
2023-08-23 22:07:35 DEBUG Connection data are valid
2023-08-23 22:07:35 INFO Backend: Read saved data
2023-08-23 22:07:35 WARNING Backend: Failed to load state data, create a default data frame
2023-08-23 22:07:35 WARNING Backend: Failed to load statistics data, create a default data frame
2023-08-23 22:07:35 WARNING Backend: Failed to load calced data from state, create a default data frame
2023-08-23 22:07:35 WARNING Backend: Failed to load calced data from stats, create a default data frame
2023-08-23 22:07:35 INFO Backend: Read map data file
2023-08-23 22:07:35 WARNING Backend: Failed to load saved perimeters from file
2023-08-23 22:07:35 DEBUG File /home/pi/CaSSAndRA/CaSSAndRA/src/data/map/perimeter.json does not exist
2023-08-23 22:07:35 INFO Backend: Read tasks data file
2023-08-23 22:07:35 INFO Backend: Failed to load saved tasks from file
2023-08-23 22:07:35 DEBUG File /home/pi/CaSSAndRA/CaSSAndRA/src/data/map/tasks.json does not exist
2023-08-23 22:07:35 INFO Backend: Establishing MQTT connection to the MQTT-Server
2023-08-23 22:07:35 INFO Backend: Connection to the MQTT-Server succsessfull
2023-08-23 22:07:35 INFO Backend: Starting server thread
2023-08-23 22:07:35 DEBUG Backend: Starting MQTT client loop
2023-08-23 22:07:35 INFO Backend: Backend is successfully started
2023-08-23 22:07:35 DEBUG MQTT: publish: Ardumower/BauerHorst/command with message: AT+P,0,0,0
2023-08-23 22:07:35 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Traceback (most recent call last):
  File "/home/pi/CaSSAndRA/CaSSAndRA/app.py", line 79, in <module>
    main()
  File "/home/pi/CaSSAndRA/CaSSAndRA/app.py", line 46, in main
    app = dash.Dash(
  File "/home/pi/.local/lib/python3.9/site-packages/dash/dash.py", line 504, in __init__
    self.init_app()
  File "/home/pi/.local/lib/python3.9/site-packages/dash/dash.py", line 588, in init_app
    self.enable_pages()
  File "/home/pi/.local/lib/python3.9/site-packages/dash/dash.py", line 2041, in enable_pages
    self._import_layouts_from_pages()
  File "/home/pi/.local/lib/python3.9/site-packages/dash/dash.py", line 2012, in _import_layouts_from_pages
    spec.loader.exec_module(page_module)
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/pi/CaSSAndRA/CaSSAndRA/src/pages/taskplanner.py", line 9, in <module>
    from src.components.tasks import map, buttongroupcontrol, modal, tasksorder
  File "/home/pi/CaSSAndRA/CaSSAndRA/src/components/tasks/tasksorder.py", line 16, in <module>
    options=tasks.saved[tasks.saved['map name'] == current_map.name].name.unique()),
  File "/home/pi/.local/lib/python3.9/site-packages/pandas/core/frame.py", line 3761, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/home/pi/.local/lib/python3.9/site-packages/pandas/core/indexes/range.py", line 349, in get_loc
    raise KeyError(key)
KeyError: 'map name'
 
Hallo,
ich hab leider ein Problem Cassandra ans laufen zu bekommen.
Beim Versuch zu starten wirft das Programm den Fehler:
Ups… scheint, dass ich dort nicht aufgepasst habe.

Als Workaround kannst du mal versuchen in CaSSAndRA/src/components/tasks/tasksorder.py

die Zeile 16 auszukommentieren. Einfach einen # am Anfang der Zeile setzen
 
Ups… scheint, dass ich dort nicht aufgepasst habe.

Als Workaround kannst du mal versuchen in CaSSAndRA/src/components/tasks/tasksorder.py

die Zeile 16 auszukommentieren. Einfach einen # am Anfang der Zeile setzen
@EinEinfach der Workaround verursacht leider einen neuen Fehler:

Code:
2023-08-24 16:27:21 INFO Backend: Used connection: MQTT
2023-08-24 16:27:21 DEBUG Checking connection data
2023-08-24 16:27:21 DEBUG Connection data are valid
2023-08-24 16:27:21 INFO Backend: Read saved data
2023-08-24 16:27:21 INFO Backend: State data are loaded successfully
2023-08-24 16:27:21 INFO Backend: Statistics data are loaded successfully
2023-08-24 16:27:21 INFO Backend: Calced data from state are loaded successfully
2023-08-24 16:27:21 INFO Backend: Calced data from stats are loaded successfully
2023-08-24 16:27:21 INFO Backend: Read map data file
2023-08-24 16:27:21 WARNING Backend: Failed to load saved perimeters from file
2023-08-24 16:27:21 DEBUG If using all scalar values, you must pass an index
2023-08-24 16:27:21 INFO Backend: Read tasks data file
2023-08-24 16:27:21 INFO Backend: Failed to load saved tasks from file
2023-08-24 16:27:21 DEBUG File /home/pi/CaSSAndRA/CaSSAndRA/src/data/map/tasks.j                                                                                                                                                             son does not exist
2023-08-24 16:27:21 INFO Backend: Establishing MQTT connection to the MQTT-Serve                                                                                                                                                             r
2023-08-24 16:27:21 INFO Backend: Connection to the MQTT-Server succsessfull
2023-08-24 16:27:21 INFO Backend: Starting server thread
2023-08-24 16:27:21 DEBUG Backend: Starting MQTT client loop
2023-08-24 16:27:21 INFO Backend: Backend is successfully started
2023-08-24 16:27:21 DEBUG MQTT: publish: Ardumower/BauerHorst/command with messa                                                                                                                                                             ge: AT+P,0,0,0
2023-08-24 16:27:21 INFO Backend: Subscriptions to the rover MQTT topics succses                                                                                                                                                             sfull
Traceback (most recent call last):
  File "/home/pi/CaSSAndRA/CaSSAndRA/app.py", line 79, in <module>
    main()
  File "/home/pi/CaSSAndRA/CaSSAndRA/app.py", line 46, in main
    app = dash.Dash(
  File "/home/pi/.local/lib/python3.9/site-packages/dash/dash.py", line 504, in                                                                                                                                                              __init__
    self.init_app()
  File "/home/pi/.local/lib/python3.9/site-packages/dash/dash.py", line 588, in                                                                                                                                                              init_app
    self.enable_pages()
  File "/home/pi/.local/lib/python3.9/site-packages/dash/dash.py", line 2041, in                                                                                                                                                              enable_pages
    self._import_layouts_from_pages()
  File "/home/pi/.local/lib/python3.9/site-packages/dash/dash.py", line 2012, in                                                                                                                                                              _import_layouts_from_pages
    spec.loader.exec_module(page_module)
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/pi/CaSSAndRA/CaSSAndRA/src/pages/taskplanner.py", line 9, in <modu                                                                                                                                                             le>
    from src.components.tasks import map, buttongroupcontrol, modal, tasksorder
  File "/home/pi/CaSSAndRA/CaSSAndRA/src/components/tasks/tasksorder.py", line 2                                                                                                                                                             5
    ]),
    ^
SyntaxError: positional argument follows keyword argument
 
Irgendeine Idee warum nach dem neuesten Update, zumindest auf mobil, Android, Chrome keine Karte mehr in der Hauptansicht angezeigt wird (leeres Koordinatensystem bei gewählter Karte)? Ich habe Browser neu gestartet, Cache gelöscht...
 
Ich hoffe, Dateien anhängen geht wieder....

Natürlich nicht...

Code:
2023-08-30 19:54:44 DEBUG http://10.1.1.108:80 "POST / HTTP/1.1" 200 86
2023-08-30 19:54:44 DEBUG Status code: 200
2023-08-30 19:54:44 DEBUG Content: S,30.89,-3.30,-2.50,2.46,2,2,0,0.78,13,-2.54,-3.12,0.02,41,-0.00,39,131827,0.03,0x0d
2023-08-30 19:54:44 DEBUG Recieved checksum:0xd Calced checksum: 0xd
2023-08-30 19:54:44 DEBUG AT+S string to short, add dummy timetable day of week and timetable hour
2023-08-30 19:54:44 DEBUG Backend: Calc data from state data frame
2023-08-30 19:54:46 ERROR Exception on /_dash-update-component [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.10/site-packages/dash/dash.py", line 1283, in dispatch

    ctx.run(
  File "/usr/local/lib/python3.10/site-packages/dash/_callback.py", line 450, in add_context
    output_value = func(*func_args, **func_kwargs)  # %% callback invoked %%
  File "/usr/src/cassandra/src/components/state/map.py", line 254, in update
    fig_state['data'] = traces
TypeError: 'NoneType' object does not support item assignment
2023-08-30 19:54:46 INFO Backend: Performing get state http-request
2023-08-30 19:54:46 DEBUG Calced checksumme: 0x13
2023-08-30 19:54:46 DEBUG Data to be send: AT+S,0x13
2023-08-30 19:54:46 DEBUG Starting new HTTP connection (1): 10.1.1.108:80
2023-08-30 19:54:46 DEBUG http://10.1.1.108:80 "POST / HTTP/1.1" 200 86
2023-08-30 19:54:46 DEBUG Status code: 200
2023-08-30 19:54:46 DEBUG Content: S,30.95,-3.30,-2.50,2.46,2,2,0,0.88,13,-2.54,-3.12,0.02,41,-0.00,39,131827,0.03,0x0b
2023-08-30 19:54:46 DEBUG Recieved checksum:0xb Calced checksum: 0xb
2023-08-30 19:54:46 DEBUG AT+S string to short, add dummy timetable day of week and timetable hour
2023-08-30 19:54:46 DEBUG Backend: Calc data from state data frame
2023-08-30 19:54:48 INFO Backend: Performing get state http-request
2023-08-30 19:54:48 DEBUG Calced checksumme: 0x13
2023-08-30 19:54:48 DEBUG Data to be send: AT+S,0x13
2023-08-30 19:54:48 DEBUG Starting new HTTP connection (1): 10.1.1.108:80
2023-08-30 19:54:48 DEBUG http://10.1.1.108:80 "POST / HTTP/1.1" 200 86
2023-08-30 19:54:48 DEBUG Status code: 200
2023-08-30 19:54:48 DEBUG Content: S,30.92,-3.30,-2.50,2.46,2,2,0,0.97,13,-2.54,-3.12,0.02,41,-0.00,38,131827,0.03,0x07
2023-08-30 19:54:48 DEBUG Recieved checksum:0x7 Calced checksum: 0x7
2023-08-30 19:54:48 DEBUG AT+S string to short, add dummy timetable day of week and timetable hour
2023-08-30 19:54:48 DEBUG Backend: Calc data from state data frame
2023-08-30 19:54:49 ERROR Exception on /_dash-update-component [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.10/site-packages/dash/dash.py", line 1283, in dispatch

    ctx.run(
  File "/usr/local/lib/python3.10/site-packages/dash/_callback.py", line 450, in add_context
    output_value = func(*func_args, **func_kwargs)  # %% callback invoked %%
  File "/usr/src/cassandra/src/components/state/map.py", line 254, in update
    fig_state['data'] = traces
TypeError: 'NoneType' object does not support item assignment
2023-08-30 19:54:50 INFO Backend: Performing get state http-request
2023-08-30 19:54:50 DEBUG Calced checksumme: 0x13
2023-08-30 19:54:50 DEBUG Data to be send: AT+S,0x13
2023-08-30 19:54:50 DEBUG Starting new HTTP connection (1): 10.1.1.108:80
2023-08-30 19:54:51 DEBUG http://10.1.1.108:80 "POST / HTTP/1.1" 200 86
2023-08-30 19:54:51 DEBUG Status code: 200
2023-08-30 19:54:51 DEBUG Content: S,30.88,-3.30,-2.50,2.46,2,2,0,0.33,13,-2.54,-3.12,0.02,41,-0.00,39,131827,0.03,0x03
2023-08-30 19:54:51 DEBUG Recieved checksum:0x3 Calced checksum: 0x3
2023-08-30 19:54:51 DEBUG AT+S string to short, add dummy timetable day of week and timetable hour
2023-08-30 19:54:51 DEBUG Backend: Calc data from state data frame
2023-08-30 19:54:52 ERROR Exception on /_dash-update-component [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.10/site-packages/dash/dash.py", line 1283, in dispatch

    ctx.run(
  File "/usr/local/lib/python3.10/site-packages/dash/_callback.py", line 450, in add_context
    output_value = func(*func_args, **func_kwargs)  # %% callback invoked %%
  File "/usr/src/cassandra/src/components/state/map.py", line 254, in update
    fig_state['data'] = traces
TypeError: 'NoneType' object does not support item assignment
2023-08-30 19:54:52 INFO Backend: Performing get obstacles http-request
2023-08-30 19:54:52 DEBUG Calced checksumme: 0x45
2023-08-30 19:54:52 DEBUG Data to be send: AT+S2,0x45
2023-08-30 19:54:52 DEBUG Starting new HTTP connection (1): 10.1.1.108:80
2023-08-30 19:54:52 DEBUG http://10.1.1.108:80 "POST / HTTP/1.1" 200 11
2023-08-30 19:54:52 DEBUG Status code: 200
2023-08-30 19:54:52 DEBUG Content: S2,0,0xe1
2023-08-30 19:54:52 DEBUG Recieved checksum:0xe1 Calced checksum: 0xe1
 
Oben