MAVSDK running on another computer for HITL
-
For SITL, I can connect to PX4 with MAVSDK using port 14540. However, for HITL, port 14540 or 14551 does not work. VOXL2 wifi is configured in AP mode, and I have connected my laptop to it. I have also checked that voxl-vision-hub and voxl-mavlink-server are running, and my config files are as such:
voxl-vision-hub
voxl-mavlink-server
How can I get HITL to work with MAVSDK running on my linux computer? Or does it only work when MAVSDK is running on VOXL2 like the example here https://docs.modalai.com/mavsdk/?
-
@kerct you can only use port 14540 in SITL when using mavsdk or mavros or something on the same computer running SITL. That is what that port is meant for - you cannot traverse through the router on that port and send packets forwards. As for mavsdk on a parent computer to the voxl2 running in HITL, you are not able to use port 14551 unless you are running mavsdk onboard as that port is meant for localhost traversal. So that just leaves port 14550, aka the port blocking qgc. So in this instance, you can either use port 14550 without QGC and leverage your mavsdk code, or vise versa. I would recommend using port 14550 for QGC and then running your application onboard the voxl2 using port 14551 as that is what it is meant to do.
Zach
-
@Zachary-Lowell-0 I was trying the MAVSDK example which didn't work but after trying the example, I can't run HITL anymore (which worked previously)... not sure what's the issue here?
-
@kerct If you power cycle the board does it do the same thing every time? It's acting like there is already code running on the DSP.
-
@Eric-Katzfey Yes I still get the same error after power cycle
-
@Eric-Katzfey I'm also unable to connect to QGC now (without HITL). On VOXL portal I can still see the camera and pointclouds, but not the status of the drone.
-
@kerct Can you use the SDK 1.1.2 installer to do a fresh install of the latest SDK (available here: https://developer.modalai.com/asset/2) and then see if the problem still exists?
-
@kerct I generally start by doing a fresh install. Then try to get HITL working with Gazebo without QGroundControl. Then add QGroundControl. And finally, when all of that seems to be working, add MAVSDK.
-
@Eric-Katzfey will this work with SDK 1.0.0 too? would like to stick with that version for now since we have been testing with this version for our project
-
@kerct We've many numerous improvements to HITL support since 1.0.0.
-
@kerct Perhaps you can try SDK 1.1.2 and just verify that you can get it all working the way that you want. That will at least rule out any issues coming from your environment. Then, if that all works fine, go back to 1.0.0 and see if you can determine which part is not working.
-
@kerct But I would strongly suggest moving to SDK 1.1.2. It's very hard for us to support customers using older SDK versions.