I made a software, which converts MAVLink packets to UDP datagrams for Xplane and vice versa. Now i am trying to use my HITL configuration w/ QGroundControl. Connection between QGroundControl and my CubeBlack is okay but i can’t command takeoff or any kind of mission.
First of all, which messages are enough to fly my vehicle ?
I am able to send HIL_SENSOR + HIL_GPS or HIL_STATE_QUATERNION messages with frequencies around 80-120 hz.
Secondly, I can control the system with joystick via qground or I can embed a flight route by hard coding to my system, but I cannot send a full mission via qgroundcontrol.
When I send a takeoff command, I can see in the mavlinkinspector of qground that I sent an invalid (NaN) position_target_local_ned message.
Do you know why it is not supported? Cause in past posts i saw some people saying that they are using X-Plane and couldn’t figure out why Px4 stop supporting X-Plane now.
Do you know why it is not supported? Cause in past posts i saw some people saying that they are using X-Plane and couldn’t figure out why Px4 stop supporting X-Plane now.
@Fatih_Ozkan Yes it worked at somepoint, but AFAIK it is no longer maintained.
The main limitation I see with Xplane is that the simulation depends on the rendering rate, while SITL/HITL needs faster simulation update rates to simulate the sensors.
Which specific messages i need to fly my vehicle. I determined as HIL_GPS, HIL_STATE_QUATERNION, HIL_SENSOR. Is that right? And i checked the code of JMavSim and few codes of JSBSim. Some sensor, gps values are sending with noise. Is it essential?
Not sure if you would want to have a noise free simulation - your EKF will still be assuming that your sensor has noise unless you configure otherwise. This will probably end up being “not representative” of the vehicle behaviors you see in the real world
I got stucked at even in basics. Now my issue is when i say arm to vehicle it’s not like arming but QGround is showing that vehicle “armed”.
I am trying to make simulation with quad mode with my Quadplane Vtol model.
And in takeoff mode (not just take off in all modes) i think QGroundcontrol can’t send mission command. But also there are no error sign in QGroundControl.
I think its about Position_Target_local_Ned MavLink message. Here is my Position_Target_local_Ned in takeoff mode:
I have done the same thing (bridge mavlink<->xplane 11).
I started with the source of this github project mav2xplane
For your first question:
Only hil_sensor and hil_gps are needed.
2 important things:
this previous messages must always arrive to controller at exact same frequency (in my case 40 Hz). If not, the estimator doesn’t work.
If there no noise on hil_sensor, the estimator doesn’t work.
@Fatih_Ozkan
The source depends on framework named Qt.
If you don’t use it, you can use as alternative as QDateTime:
std::chrono:system_clock::now() (STL library)
Good luck!
I am trying to build an HIL environment with X-plane 11 & modified QGCv4.0 & modified PX4 v1.11.2.
The ultimate goal is to use my original fluid dynamics simulator instead of X-plane, and mav2xplane project looks excellent to start with.
I have some experience with developing PX4 but not much with Qt, and looking to learn. Could you share the standalone version of the bridge, if available? If not, can you advise what to do or where to look to utilize the bridge?
Second,
Can you explain to me how are you make connection between XPlane 11 & QGC v4.1 in ubuntu?
I’ve already download this project: mav2xplan but i cant use it … may you explain to me how to use it , or tell me the steps to make connection between them?