Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make application independent of (but still compatible with) MAVProxy #26

Open
SamuelDudley opened this issue Sep 27, 2017 · 14 comments
Open

Comments

@SamuelDudley
Copy link
Member

Currently MAVProxy is used to generate the JSON messages which drive the display. MAVProxy is also used for communicating back to the autopilot, WP and fence management.

Ideally this application could be made stand alone to interact with the autopilot directly.

@SamuelDudley
Copy link
Member Author

This would help support a wider range users including those using PX4 #23

@SamuelDudley
Copy link
Member Author

One idea is to have a TCP / UDP connection come into the server, parse the MAVLink there and then push the parsed data over the websocket. If I make use of python3 the process can be asynchronous.

@ryanjAA
Copy link

ryanjAA commented Sep 30, 2017

This is really great! Standalone and/or PX4 support would open up a lot of ideas with this. Great work!

@SamuelDudley
Copy link
Member Author

I have pushed a minimal stand alone functionality with f0c946c .
By running /app/cesium_web_server.py directly you can launch the MAVCesium server and consume a MAVLink stream independent of MAVProxy.

@tdrone993
Copy link

Failed to use config file at /home/flight/MAVCesium/app/mavcesium_default.ini : ConfigParser instance has no attribute 'read_file'
Traceback (most recent call last):
File "cesium_web_server.py", line 13, in
from config import SERVER_INTERFACE, SERVER_PORT, APP_SECRET_KEY, WEBSOCKET, BING_API_KEY, APP_DEBUG, APP_PREFIX
ImportError: cannot import name SERVER_INTERFACE
Latest configparser on 14.04

@SamuelDudley
Copy link
Member Author

Thanks for testing. I'll see if I can reproduce. Did you clone the repo directly or install with MAVProxy?
Thanks!

@tdrone993
Copy link

Figured it out. Meant to remove it sorry. It's working like a charm!

@SamuelDudley
Copy link
Member Author

Great! Connected to software in the loop? Basically there are two ways forward to extend the stand alone functionality:

  1. Expand the server code to handle the mavlink processing (basically what MAVProxy already does)
  2. Process the incoming MAVLink stream in the browser directly

Because 1 already exists in some form I'm going to push on with option 2 and see how hard it it to build a GCS in a browser...

@tdrone993
Copy link

Yea, actually forwarded from my PC to the server. Option 2 sounds good. I was looking at a way to build a clone of dji's flighthub today for mavlink based craft but it less advanced then mavcesium! they seem to support 4 craft. Did u ever get to work on the video stuff?

@fnoop
Copy link
Member

fnoop commented Nov 30, 2017

This is great, it would be really nice to take a config file as an argument, so we can launch multiple copies.

@SamuelDudley
Copy link
Member Author

SamuelDudley commented Nov 30, 2017

For multi-aircraft viewing? By forgoing the single drone limitation of MAVProxy it will be pretty simple to add any number of aircraft into the MAVCesium world to view at the same time. Doing one connection per aircraft would be pretty simple, or a single connection and change the drone model depending on the system ID.

@fnoop
Copy link
Member

fnoop commented Nov 30, 2017

No, so you can run multiple copies of mavcesium on the same computer, ie one for SITL and one for the flight controller. If that can be done within a single instance of mavcesium, cool.
ps - this is a real optional-would-be-maybe-nice-to-have.

@SamuelDudley
Copy link
Member Author

Understood. In that case you would probably want the two separate instances of the server rather than the shared world I was getting at.
I appreciate the ideas!

@sky4D
Copy link

sky4D commented Jul 9, 2018

@SamuelDudley Amazing work! But how can I run it in offline mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants