Emulated companion computer and SITL

I’m looking for a tutorial or a documented procedure for emulating a companion computer and having it talk to a SITL vehicle.
I.E: I want to MAVLink messages to be sent by a program or Python script on my PC to the SITL.

Any program running on a PC sending mavlink messages to the SITL instance will emulate a companion computer (the connection is most likely through a UDP port in this case rather than a serial port, but aside from that the set up is the same). The pymavlink library (GitHub - ArduPilot/pymavlink: python MAVLink interface and utilities), has the tools to encode, send, receive and decode messages. The MAVProxy ground control software uses this library extensively (MAVProxy — MAVProxy documentation).

1 Like

Can you please point me to a specific example where they use the UDP port you mentioned in conjunction with pymavlink to emulate a companion computer ?