New Companion Computer software: Rpanion-server

Thanks for the zero image! I have run some tests.
When switched on, the rpanion ssid come up, it takes twice as much time as in the case of 3B+, probabily due to lack of processing power. Connection is successful with pc. The webserver works, settings pages are available, how ever it takes realy a while (10-30s) to get them loaded. Telemetry starts and connection to MP is established. I set the baud rate to the max. 960kbps. Rtsp video stream could be started, delay is around 0,5s. Until this point everything seems to be working, but very slow. The problem comes when I try to arm the rover. MP is frozen for a long time then either I get a message that Mavlink is not responding or I have to relaunch MP.
So it is a big step forward, however some features execution still suffer from considerabel delay.

Was this with a Ras Pi Camera or a USB webcam?

Is that at the same time as the video is running?

EDIT:
Thanks for testing! I’ll see what I can do about improving performance, but it may take some time.

Tried Zerotier One on my setup, UAV(Pixhak/Pi3B+) obtained an assigned ip address and I could ping UAV client IP from home based Zerotier LAN, so remote 4G connection was established. I’ll schedule a field flight test to work out the time latency of telemetry and video streaming.
BTW, any update on Rpanion-Server running on Softether?

I won’t be able to look into this few at least a few weeks. Got a few other projects that need work done :slight_smile:

it is a v2 raspicam.
first time video was running when I tried arming. so I have tested now without running video. it was pretty much the same. the first test I waited 2 minutes but no answer came back from the FC and MP was completely dead so I killed the application. second time I had a message appearing in MP:

error:no answer from MAV

it seems there is no communication after connection established, though getting connected go smoothly.

I’ve pushed in a few patches to better support the RPi ZeroW. I can now stream video and push telemetry with no issues (albeit on a USB Ethernet adaptor). Update Rpanion-server (GitHub - stephendade/Rpanion-server: Web-based configurator for companion computers of MAVLink vehicles) and see if it works better for you.

Hi Stephen, thenks for the update. I will test it as soon as I can. Unfortuantely I could not connect anymore the zero with USB, it is just not working and my etherenet adapter has not arrived yet.

Hey Stephen … Great Work on this!
I am testing the code out on an Orange PI Zero… I have 4G and VPN all setup and talking… Trying to step through the MANUAL installation… I am stuck at the part where we build the packages…
Your instructions say…
The node.js packages need to be installed using npm install in the Rpanion-server folder.

Just having a minor issue location and install the json packages…

Here is my error… no such file or directory, open ‘/home/cesadmin/Rpanion-server/package.json’

So I am going to try and copy the package.json file and rerun install…

Could you clear that up for a NOOB…

Regards…

The file is definitely in the Git repository. Not sure why it’s not there for you.
What version of node.js are you running? Rpanion-server requires node.js version 11.x or 12.x
Can you do an ls in the Rpanion-server folder and confirm if the file is there?

Thanks for the reply… I finally was able to install npm… when I copied the Rpanion_Server Folder from the image it messed up my permissions on the folder…
Had to delete the node_modules folder and the build folder… and re-run insall again… so the server is now up and running… just need to build a serial cable to connect my minipix and setup the flight controller… will be testing more tomorrow…

Need a script to install on an armbian… orange pi… but It looks like its working …

Regards…

I’ve not tested Rpanion-server under either of those, so I’m curious to see how it goes!

Just a quick update… had a slight problem with serial port names…
had to add a symlink ln -s /dev/ttyS1 /dev/serial0
not sure how we can make it so we can select alternate uarts on the pi boards… there is also /dev/ttyS1 on different pins… I am using pins 8 and 10 for uart1… I am also testing mavproxy
the VPN has been solid… doing all work through VPN
Regards…

Hi,
nice projekt (y). I just to try to install it on my OrangePi Zero, Armbian - Ubuntu 18.04 Bionic.
I am getting this error and not able to correct it. Can help?
I’ve tried node.js v12 and v14 - same error
Thank you
Pavel

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘run’, ‘build’ ]
2 info using npm@6.14.4
3 info using node@v14.2.0
4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ]
5 info lifecycle Rpanion-server@0.5.0~prebuild: Rpanion-server@0.5.0
6 info lifecycle Rpanion-server@0.5.0~build: Rpanion-server@0.5.0
7 verbose lifecycle Rpanion-server@0.5.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle Rpanion-server@0.5.0~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pavel/Rpani$
9 verbose lifecycle Rpanion-server@0.5.0~build: CWD: /home/pavel/Rpanion-server
10 silly lifecycle Rpanion-server@0.5.0~build: Args: [ ‘-c’, ‘react-scripts build’ ]
11 info lifecycle Rpanion-server@0.5.0~build: Failed to exec build script
12 verbose stack Error: Rpanion-server@0.5.0 build: react-scripts build
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:315:20)
12 verbose stack at maybeClose (internal/child_process.js:1051:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
13 verbose pkgid Rpanion-server@0.5.0
14 verbose cwd /home/pavel/Rpanion-server/deploy
15 verbose Linux 5.4.35-sunxi
16 verbose argv “/usr/bin/node” “/usr/bin/npm” “run” “build”
17 verbose node v14.2.0
18 verbose npm v6.14.4
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error Rpanion-server@0.5.0 build: react-scripts build
23 error spawn ENOENT
24 error Failed at the Rpanion-server@0.5.0 build script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

I haven’t got a OrangePi Zero to test with, so I can’t give a definitive answer.

However, when using the RasPi ZeroW, I did need to reduce the nodejs memory usage due to the low (512Mb) RAM on the ZeroW. See https://github.com/stephendade/Rpanion-server/blob/master/deploy/RasPiZero-deploy.sh#L58

Looking at the OrangePi Zero specs, I see some models have 256Mb RAM. That low RAM may be the issue.

I can suggest:
-Deleting the node_modules folder and doing an npm install in case any of the dependencies are corrupted.
-Entering set NODE_OPTIONS=--max-old-space-size=128 into the console before trying npm run build

@stephendade I think it is not the problem since my OPi Zero has 512MB RAM, co I think it is enought, but I can try it :slight_smile:
Thank you for tip

EDIT: WORKING!
I’ve deleted node_modules and run npm install again. All is working now. Thank you!

-Entering set NODE_OPTIONS=--max-old-space-size=128 causes memory problem -->> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Dear Stephen,
I have an RPi2 version with USB WiFi dongle (CSL dual band with chipset Ralink RT5572 - https://www.amazon.it/gp/product/B00PKBF5VI/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1), can I install rapanion-server on it? I’ve already raspbian installed and configured
I’ve see in github and into rpanion webepage there are links only to RPi3/4 and zero.

Thanks,
Antonio

I’ve just tested the RPi2 with the RPi3/4 variant of Rpanion-server and it all works fine.

I’ll edit the documentation to include the RPi2.

Hi,

Sorry for broad and noob question, but I am completely stuck trying to get my FC connected. I’ve tried different UARTs, baud rates, ardupilot versions and I’ve even tried a different mavlink build. Is there a way to determine my Pi’s UART is working properly? That’s the only thing i can think of that is stuffing this build up.

Connect the Rx and Tx lines of the Pi’s UART to each other and see if you can pass text (loopback).

1 Like

Is any way to pass analog video from the FC to the Pi? I only have old drone camera sitting around and none of them are digital.