EinEinfach / CaSSAndRA

Cascaded sunray server and rover application
MIT License
29 stars 17 forks source link

location of mower on map #116

Closed goosst closed 4 months ago

goosst commented 6 months ago

Hello

There seems to be bug which seems quite repetitive in my configuration.

The robot is in reality positioned at the edge of the map (the gps has a fix). However in cassandra it gets reported somewhere inside the map. If I let it mow, it also goes outside the field ... . The result does not change when rebooting cassandra and sunray through the cassandra app (pressing the R). image

After fully rebooting with sudo systemctl restart cassandra, it does get reported to the correct location. image

Over mqtt, the first time (wrong map), the following is reported: /ardumower/Ardumower/state {"battery_voltage":25.78,"position":{"x":-0.39,"y":-1.27,"delta":0.41,"solution":2,"age":1.12,"accuracy":0.02,"visible_satellites":43,"visible_satellites_dgps":42,"mow_point_index":0},"target":{"x":0,"y":0},"job":0,"sensor":0,"amps":0,"map_crc":-25170}

The second time (correct map), the following is reported: /ardumower/Ardumower/state {"battery_voltage":25.73,"position":{"x":2.3,"y":2.56,"delta":0.42,"solution":2,"age":0.1,"accuracy":0.02,"visible_satellites":43,"visible_satellites_dgps":41,"mow_point_index":0},"target":{"x":0,"y":0},"job":0,"sensor":0,"amps":0,"map_crc":-25170}

I'm using NTRIP, absolute gps coordinates.

EinEinfach commented 6 months ago

Which position is reported by using sunray app? Pls share your Cassandra log entries. After rebooting and wrong position and after full reboot and right position

goosst commented 6 months ago

so I started the app with this command: ./app.py --app_log_file_level DEBUG --app_log_level DEBUG --server_log_level DEBUG

cassandratransfer.log

  1. So I cut the power, position the robot somewhere, wait for a gps fix, load a map. Mower is at the wrong location: Screenshot from 2024-02-26 19-42-29
  2. Then I restart the app and mower is at the correct location Screenshot from 2024-02-26 19-43-04
EinEinfach commented 6 months ago

Please comment ENABLE_PASS in your sunray config.h an recompile the firmware, then repeat the procedure. It very hard to follow your Logfile with encrypted communication. And pls set server_log level to error

goosst commented 6 months ago

ok, I'll do that in a few days

goosst commented 6 months ago

So I've played a bit more with the robot. Once I've updated the software with ENABLE_PASS disabled, the occurence of this issue seems far less (i.e. it does not seem repetitive anymore). Unfortunately I had it still one time today when starting up the mower after cassandra was running for a while. But I was not running cassandra in debug mode ... so no log. (Running it by default in debug mode created some strange state where the log was not updating anymore etc. .)

So I guess, less useful update than expected ... :).

goosst commented 6 months ago

1) started mower in his docking station 2) carried it to his mowing location --> still reports as docked 3) restart cassandra --> still reports as docked 4) restart robot --> robot is positioned in wrong location despite gps fix (screenshot 1) 5) restart cassandra --> robot is in correct location (screenshot 2)

Screenshot from 2024-03-04 18-26-20

Screenshot from 2024-03-04 18-26-47

logs are attached: cassandratransfer2.log cassandratransfer1.log cassandratransfer.log

EinEinfach commented 6 months ago

I think, I know what is exactly the problem. There is no map update in charge/docked or idle state, due to some problems with plotly by using lasso or box tool. If you start mowing or reload the page position of the robot should be updated too

goosst commented 6 months ago

well, I've tried it once to start mowing with a wrong location on the map. It wanted to drive to my neighbour :p

EinEinfach commented 6 months ago

I assume it's something wrong with your sunray fw or sunray fw configuration:

  1. Your robot reports docked state even if it not in charging station (maybe a hardware issue)
  2. Your robot change his position after receiving position mode command. It's ok, if it is done first time, but not in productive enviroment (2nd and 3rd value in S string are X and Y coordinates): 2024-03-04 17:26:31 INFO RX: S,26.22,-4.60,-3.52,0.39,2,0,0,0.83,0,0.00,0.00,0.02,35,0.00,35,0,0.00,-1,0,0x16

2024-03-04 17:26:31 DEBUG Recieved checksum:0x16 Calced checksum: 0x16 2024-03-04 17:26:31 DEBUG Backend: Calc data from state data frame 2024-03-04 17:26:31 DEBUG AT+P,1,3.919431,50.903403 will be send to the rover 2024-03-04 17:26:31 DEBUG Calced checksumme: 0x27 2024-03-04 17:26:31 INFO TX AT+P,1,3.919431,50.903403,0x27 2024-03-04 17:26:31 DEBUG Starting new HTTP connection (1): 192.168.0.175:80 2024-03-04 17:26:32 DEBUG http://192.168.0.175:80 "POST / HTTP/1.1" 200 8 2024-03-04 17:26:32 INFO RX: P,0x50

2024-03-04 17:26:33 INFO Performing get state http-request 2024-03-04 17:26:33 DEBUG Calced checksumme: 0x13 2024-03-04 17:26:33 INFO TX: AT+S,0x13 2024-03-04 17:26:33 DEBUG Starting new HTTP connection (1): 192.168.0.175:80 2024-03-04 17:26:34 DEBUG http://192.168.0.175:80 "POST / HTTP/1.1" 200 81 2024-03-04 17:26:34 DEBUG Status code: 200 2024-03-04 17:26:34 INFO RX: S,26.22,27.55,6.84,0.39,2,0,0,0.59,0,0.00,0.00,0.02,35,0.00,35,0,0.00,-1,0,0x00

For me it's not clear, why. Maybe is there another client online... Sorry but I can't help you

Do you have SD Card installed? If not, you have to always restart cassandra or connect the robot to sunray app at first, because your settings are stored in ram and are not available after restart

goosst commented 6 months ago

ok thank you for checking, for sure there is no other instance running. My procedure is now to turn the robot on and restart cassandra, I'll probably have to automate this if there is no obvious solution.

this robot has not liked me since day 1 (the amount of issues and fixes is getting high). In hindsight there were probably better options than using this pcb 1.4.