osrf / uctf

Unmanned Capture the Flag (U-CTF) project.
Apache License 2.0
24 stars 10 forks source link

Ardupilot performance tips #50

Open khancyr opened 7 years ago

khancyr commented 7 years ago

Hi! @tfoote

For performance on ardupilot, I recommand you to not use mavproxy but directly use the binary with console param as you are already using mavros and QGC to control the uav. ex : /home/khancyr/Workspace/ardupilot/build/sitl/bin/ardurover -S -I1 --home -35.363261,149.165230,584,353 --model rover --speedup 1 --defaults /home/khancyr/Workspace/ardupilot/Tools/autotest/default_params/rover.parm --console 2>&1 > /dev/null

(redirect ouput to garbage otherwise you get all garbage )

This will prevente mavrpoxy and python to slow down everything. Moreover, using speedup parameter doesnt works well with mavproxy, as mavprox isn't speeding up. So you with -S10 you send hearthbate 10th per second and mavproxy only catch and respond once per second, so you will be at failsafe limit. Nevertheless I don't know if mavros or QGC got the same limitations.

tfoote commented 7 years ago

Thanks for the suggestion on the speedup. I'd noticed that with it enabled I could actually run gazebo at higher than realtime up to the speedup parameter. But if it may cause timeouts, I'll drop it down or out as running above realtime is not a priority for development now.

Can the autopilot natively send mavlink messages? I was under the impression that mavproxy connected to the autopilot and then provided the mavlink interface with which then mavros exposed at ROS interface on top of. Dropping a layer of the abstraction would be great, with a large number of drones the overhead of the many processes adds up quickly.

khancyr commented 7 years ago

Of course it can! otherwise it couldn't fly ^^ ! But I can't make it works with --console param. Without it wait a connection on tcp port 5760, 5761, 5762 that are uart simulated. So connection mavros directly on that works a launch everything !

khancyr commented 7 years ago

BTW I rebase multi-sitl branch on master and make some correction, like for in address that mustn't be the same that gazebo address , but I see you also found this wrong and already correct it on gazebo !