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 Drones via Twitter
Using ArduRover with an RTK GPS https://ift.tt/2N9I3RO
16 hours ago
DIY Drones via Twitter
yesterday
DIY Robocars via Twitter
yesterday
DIY Robocars via Twitter
Friday
DIY Robocars via Twitter
Friday
DIY Drones via Twitter
Thursday
DIY Robocars via Twitter
RT @Heavy02011: @diyrobocars : A Home-brew computer club* for Connected Autonomous Driving on Jan 23rd, 2021 https://www.meetup.com/Connected-Autonomous-Driving/events/275728684/ #Meetu…
Thursday
DIY Robocars via Twitter
Thursday
David Hori liked Isabella Domi's profile
Jan 12
DIY Robocars via Twitter
RT @Heavy02011: ⁦@diyrobocars⁩ Autonomous Driving Assembly at #rC3. join us at https://rc3.world/rc3/assembly/diyrobocars-f1tenth/ ⁦@f1tenth⁩ ⁦@DAVGtech⁩ ⁦@DWalmroth⁩…
Jan 11
DIY Robocars via Twitter
RT @chr1sa: New car designs coming for our next @DIYRobocars @donkey_car virtual race on the 23rd. Choose any one you want at race time Le…
Jan 11
DIY Robocars via Twitter
RT @RoboticMasters: Thanks to @EllerbachMaxime and the Sydney Uni Capstone Students the @donkey_car @diyrobocars simulator is getting a ma…
Jan 11
DIY Robocars via Twitter
Jan 6
DIY Robocars via Twitter
Dec 28, 2020
DIY Robocars via Twitter
An interesting line-following simulator to use with with your robocars: https://github.com/ron-grant/LFS
Dec 23, 2020
DIY Robocars via Twitter
Dec 23, 2020
More…