GithubHelp home page GithubHelp logo

stephendade / rpanion-server Goto Github PK

View Code? Open in Web Editor NEW
115.0 11.0 57.0 4.8 MB

Web-based configurator for companion computers of MAVLink vehicles

Home Page: https://www.docs.rpanion.com/software/rpanion-server

License: GNU General Public License v3.0

HTML 0.44% JavaScript 83.66% Python 8.01% Shell 7.90% CSS 0.01%
raspberry-pi mavlink ardupilot nodejs jetson

rpanion-server's Introduction

GitHub Actions Coverage Status

User Documentation is at https://www.docs.rpanion.com/software/rpanion-server

Rpanion-server

This is a node.js based server for companion computers used in Mavlink-based vehicles (ie Ardupilot, PX4).

It presents a web-based interface (running on the companion computer), where system settings such as network, telemetry and video streaming can be configured from.

On the Raspberry Pi, Rpanion-server is compatible with the Raspberry Pi OS and Ubuntu 20.04 LTS.

On the Nvidia Jetson, Rpanion-server is compatible with Ubuntu 18.04 LTS.

On the Libre Computer Le Potato, Rpanion-server is compatible with their flavor of Raspberry Pi OS.

Note

Some users may have issues connecting to the UART on the Raspberry Pi 3B+. Further details and configuration fixes are at #215 (comment).

Features

Rpanion-server allows the user to configure:

  • Flight Controller telemetry routing to udp outputs
  • Video Streaming via an RTSP server
  • Network configuration
  • NTRIP Streaming
  • Logging (tlog and bin logs)

Dependencies and First-time configuration

The following instructions assumes you have cloned the Rpanion-server repository to ~/. If not, use:

cd ~/ && git clone --recursive https://github.com/stephendade/Rpanion-server.git

Automatic (Raspberry Pi)

The Raspberry Pi Zero W(1) is not supported from version 0.10.0 onwards.

For the Raspberry Pi 2, 3, 4,5 and Zero(2) run the below command on a fresh Raspberry Pi OS install to configure and install Rpanion-server with all required dependencies. Note this does not configure an initial Wifi hotspot.

cd ./deploy && ./RasPi2-3-4-5-deploy.sh

If running Ubuntu 20.04 OS on the Pi, use:

cd ~/Rpanion-server/deploy/ && ./RasPi-ubuntu20-deploy.sh

If running Ubuntu 22.04 OS on the Pi, use:

cd ~/Rpanion-server/deploy/ && ./RasPi-ubuntu22-deploy.sh

Note the CSI camera does not currently work on Ubuntu 22.04, due to incompatibilities with the Raspberry Pi.

If not already configured for an initial Wifi hotspot, run the ./deploy/wifi_access_point.sh script. The hotspot has the SSID "rpanion" and password "rpanion123". The Pi's IP address will be 10.0.2.100, so the Rpanion-sever website will be available at http://10.0.2.100:3000.

Manual (Raspberry Pi OS)

Rpanion-server requires a recent version of node.js. It can be installed via package manager:

sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

sudo apt update
sudo apt install -y nodejs

The required prerequisite packages can be installed via:

sudo apt install libgstreamer-plugins-base1.0* libgstreamer1.0-dev gstreamer1.0-plugins-ugly libgstrtspserver-1.0-dev gstreamer1.0-plugins-base-apps network-manager python3 python3-dev python3-gst-1.0 python3-pip dnsmasq ninja-build

sudo pip3 install meson
pip3 install netifaces --user

For some systems (such as the Raspberry Pi), additional permissions may be requires to run nmcli from the default user. In /etc/NetworkManager/NetworkManager.conf add auth-polkit=false in the main section.

If an older version of the Raspberry Pi OS is used (Buster, V10 or below), the gst-rpicamsrc Gstreamer element must be installed. See https://github.com/thaytan/gst-rpicamsrc for install instructions.

To (optionally) use the Zerotier and/or Wireguard VPN's, install as follows:

curl -s https://install.zerotier.com | sudo bash
sudo apt install wireguard wireguard-tools

The mavlink-router (https://github.com/intel/mavlink-router) software is used for backend routing and is required to be installed:

git submodule init && git submodule update
cd ./modules/mavlink-router
meson setup build . --buildtype=release
ninja -C build
sudo ninja -C build install

The node.js packages need to be installed using npm install in the Rpanion-server folder.

Automatic (Nvidia Jetson)

For the Nvidia Jetson run the below command on a fresh OS install to configure and install Rpanion-server and all required dependencies. Note this does not configure an initial Wifi hotspot.

cd ./deploy && ./jetson-deploy.sh

Automatic (Libre Computer AML-S905X-CC aka 'Le Potato')

For the Le Potato run the below command on a fresh OS install to configure and install Rpanion-server and all required dependencies. Note this does not configure an initial Wifi hotspot.

cd ./deploy && ./RasPi2-3-4-deploy.sh

If using a usb to serial converter, you might need to modify permissions of the device.

Temporary device permission update

sudo chmod 666 /dev/ttyACM0

Persistent device permission update

Follow the steps on this site for your specific device: https://www.xmodulo.com/change-usb-device-permission-linux.html

Automatic (x86 boards and laptops)

For any x86 based modules or laptops, run the following script to configure and install Rpanion-server and all required dependencies. Note this does not configure an initial Wifi hotspot.

cd ./deploy && ./x86-ubuntu20-deploy.sh

Updating

When updating Rpanion-server from Github, run npm install to grab any changed dependencies.

If running in production mode, run npm run build too for the ReactJS app to be rebuilt.

If running Rpanion-server as a service, ensure to restart the service.

An automatic update script performed via:

./deploy/upgrade.sh

Building and Running in production mode

Running in production mode builds the reactJS app first. This gives performance increases over running in development mode.

npm run build
PORT=3000
npm run server

Building and Running in development mode

Running in development mode allows for any code changes to trigger a restart of Rpanion-server.

Rpanion-server consists of a node.js server running on port 3001 and a React frontend application running on port 3000 in development mode.

In production mode, the React application is rendered statically from the node.js server on port 3001. This can be overidden via setting the PORT environment variable (see rpanion.service for for example).

You can start the server on its own with the command:

npm run server

Run the React application on its own with the command:

npm start

Run both applications together with the command:

npm run dev

At this point, the website will be active at http://<ip of device>:3000

Tests

Unit tests are split into separate commands for the frontend (ReactJS) and backend.

Unit tests can be run with the command:

npm run testback
npm run testfront

Code coverage statistics are automatically calculated for the backend tests.

Linting (via eslint) is available via:

npm run lint

Releasing

Use npx npm-check-updates -u to update nodejs libraries.

Use npm version minor to create a new release.

To produce a disk image from a SD card, insert the card and run ./deploy/create_image.sh.

Running as a Service

To have Rpanion-server running on automatically on boot, there is an included systemd service file.

This can be enabled via:

sudo cp rpanion.service /etc/systemd/system
sudo systemctl enable rpanion.service

rpanion-server's People

Contributors

autonomost avatar auturgy avatar brunoolivieri avatar dependabot[bot] avatar hilarioaraujo avatar lorenzing avatar stephendade avatar tmarkson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rpanion-server's Issues

.bin logger bug

I have a boat with Mosaic-H GPS (outputs gga, rmc, hdt at 10Hz, according to simpleRTK instructions)
when testing indoors the logging looks OK, but when outside and the gps get a fix the .bin logging restarts every 6Kb.
a new file is started and the older ones are gone.

is this a baud rate issue ?
i will try next time to log only the rangefinder and gps.

Is it possible to add support for sound

I hope rpanion can add support for sound, and ROVER can talk through the network, which greatly increases the practicality. Or can you offer some advice, thanks a lot!

Temporary failure resolving 'ports.ubuntu.com'

Raspberry Pi 4 Model B
Ubuntu Server 20.04: https://cdimage.ubuntu.com/releases/focal/release/ubuntu-20.04.5-preinstalled-server-armhf+raspi.img.xz

Err:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe armhf wireguard-tools armhf 1.0.20200513-1~20.04.2
  Temporary failure resolving 'ports.ubuntu.com'
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe armhf wireguard all 1.0.20200513-1~20.04.2
  Temporary failure resolving 'ports.ubuntu.com'
Err:3 http://ports.ubuntu.com/ubuntu-ports focal/universe armhf resolvconf all 1.82
  Temporary failure resolving 'ports.ubuntu.com'
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/universe/w/wireguard/wireguard-tools_1.0.20200513-1~20.04.2_armhf.deb  Temporary failure resolving 'ports.ubuntu.com'
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/universe/w/wireguard/wireguard_1.0.20200513-1~20.04.2_all.deb  Temporary failure resolving 'ports.ubuntu.com'
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/universe/r/resolvconf/resolvconf_1.82_all.deb  Temporary failure resolving 'ports.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Installation Dependencies deprecated and wireless interfaces down

Hello,

I was very excited to see your nice react web UI interface for interfacing with mavlink and flight controller. However, during installation I have run into a few problems.

I am using a Raspberry Pi 4 with Pixhawk 4 and followed the installation instructions at: https://github.com/stephendade/Rpanion-server

In my case, I opted for the manual installation because I already had many programs configured for the computer vision side of things. However, I have been unable to compile mavlink-router from source. It has thrown errors saying my GCC C compiler is not functioning. However, I have compiled and built many other programs before this just fine. Perhaps something specifically wrong with mavlink-router current build?

In hope that I could come back to this, I ran 'npm install' in the rpanion-server directory to get all the main packages for the UI. Unfortunately, many of these packages are deprecated and I was left with a failed installation.

Lastly, when I opted to not continue down this path anymore and rebooted my PI, it is now booting into pi@rpanion and my Wireless interface is no longer found and cannot connect to internet.

Do you have any suggestions / more information I can provide?

Thanks in advance,
Alex

[Feature Request] Add UDP Video Stream to support / qgroundcontrol

could you add udp video stream to support qgroundcontrol.
in my testing udp reduces the latency by upto100ms that the currently only available option in qgroundcontrol is rtsp that works with Rapnion.
the pipeline I've found that works best:
gst-launch-1.0 rpicamsrc bitrate=1000000 ! 'video/x-h264,width=640,height=480' ! h264parse ! queue ! rtph264pay config-interval=1 pt=96 ! udpsink host=10.0.2.243 port=5600

Video of my tests running on a raspberry pi zero w, and QGC on an low spec old i3 laptop

https://docs.qgroundcontrol.com/master/en/SettingsView/General.html#video
https://github.com/mavlink/qgroundcontrol/blob/master/src/VideoReceiver/README.md

Thanks

Pause in shutdown

Rpanion server, when running as a systemd service will delay system shutdown/reboot by a minute or two.

I suspect this has something to do with the cloud upload tab (long running task), but need to confirm.

PX4 compatibility

Hello,

I am trying to use a raspberry pi 4 with rpanion 0.9 to communicate with my cube black running PX4. Currently I have them connected via USB, but despite having the device recognize in the rpanion website hosted in the Pi, I do not get any MAVLINK messages through in the Status tab. I have tried all the baudrates values and I have gotten no results. Although I understand PX4 and Ardupilot are not the same, I thought MAVLINK was a shared standard between the firmwares so I assumed rpanion should work on both. I wanted to ask if maybe there is something obvious that I am missing to get it to work.

Thanks in advanced
José

[Feature Request] Shutdown button

  1. Thank you for this helpful peace of software!!

  2. I think it would be very handy to have the possibility to shutdown the Rpanion via webinterface. Right now I have to login via terminal or have to press the physical button.

Error node_modules/node-mavlink/dist/lib/mavesp.js

I am trying the Rpanion server in Raspberry 4 and LattePanda Delta 3.

When I run the code: npm run testback I receivd 2 errors in the node_modules.

Screenshot from 2023-08-16 13-19-00

Screenshot from 2023-08-16 13-22-39

I have to delete the "?" from node_modules/node-mavlink/dist/lib/mavesp.js and node_modules/@serialport/dist/serialport-mock/index.js to succeed test.

Deploy fails when making gst-rpicamsrc

When doing ./RasPi2-3-4-deploy.sh it fails when making gst-rpicamsrc.

make  all-recursive
make[1]: Entering directory '/home/admin/Rpanion-server/modules/gst-rpicamsrc'
Making all in src
make[2]: Entering directory '/home/admin/Rpanion-server/modules/gst-rpicamsrc/src'
make  all-am
make[3]: Entering directory '/home/admin/Rpanion-server/modules/gst-rpicamsrc/src'
  CC       libgstrpicamsrc_la-gstrpicam-enum-types.lo
In file included from gstrpicam-enum-types.c:6:
gstrpicam_types.h:1:10: fatal error: interface/mmal/util/mmal_util_params.h: No such file or directory
    1 | #include "interface/mmal/util/mmal_util_params.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:492: libgstrpicamsrc_la-gstrpicam-enum-types.lo] Error 1
make[3]: Leaving directory '/home/admin/Rpanion-server/modules/gst-rpicamsrc/src'
make[2]: *** [Makefile:375: all] Error 2
make[2]: Leaving directory '/home/admin/Rpanion-server/modules/gst-rpicamsrc/src'
make[1]: *** [Makefile:408: all-recursive] Error 1
make[1]: Leaving directory '/home/admin/Rpanion-server/modules/gst-rpicamsrc'
make: *** [Makefile:340: all] Error 2

My OS:

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye

Would be great if there is a fix for this.
I also saw that gst-rpicamsrc is now build into GStreamer from 1.18. Could this be used perhaps? Willing to make a PR if you point me in the right direction.

Video streaming settings

I've just tested out the new release. A lot of improvements!
But for the streaming section both resolution and UDP IP address reset to default at every start up. I tried to set my own values and reboot as the 0.8 guide says but it did not work.

Installation failed

Running ./RasPi2-3-4-deploy.sh it got quite far and then ended with:

The following NEW packages will be installed:
  libc-ares2 libjs-highlight.js libnode72 nodejs nodejs-doc
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.9 MB of archives.
After this operation, 47.9 MB of additional disk space will be used.
Ign:1 http://deb.debian.org/debian bullseye/main arm64 libc-ares2 arm64 1.17.1-1+deb11u1
Err:2 http://security.debian.org/debian-security bullseye-security/main arm64 libnode72 arm64 12.22.12~dfsg-1~deb11u3
  Temporary failure resolving 'security.debian.org'
Ign:3 http://deb.debian.org/debian bullseye/main arm64 libjs-highlight.js all 9.18.5+dfsg1-1
Err:4 http://security.debian.org/debian-security bullseye-security/main arm64 nodejs arm64 12.22.12~dfsg-1~deb11u3
  Temporary failure resolving 'security.debian.org'
Ign:5 http://security.debian.org/debian-security bullseye-security/main arm64 nodejs-doc all 12.22.12~dfsg-1~deb11u3
Err:3 http://deb.debian.org/debian bullseye/main arm64 libjs-highlight.js all 9.18.5+dfsg1-1
  Temporary failure resolving 'deb.debian.org'
Err:1 http://deb.debian.org/debian bullseye/main arm64 libc-ares2 arm64 1.17.1-1+deb11u1
  Temporary failure resolving 'deb.debian.org'
Err:5 http://security.debian.org/debian-security bullseye-security/main arm64 nodejs-doc all 12.22.12~dfsg-1~deb11u3
  Temporary failure resolving 'security.debian.org'
E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/c/c-ares/libc-ares2_1.17.1-1%2bdeb11u1_arm64.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/h/highlight.js/libjs-highlight.js_9.18.5%2bdfsg1-1_all.deb  Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/n/nodejs/libnode72_12.22.12%7edfsg-1%7edeb11u3_arm64.deb  Temporary failure resolving 'security.debian.org'
E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/n/nodejs/nodejs_12.22.12%7edfsg-1%7edeb11u3_arm64.deb  Temporary failure resolving 'security.debian.org'
E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/n/nodejs/nodejs-doc_12.22.12%7edfsg-1%7edeb11u3_all.deb  Temporary failure resolving 'security.debian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
andy@raspberrypi:~/Rpanion-server/deploy $ uname -a
Linux rpanion 6.1.19-v8+ #1637 SMP PREEMPT Tue Mar 14 11:11:47 GMT 2023 aarch64 GNU/Linux

This is on a CM4

Rework camera GUI

A few updates to the Camera page:

  • Re-work options to "RTSP" and "RTP" to make streaming method more clear
  • Add a test camera source for debugging and unit tests
  • Add Mission Planner connection string for RTP streaming

[Info] Raspberry pi alternative -- Rpanion running on Libre Computer Le Potato

Since Raspberry Pi are expensive and hard to obtain, I can mention that Rpanion is running well on Le Potato, 2 GB RAM version.

Rpanion was an easy setup -- thanks for the effort Steven! This one is using Wireguard via 4G USB modem.

It's about $40 via Amazon Prime here in USA. The product page is here:
https://libre.computer/products/aml-s905x-cc/

This one is using Bullseye for the s905 chip, you can get the OS image.
Initial setup with a monitor+keyboard. Setup info here
https://distro.libre.computer/ci/raspbian/11/2023-05-03-raspbian-bullseye-arm64%2Baml-s905x-cc.img.xz

CPU average 0.5 on a quad core while streaming UDP and TCP.

Funny enough, a Raspi 4 and Le Potato weigh less than a Pi zero 2 with power hat and USB OTG cable.

Note: the Rpanion user was not allowed to access the serial device. I see the npm service user is root, which owns the serial device. A quick fix was to add a udev rule for that serial device to chmod 666 the serial device. Now the permission is updated after boot and Rpanion automatically starts serving telemetry. Really great!

image

[Feature Request] Free space

It would be nice to see how much free disk space is left on the Rpanion-server. If I have to remove some older log files or it's safe to go.

[Feature Request] VPN web interface

Hello,
hoping to propose something useful for other users, I wanted to ask if you can insert a VPN page in the web interface.
As a vpn client I use vpnc which to work takes data from /etc/vpnc/rpanion.conf within which they must be specified:

IPSec gateway myhost.net
IPSec ID vpn_user
IPSec secret TANrpS1y34hHHJGIS4
IKE Authmode psk
Xauth username vpn_user
Xauth password <passwort>
local port 0
DPD idle timeout (our side) 0

The tunnel test command are:
sudo vpnc rpanion.conf
To stopping tunnel:
sudo vpnc-disconnect

If you could edit the values of this file in the web interface it would be very convenient for me without having to connect with ssh.
I have also seen that several people use Zero-Tier and you could also enter for them in this page the possibility to put their NETWORKID.

I insert a sample to explain myself better, taking inspiration from a service that already exists:
sample

Thank you so much anyway, Lorenzo.

Add Ubuntu install scripts

Many users are running Ubuntu20 on the Rpi, as it's more compatible with ROS.

Install process is slightly different that for Raspian though.

From initial experiments, need sudo apt install libxml2-dev libxslt-dev python-is-python3

Raspberry zero2 connected to the internet via LTE usb stick but no connection.

I have a raspberry zero2 where I have installed the latest release of Rpanion.
The Hardware configuration is raspberry zero2 connected to the internet via a Huawei HiLink LTE stick and Zerotier vpn network.

The strange problem that I have identified is that the raspberry connects to the internet, it configures the Zerotier network correctly but I can access the connection only if I access the raspberry directly via wifi (both in AP mode or via Wifi router).

I can confirm that Zerotier configures correctly and that the LTE stick works as the Zerotier page is updated with the last access (Wifi disconnected) and if I connect to the Raspberry in AP, I can use the VPN address to access the configuration page.
Is there something I'm doing wrong or am I missing?
Thanks for help.

System stats

Add warning when system temperature, voltage or averaged CPU exceeds limits.

This would allow users to diagnose some stability issues, especially when running video streaming

Rpanion Login

Hi,

After installing and working properly ardupilot software, I installed the rpanion server through ssh. Then, the system was rebooted. After, I couldn't reach the raspberry pi again.

Then, I connected to a micro HDMI cable and monitor to see what was going on there. The system requested me to enter login credentials. There was a statement that said The hotspot has the SSID "rpanion" and password "rpanion123". However, I believe this is for wifi. What are the login credentials?

https://ibb.co/ftz1Xb8

Also, I couldn't use my keyboard to type the credentials, normally I could use it. Thanks.

Feature request: Add possibility to enable/set listening TCP port of mavlink router

It would be awesome to be able to enable/set the listening port of the mavlink-router.

This would be required in a scenario where to GCS wants to connect via WLAN network directly to the mavlink network.

GCS -> TCP (over WLAN) -> Rpanion-server

Please let me know if I got something wrong in the architecture and it is not intended to use it this way.
For now I got it working by changing the line with the desired port:

var cmd = ['-e', '127.0.0.1:14540', '--tcp-port', '0']

Is the TLOG generation broken?

Hello :-)

I have been having problems with the TLOGS. I think TLOGS are being generated without GPS coordinates inside Rpanion.

Initially, it seemed like an intermittent thing. At the moment, it is more common to have no GPS data on them than to have the data correctly entered. This problem causes the KMZ to be generated broken.

The BIN logs taken directly from the flight controller show the flights performed correctly.

I made a set of repeat flights and joined the specific binlogs, tlogs and kmz: https://drive.google.com/file/d/14MBc0TJDwMZ1bEXylL6Cyf7xclrfh0Lf/view?usp=share_link

Can you please help me?

Adhoc Wifi does not ask for a gateway

In addition to not saving the configuration between boots, the ad hoc network does not ask for a gateway. I find it very useful to have a gateway to share the internet between nodes.

Here I do it there by /etc/network/interfaces

HOW to connect WWW by wifi?

I see that your document only has WiFi hotspots,
but WiFi hotspots allow other devices to connect to you.
I want to send the video stream to my server, so I definitely want Raspberry Pi to connect to www.
Your document did not introduce it.

arm64 support

hi

I am currently trying to build from source on raspbian light (64-bit) but am having issues getting past install. Is this something that can be done or is it limited to 32-bit installs?

node server exit: [nodemon] clean exit - waiting for changes before restart

pi3b+ flash Rpanion-Server-0.7.0-RasPiOS.img.xz.
The '/usr/bin/node /home/pi/Rpanion-server/server' work well.
Normal processes list:
pi@rpanion:~ $ ps -Af|grep node
pi 438 390 0 17:17 ? 00:00:00 sh -c node-env-run server --exec nodemon | pino-colada
pi 439 438 0 17:17 ? 00:00:02 node /home/pi/Rpanion-server/node_modules/.bin/node-env-run server --exec nodemon
pi 440 438 0 17:17 ? 00:00:01 node /home/pi/Rpanion-server/node_modules/.bin/pino-colada
pi 541 439 3 17:17 ? 00:00:09 node /home/pi/Rpanion-server/node_modules/.bin/nodemon /home/pi/Rpanion-server/server
pi 554 541 2 17:17 ? 00:00:08 /usr/bin/node /home/pi/Rpanion-server/server
pi 858 825 0 17:22 pts/2 00:00:00 grep --color=auto node

But node server cannot work after the steps:

  1. cd Rpanion-server
  2. git pull (update master branch)
  3. ./deploy/RasPi2-3-4-deploy.sh

Logs:
-- Logs begin at Sun 2021-12-05 16:46:56 GMT, end at Mon 2021-12-06 14:28:46 GMT. --
Dec 05 16:47:00 rpanion systemd[1]: Started Rpanion Server Service.
Dec 05 16:47:04 rpanion npm[399]: > [email protected] server /home/pi/Rpanion-server
Dec 05 16:47:04 rpanion npm[399]: > node-env-run server --exec nodemon | pino-colada
Dec 05 16:47:07 rpanion npm[399]: [nodemon] 2.0.15
Dec 05 16:47:07 rpanion npm[399]: [nodemon] to restart at any time, enter rs
Dec 05 16:47:07 rpanion npm[399]: [nodemon] watching path(s): .
Dec 05 16:47:07 rpanion npm[399]: [nodemon] watching extensions: js,mjs,json
Dec 05 16:47:07 rpanion npm[399]: [nodemon] starting node /home/pi/Rpanion-server/server
Dec 05 16:47:10 rpanion npm[399]: [nodemon] clean exit - waiting for changes before restart

//failure processes list:
pi@rpanion:~/Rpanion-server $ ps -Af|grep node
pi 426 399 0 14:26 ? 00:00:00 sh -c node-env-run server --exec nodemon | pino-colada
pi 427 426 0 14:26 ? 00:00:01 node /home/pi/Rpanion-server/node_modules/.bin/node-env-run server --exec nodemon
pi 428 426 0 14:26 ? 00:00:00 node /home/pi/Rpanion-server/node_modules/.bin/pino-colada
pi 451 427 0 14:26 ? 00:00:04 node /home/pi/Rpanion-server/node_modules/.bin/nodemon /home/pi/Rpanion-server/server
pi 811 769 0 14:33 pts/1 00:00:00 grep --color=auto node

0.9.5 To-do List

V0.9.5 will be primarily a bug-fix release. Aiming for release in mid-2023

  • Adhoc Wifi does not persist across reboots
  • Ubuntu: Migrate from 20.04 to 22.04
  • Use new Ras Pi libcamera API for video streaming
  • Username/password protection Requires significant refactor ... so leaving this for a future version
  • 64-bit support
  • More help text
  • Default to hotspot if no saved Wifi networks in range
  • Hardware x264 acceleration for v4l2 sources
  • Wireguard VPN shows unknown for working connections
  • Need refresh on networking display. Not always latest
  • Slow shutdown on Ubuntu ~90sec.
  • Network connections don't show up quite right on Ubuntu
  • Add support for CSI cameras on Jetson
  • Ubuntu 20 appears to have lost CSI camera

[Feature Request] add option to stream video from IP camera

Good afternoon. It would be interesting to add the ability to stream from the IP camera.
Like ZR10 http://en.siyi.biz/en/Gimbal%20Camera/
I try simple IP camera which i have at this moment (https://www.xiongmaitech.com/en/index.php/product/product-detail/185/187/413) with zerotier and get it work. But probably not as beautiful as we would like
What i do.

  1. Connect IP camera over Ethernet cable to ETH port in RPI. IP address camera 192.168.144.25, RPI ETH 192.168.144.1
  2. Install Zerotier VPN on both sides and add route to 192.168.144.0/24 subnet via Zerotier's address RPI
  3. sudo sysctl -w net.ipv4.ip_forward=1 on RPI
  4. now i have access to 192.168.144.25 from Zerotier tunnel

Maybe there is a more elegant solution?

USB-Connection not working anymore

Hey Steven, I'm currently building a solar-drone and found your software very useful. I managed like 3 months ago to connect my MATEK-h743 over Its usb-c port to the usb-A-3 port of my raspberry pi.
Then I was able to connect with rpanion-server to the flight controller, and mission-Planner to the controller. But I just can't connect anymore. I tried for 6h+ and did every thing I could imagine. I would be very thankful for your support.

My best guess:
With updates of rasbianOS, path of usb-serial-connections moved to folder /dev/bus/usb
image

Latest update of rpanion-server: 10/08/2023

What I tried:

  • Bad usb-cable (mine works with windows + mission-planner directly)
  • Every baud rate with mavlink 1 + 2
  • manually triggering Serial-modules-install
  • Booting matek-h743 in boot-mode

rtsp-server.py cause raspberry 3B+ in low power status, and raspberry power led will not show red light

Do you know how to fix this issue?
rtsp-server.py cause raspberry 3B+ in low power status, and raspberry power led will not show red light.
Enable rtspserver by command:
pi@rpanion:~/Rpanion-server $ python3 python/rtsp-server.py --fps 30 --bitrate 1000
Server available on rtsp://:8554/video
Use: gst-launch-1.0 rtspsrc location=rtsp://:8554/video latency=0 ! queue ! decodebin ! autovideosink
Where IP is ['127.0.0.1', '10.0.2.100', '192.168.100.53', '172.16.2.87']
( v4l2src device=/dev/video0 ! videorate ! video/x-raw,width=640,height=480,framerate=30/1 ! videoflip video-direction=identity ! videoconvert ! video/x-raw,format=I420 ! queue max-size-buffers=1 name=q_enc ! x264enc tune=zerolatency bitrate=1000 speed-preset=superfast ! rtph264pay name=pay0 pt=96 )
0:00:00.705685812 1863 0xa5b580 FIXME rtspmedia rtsp-media.c:3835:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:00:00.960965995 1863 0xa5b580 FIXME rtspmedia rtsp-media.c:3835:gst_rtsp_media_suspend: suspend for dynamic pipelines needs fixing
0:00:00.961067870 1863 0xa5b580 WARN rtspmedia rtsp-media.c:3861:gst_rtsp_media_suspend: media 0x753471b0 was not prepared
0:00:01.069696708 1863 0xa5b580 FIXME rtspclient rtsp-client.c:1646:handle_play_request:GstRTSPClient@0xb52880 Add support for seek style (null)
0:00:01.070511914 1863 0xa5b580 FIXME rtspmedia rtsp-media.c:2434:gst_rtsp_media_seek_full:GstRTSPMedia@0x753471b0 Handle going back to 0 for none live not seekable streams.
0:00:01.217349300 1863 0xa5caf0 WARN v4l2src gstv4l2src.c:976:gst_v4l2src_create: lost frames detected: count = 8 - ts: 0:00:00.693334185
0:00:01.455076454 1863 0xa5caf0 WARN v4l2src gstv4l2src.c:976:gst_v4l2src_create: lost frames detected: count = 4 - ts: 0:00:00.930715111
......

Check the CPU usage find the pid 1863 it's run rtsp-server.py high cpu usage about 170%
pi@rpanion:~ $ top
.....
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1863 pi 20 0 178160 30232 14584 S 170.2 3.4 1:02.77 python3

V 0.9 to do list

This list will track the to-be-completed features/fixes for V0.9:

  • Add VPN interface
  • Cloud upload of logs and other files
  • Multi-camera streaming
  • Option to add username/password login to Rpanion
  • Wifi scanning for easy adding of networks
  • Default to hotspot if no saved Wifi networks in range
  • In hotspot mode, automatically add each dhcp client as a UDP endpoint for telemetry
  • Better explain that UDP endpoints are the remote address
  • Add way for users to add publickeys for cloud upload
  • Show current pubkey for easy copy/pasting to cloud storage
  • Allow firmware upload - both custom and standard firmwares
  • Rpanion updater for both stable and github latest
  • Add help section
  • Rework wifi network to "Connect to Wifi network" and "Create hotspot"
  • Add flight controller output to udp broadcast to network

Sending NTRIP data to PixHawk using Rpanion-server

I have a Raspberry Pi companion computer working with a PixHawk.

Would it be possible to add an NTRIP component to the Rpanion project?

Or can we use the Rpanion server's MAVlink connection to send correction signals from an NTRIP (client on the Pi) to the PixHawk

.bin log file missing information

Hi,
I'm using the Flight Logs feature to record the Bin logs from the ardupilot AP (H743 mini board, serial 2 port connect to a Pi Zero 2, baudrate 921000). I've changed the LOG_BACKEND_TYPE to 3 (File and MAVLink), LOG_BITMASK was 65535 and got the log files in the Pi. However, the log files seem to have only full data of information that I had displayed on the ground station screen (in this case are the range finder and battery info). Other information such as raw GPS data, IMU,.. etc were missing or having very little information (4-5 data point only). Here is a log sample: https://1drv.ms/u/s!AuE6w7rDGjlugtxiouMWLMdMPMxSFA?e=HEzPwS
image

Is there any step in setting I am missing to be able to have the full information data log?
Thanks in advance!

SSID Network Names issues

A very minor issue... Rpanion can't connect to WiFi that has space on their name. For example, it will not connect to "Pixel 3" and return "<3> unknown parameter". Of course, "Pixel3" works perfectly.

how to swarm

I want swarm drone, how connet long distance。

“Adhoc Wifi Config” issues

I'm testing this program in my laptop, and when I tryied to start a AP hotpot, some error occurs:
1."Error: Error for wireless request "Set Encode" (8B2A) : SET failed on device wlp3s0 ; Invalid argument."
when I set "security" to web and set a password,the error will appear and the hotpot con't work.
2.I can't connect the hotpot when it's "security" is none
I tried to connect with my own phone,but I was refused to connect .

[Eachine ROTG01] UVC usb input incompatibility

Currently using server as man in the middle with telemetry radio and video receiver connected via usb.

Having problems with this device: Eachine ROTG01 UVC
No problems with common usb camera.

USB device is detected and can be selected on video streaming configuration.
No resolution options are shown.
Once video streaming is enabled a blank web page is presented (deviceIP:WebPort/video) and upon refresh streaming was not enabled.

Any idea what to look for?

Using Arch Linux:

Can open video (/dev/video) stream on VLC:

    Codec: Motion JPEG Video (MJPG)
    Video resolution: 640x480
    Frame rate: 60
    Decoded format: Planar 4:2:2 YUV full scale
    Color space: ITU-R BT.601 Range

Can identify USB configuration reporting "UVC non compliance - GET_DEF(PROBE) not supported":

    dmesg:
            [   87.663156] usb 2-3: new high-speed USB device number 2 using xhci_hcd
            [   87.982784] usb 2-3: New USB device found, idVendor=18ec, idProduct=5850, bcdDevice= 1.00
            [   87.982793] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
            [   87.982797] usb 2-3: Product: USB2.0 PC CAMERA
            [   87.982801] usb 2-3: Manufacturer: ARKMICRO
            [   87.984270] uvcvideo: Found UVC 1.00 device USB2.0 PC CAMERA (18ec:5850)
            [   87.993717] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
            [   87.994544] uvcvideo 2-3:1.0: Entity type for entity Processing 2 was not initialized!
            [   87.994556] uvcvideo 2-3:1.0: Entity type for entity Camera 1 was not initialized!
            [   87.994918] input: USB2.0 PC CAMERA as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/input/input23
            [   88.695167] usb 2-3: 3:1: cannot get freq at ep 0x82
            [   88.699427] usb 2-3: Warning! Unlikely big volume range (=11903), cval->res is probably wrong.
            [   88.699443] usb 2-3: [2] FU [Mic Capture Volume] ch = 2, val = 384/12287/1
            [   88.699901] usbcore: registered new interface driver snd-usb-audio
            [   88.776906] usb 2-3: 3:1: cannot get freq at ep 0x82
            [   88.781502] usb 2-3: 3:1: cannot get freq at ep 0x82

[Feature Request] Allow (multible) and different sources

If it would be possible to have different sources for the mavlink stream you could use it as "mavlink broker".
Scenario:

  1. drone with "Rpanion-server" is connected to "Rpanion-server(broker)". long range via VPN, short range via Wifi.
  2. Different Devices (PC/Tablet/...) with GCS are connected to "Rpanion-server(broker)"

This is my current setup which I have realised with mavlinkproxy, without your nice GUI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.