I just started with Hello RVR - LED Control · Sphero Public SDK
(I added print statements to the script, otherwise as on the web page)
Brand new RVR, used 1. Python SDK Setup (Quick Start) · Sphero Public SDK
and I ended up with a stack overflow:
create observer
Checking RVR firmware versions…
call wake
Fatal Python error: Cannot recover from stack overflow.
Current thread 0x759cb440 (most recent call first):
File “/usr/lib/python3.7/posixpath.py”, line 42 in _get_sep
File “/usr/lib/python3.7/posixpath.py”, line 147 in basename
File “/usr/lib/python3.7/logging/init.py”, line 327 in init
File “/usr/lib/python3.7/logging/init.py”, line 1488 in makeRecord
File “/usr/lib/python3.7/logging/init.py”, line 1518 in _log
File “/usr/lib/python3.7/logging/init.py”, line 1395 in warning
File “/home/pi/sphero-sdk-raspberrypi-python/sphero_sdk/common/protocol/api_sphero_message.py”, line 421 in from_buffer
File “/home/pi/sphero-sdk-raspberrypi-python/sphero_sdk/observer/client/dal/observer_parser.py”, line 34 in __read
File “/home/pi/sphero-sdk-raspberrypi-python/sphero_sdk/observer/client/dal/observer_parser.py”, line 51 in __read
File “/home/pi/sphero-sdk-raspberrypi-python/sphero_sdk/observer/client/dal/observer_parser.py”, line 51 in __read
File “/home/pi/sphero-sdk-raspberrypi-python/sphero_sdk/observer/client/dal/observer_parser.py”, line 51 in __read
… (repeats)
I noted two things:
-
api_sphero_message.py line 421 is trying to call logger.warning(‘Bad Checksum…’…)
-
observer_parser.py (in _read) has a recursive call to _read which in this case looks to be the cause of the stack overflow. But perhaps this level of recursive calls is unusual and occurs only because of the checksum issue.
So perhaps I need to pay attention to the “Bad Checksum” warning.
Note: the Raspberry Pi also has a “Build HAT” attached. Per Raspberry Pi Documentation - Build HAT, the Build HAT uses GPIO pins 0/1, 4, 14, 15, 16, 17. But the RVR as I understand it uses pins 8, 10 and 12. So I don’t see any GPIO conflict in the documented pin usage.
Does someone have suggestions how I may resolve the issue?
Thanks in advance