JSBSim-bridge mavlink interface hil_mode

Hi, recently, I tried to create new aircraft in jsbsim and run the SITL with PX4-Autopilot.

It could run well when I ran the JSBSim separately with the new aircraft XML.

But, When I ran with PX4 using new aircraft XML, It couldn’t run.

So, I printed the variables to do debug.

Then, I knew that the hil_mode_ variable was not false, when I ran SITL.

I fixed this problem by make it false in jsbsim_bridge/include/mavlink_interface.h.

Can I edit the code like this??? and, when the jsbsim_bridge runs, what source code declares the hil_mode variable’s value???

I edited the code temporarily, but I want to validate and check with the community.

1 Like

@Jaeyoung-Lim Do you have any idea?

@JeongseokHyun You should make a PR in the repository, and I can have a look

@JeongseokHyun was this ever resolved? I ran into the same error when using a custom airframe. When running in SITL mode, the hil_mode_ variable was incorrectly set to true and the build stalled on trying to make a UDP connection when it should have only been making a TCP connection.