sunray for RPi@landrumower: Lost in confusion

Sunflare

Member
Hi All,
somehow, I have trouble to get the software configuration and installation straight in my head.
I hope someone here is able and willing to help me:
I have
  • the Landrumower PCB
  • A Raspberry Pi 4B
  • A raspberyPi Pico
I would like to run a Mower based on sunray (for Alfred, not OWL) with Cassadra doing the "coordination".
Cassandra and sunray should run both on the RPi 4B

I believe I understood the following:
  • The Pico
  • The RPi with Cassandra:
  • The RPi with sunray (that's my personal challenge)
    • It's supposed to make the low-level control (GPS/RTK, track following, battery monitoring, motor control, ...)
    • I found the information to choose the Repo/branch GitHub - EinEinfach/Sunray at landrumower-linux
    • I cloned it and tried to understand the structure but although I find a subtree Sunray/sunray (with config.h),
      the instructions only tell me to operate in Sunray/alfred (for Alfred) with its config.h.
      But I intend to build sunray (firmware) not Alfred.
My two questions are:
  1. Did I get the structure and functions right as far as I got (if not, please explain)?

  2. What is the proper procedure and repo+path to compile and install a working "sunray firmware" that i can connect to Cassandra on one end and to the Pico-Firmware on the other end for my RPi based hardware configuration? (I didn't see a thread where that part is explained!)
Thanks in advance!

Thomas
 
If you on landrumower-linux branch, then copy the config.h file from landrumower folder to alfred folder and replace existing file, then you can compile your own Sunray fw with landrumower specific stuff.
In terminal go to alfred/build folder
rm -Rf *
cmake ..
make
If all goes well you can try to start Sunday in terminal
sudo ./sunray
 
The Pico
Yes, 1.x is also ok, but make a try with 2.x at first

The RPi with Cassandra:
if Sunray an Cassandra are running on the same machine, then HTTP requests

The RPi with sunray (that's my personal challenge)
  • It's supposed to make the low-level control (GPS/RTK, track following, battery monitoring, motor control, ...)
  • I found the information to choose the Repo/branch GitHub - EinEinfach/Sunray at landrumower-linux
  • I cloned it and tried to understand the structure but although I find a subtree Sunray/sunray (with config.h),
    the instructions only tell me to operate in Sunray/alfred (for Alfred) with its config.h.
    But I intend to build sunray (firmware) not Alfred.
It always the same code, the subtree config.h is for classic ardumower with Due or Adafruit M4. If you want make some changes on Sunray code then you also have to work in this subtree, but compilation is have to be done like I described in the first post
 
Hi again,
it took a while longer than hoped for to get to testing the recipe.

Unfortunately the compile failed repeatedly (at 29%) and although I have some C-experience on Linux from years back, I couldn't find the root cause.
Messages look like:

Code:
/home/bruns01/Sunray/alfred/src/wiring_int.c: In function ‘_isr_check_task’:
/home/bruns01/Sunray/alfred/src/wiring_int.c:59:54: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   59 |                     thread_create(isr_executor_task, (void *)i);
      |                                                      ^
/home/bruns01/Sunray/alfred/src/wiring_int.c:61:54: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   61 |                     thread_create(isr_executor_task, (void *)i);
      |                                                      ^
/home/bruns01/Sunray/alfred/src/wiring_int.c:66:13: error: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
   66 |             usleep(100);
      |             ^~~~~~
/home/bruns01/Sunray/alfred/src/wiring_int.c: In function ‘attachInterrupt’:
/home/bruns01/Sunray/alfred/src/wiring_int.c:81:13: error: implicit declaration of function ‘pthread_setname_np’; did you mean ‘thread_set_name’? [-Wimplicit-function-declaration]
   81 |             pthread_setname_np(_pin_isr_thread, "arduino-isr");
      |             ^~~~~~~~~~~~~~~~~~
      |             thread_set_name
make[2]: *** [CMakeFiles/sunray.dir/build.make:541: CMakeFiles/sunray.dir/src/wiring_int.c.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/sunray.dir/all] Fehler 2
make: *** [Makefile:91: all] Fehler 2

This was compiled on a current Raspbian (Debian GNU/Linux 13 (trixie) ).
For the test I simply copied "config.h file from landrumower folder to alfred folder" without changing anything in it, so far.

I found "pthread.h" with a declaration of pthread_setname_np on the system but am not sure whether it is taken as it is in an
#ifdef __USE_GNU .
I am not sure at all about usleep.

Any hints are wellcome.

Thomas
 
Forget the previous post. I missed a command when setting up the local repo/branch.

I did:
git clone https://github.com/EinEinfach/Sunray.git
cd Sunray
git checkout landrumower-linux


But you need "git fetch --all" to switch to a different remote branch, like:
git clone https://github.com/EinEinfach/Sunray.git
cd Sunray
git fetch --all # very important !
git checkout landrumower-linux


Now compile worked! Hurray!
 
Back
Top