stephendade / Rpanion-server

Web-based configurator for companion computers of MAVLink vehicles
https://www.docs.rpanion.com/software/rpanion-server
GNU General Public License v3.0
138 stars 61 forks source link

Video: Basic implementation of MAVLink camera protocol #217

Closed ddd999 closed 3 months ago

ddd999 commented 5 months ago

Adds a MAVLink heartbeat output for the attached camera device, and adds the ability to send CAMERA_INFORMATION messages when requested.

Also includes improvements for better handling undefined parameters for sendCommandAck() and sendHeartbeat()

This completes a basic implementation of feature request #169.

stephendade commented 5 months ago

Thanks! I should have some time in the next few days to review.

stephendade commented 5 months ago

Only major issue I'm seeing is that the "Enable camera heartbeats" (and streaming is active) checkbox doesn't remain ticked if I refresh the Video Streaming page. Perhaps the value isn't getting passed through correctly?

ddd999 commented 4 months ago

I am seeing the same thing but really can't figure out why. As far as I can tell, the camera heartbeat setting is being saved and retrieved the exact same way as the timestamp setting, but only the heartbeat setting isn't getting retrieved properly. If you have time to take a closer look at the code, another pair of eyes would be much appreciated.

stephendade commented 4 months ago

I've added in a comment for fixing the non-appearing-checkbox.

One other thing, you'll need to move the Video streaming service to below the UDP IP/port options in ./src/video.js, as the user may get confused when RTP mode is selected.

ddd999 commented 4 months ago

I've added in a comment for fixing the non-appearing-checkbox.

One other thing, you'll need to move the Video streaming service to below the UDP IP/port options in ./src/video.js, as the user may get confused when RTP mode is selected.

Both of these things should be fixed in the latest commit. Thanks for your help!

stephendade commented 4 months ago

Found another issue - the "Video source IP Address" doesn't appear to saved. It goes back to 127.0.0.1 whenever I refresh the page (with streaming active).

ddd999 commented 3 months ago

Found another issue - the "Video source IP Address" doesn't appear to saved. It goes back to 127.0.0.1 whenever I refresh the page (with streaming active).

That should be fixed now.

There are a couple of other slight changes in the latest commit, to comply with the expected behaviour based on the MAVLink documentation.

When RTP streaming is selected:

I noticed that Mission Planner recognizes the VIDEO_STREAM_INFORMATION message, and asks if you want to connect to the RTSP stream, which worked correctly when I tried it. MP seems to only ask this the first time it receives a message, though. It also doesn't appear to do this when the stream type is RTP.

stephendade commented 3 months ago

Looks good! Merging...