How To Send Mavlink Commands To SITL

Hello,

I am trying to figure out how I can send mavlink commands to my SITL environment.  I have SITL running on my linux mint VM and I have my own python code generated from mavgen.py which decoded the mavlink messages from SITL.

My SITL experiment is just a generic copter in a loop going to 5 different geo points.  I have a separate script that sends out LAND commands or SETMODE commands which does work on my real drone.  I am just trying to get my SITL environment to receive the commands.  I assume this can be done?

If I run netstat I see

tcp        0      0 0.0.0.0:5760            0.0.0.0:*               LISTEN      8644/arducopter-qua

tcp        0      0 0.0.0.0:5762            0.0.0.0:*               LISTEN      8644/arducopter-qua

tcp        0      0 0.0.0.0:5763            0.0.0.0:*               LISTEN      8644/arducopter-qua

tcp        0      0 127.0.0.1:5760          127.0.0.1:51175         ESTABLISHED 8644/arducopter-qua

udp        0      0 0.0.0.0:5501            0.0.0.0:*                           8644/arducopter-qua

udp        0      0 127.0.0.1:45278         127.0.0.1:5503          ESTABLISHED 8644/arducopter-qua

I am hoping I can just send the commands to one of those ports and I have tried UDP port 5501 and TCP port 5760 and none of them seem to work?

Am I doing something wrong, can this be done, I am hoping someone may have some advice for me as all I want to do is send real hand crafted mavlink commands to my SITL environment and it respond?

Thanks in advance,

Joe

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hello,

    Could you get this working?

    I am trying to do something similar with PX4 SITL.

    Please let me know if it worked for you.

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @Heavy02011: #VirtualRaceLeague: @DIYRobocars Race #14 - #ParkingLotNerds join us January 15th for #AutonomousRacing #RoboRace ⁦@DAVGtec…
yesterday
DIY Robocars via Twitter
RT @chr1sa: And after that came our races, 50 in all. This battle between these two Russians was the best we've ever seen -- incredible fig…
yesterday
DIY Robocars via Twitter
RT @chr1sa: Before our @DIYRobocars virtual race this weekend, we had a presentation from the team that won the Indy Autonomous Challenge i…
yesterday
DIY Drones via Twitter
Dec 12, 2021
DIY Robocars via Twitter
Dec 12, 2021
DIY Robocars via Twitter
RT @chr1sa: Just a week to go before our next @DIYRobocars race at @circuitlaunch, complete with famous Brazilian BBQ. It's free, fun for k…
Dec 4, 2021
DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Nov 28, 2021
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26, 2021
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25, 2021
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23, 2021
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23, 2021
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23, 2021
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20, 2021
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20, 2021
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9, 2021
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31, 2021
More…