dronekit / dronekit-sitl

SITL runner for DroneKit.
120 stars 112 forks source link

Solution also install and run mavproxy? #20

Open hamishwillee opened 9 years ago

hamishwillee commented 9 years ago

The example suggests you first run

dronekit-sitl copter-3.4-dev -I0 -S --model quad --home=-35.363261,149.165230,584,353

Then

mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551

This second call only works if you've installed mavproxy. It would be much simpler for users if mavproxy were automatically installed and this command was run by the dronekit-sitl-runner. I imagine that might not be too hard for linux/mac because you could make mavproxy a dependency of the dronekit-sitl runner package?

On windows manual installation of all the mavproxy dependencies is a pain so typically we use the installer version. However I'm not sure how you would pass the second line above to that installer version of mavproxy.

@tcr3dr @TShapinsky - would appreciate your thoughts.

tcr3dr commented 9 years ago

@hamishwillee So my question for you is, in what situations is UDP needed instead of just TCP?

If a UDP connection is useful in any situation dronekit-sitl is, I believe that dronekit-sitl can simply create a TCP->UDP tunnel. This would be extremely simple to author in Python without a whole MAVProxy dependency, provided this is the only additional functionality to the SITL runner we want. I believe it won't conflict with using TCP by choice.

hamishwillee commented 9 years ago

@tcr3dr The MAVProxy UDP functionality is useful because it makes it easy to set up multiple GCS connections on the network - for example you can set up MAVProxy and Mission Planner watching SITL at the same time (or Tower if you like, too).

Personally I have found this useful while testing, and it is familiar enough to users that Mission Planner and APM Mission Planner 2 both have UDP and port 14550 set as their default configuration. How much of a requirement this is for other developers I don't know.

One reason I suggested MAVProxy approach is that I know we will have to install it anyway and we haven't got a really good way of doing that in a Python command prompt on Windows. Currently we can use the installer version which is very much "preconfigured" or we can use WinPython. I'd much rather have it all installed in my ActiveState Python as part of installing dronekit. In other words, trying to sort out a "bigger picture" problem - but maybe that is not worth the cost.

You would be far better positioned than me to make a good decision on whether implementing in the SITL runner is the right approach.