ardupilot_wiki icon indicating copy to clipboard operation
ardupilot_wiki copied to clipboard

dev sitl-simulator-software-in-the-loop: update illustration

Open vierfuffzig opened this issue 6 years ago • 13 comments

implements #1432 ping @khancyr

vierfuffzig avatar Jun 02 '19 08:06 vierfuffzig

Hello, thank for trying to fix this. But the new version is not true. We don't have udp connexion between sitl default backend and SITL vehicle code ... I got new illustration for SITL, I need to find some time to submit them

khancyr avatar Jun 02 '19 08:06 khancyr

thanks @khancyr maybe just up and link your image somwhere and i'll submit and PR to wiki if that helps?

vierfuffzig avatar Jun 02 '19 10:06 vierfuffzig

Hi @kd0aij

Did you find the illustration?

If not, please, which UDP connection is not correct? Could you point here on http://www.olivieri.com.br/downloads/ArdupilotSoftwareintheLoopSITL.jpg ?

brunoolivieri avatar Aug 20 '19 12:08 brunoolivieri

Did you mean me?

On Tue, Aug 20, 2019, 06:28 Bruno Olivieri [email protected] wrote:

Hi @kd0aij https://github.com/kd0aij

Did you find the illustration?

If not, please, which UDP connection is not correct? Could you point here on http://www.olivieri.com.br/downloads/ArdupilotSoftwareintheLoopSITL.jpg ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ArduPilot/ardupilot_wiki/pull/1764?email_source=notifications&email_token=AARRSPLMUM3RIYNEMMFFQC3QFPPNPA5CNFSM4HSCEPTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4WDMII#issuecomment-522991137, or mute the thread https://github.com/notifications/unsubscribe-auth/AARRSPP3DYCSUGDVK3PJKLLQFPPNPANCNFSM4HSCEPTA .

kd0aij avatar Aug 20 '19 22:08 kd0aij

My bad! Sorry @kd0aij

I mean @khancyr , please, which UDP connection is not correct? Could you point here on http://www.olivieri.com.br/downloads/ArdupilotSoftwareintheLoopSITL.jpg ?

brunoolivieri avatar Aug 20 '19 22:08 brunoolivieri

@khancyr was referring to the edges for port 5502 and 5501.

ArduPilot sends to JSBSim on port 5505 and received on 5504 (https://github.com/ardupilot/ardupilot/blob/master/libraries/SITL/SIM_JSBSim.cpp#L63)

SIM_Aircraft and friends are not currently external to ArduPilot - we interact in a rather more direct manner with them.

ArduPilot sends directly to FlightGear on port 5503

I've no idea what the extra 5501 edge is from "mavproxy on telemetry port" to ArduCopter.

Having the port 14550 coming from the MAVProxy on port 5763 is quite possibly the case - but most of the time it would be from a MAVProxy on 5760.

Having the source ports and destination ports present in these diagrams may not be accurate - I'd have to research a bit to determine that (so I suggest they could stay at least in the short term).

There are several interesting bits missing, too - where our newer simulation backends plug in, for example.

peterbarker avatar Sep 09 '19 06:09 peterbarker

Another thing, just pointing it out, most of the newer SITL interfaces (at least all the ones implementing the set_interface_ports function) use ports 9001 & 9002 by default https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL_SITL/SITL_cmdline.cpp#L184

There's also no block in the current illustration where the external Physics engine will connect to the SITL backend in Ardupilot I think the "Physics Simulation" block should actually be the "Physics Engine" and the SIM_Aircraft.cpp, SIM_Multicopter.cpp can be moved to the ArduCopter.elf block

rajat2004 avatar Sep 09 '19 06:09 rajat2004

Thanks!

So it is not just a matter of a small cut/paste. I will try to create something from zero and propose.

brunoolivieri avatar Sep 10 '19 22:09 brunoolivieri

This one might be interesting - https://github.com/ArduPilot/ardupilot_wiki/issues/911

rajat2004 avatar Sep 11 '19 05:09 rajat2004

I will provide some graph I have already done tomorrow.

khancyr avatar Sep 11 '19 20:09 khancyr

Thanks!

brunoolivieri avatar Sep 11 '19 20:09 brunoolivieri

@khancyr Pierre, still waiting on the graph...

Hwurzburg avatar Nov 04 '19 04:11 Hwurzburg

The long awaited graph would indeed be helpful but may be there is a more direct answer to the problem I am dealing with:

I am trying to implement an upgrade for ArduPlane SITL with Jsbsim and Flightgear. The improved feature is visible moving control surfaces during the SITL simulation and some added RC channels.,I went as far as making it work but then somehow the terrain interaction broke: the aircraft initiates below the terrain.

Here is a link to the thread explaining better what I have done:

https://discuss.ardupilot.org/t/sitl-sim-vehicle-py-aircraft-starts-below-terrain/58369.

Any insight will be greatly appreciated.

albcem avatar Jun 29 '20 14:06 albcem