Closed JeongseokHyun closed 1 year ago
@JeongseokHyun Not sure what exactly you are asking.
Are you implying that there is something wrong with the implementation? What custom changes did you make? Did it work without your custom changes?
JSBSim and px4 SITL instance runs on a lockstep, which means for each actuator signal there needs to be a sensor message returning to the SITL instance (see https://docs.px4.io/main/en/simulation/)
I am not sure what the custom changes you have made are, but I would suggest to compare your implementation with the implementation that works and find out where the problem might be.
@JeongseokHyun Was this resolved? If so, could you share insights on how you resolved your problem?
@Jaeyoung-Lim It is my mistake. :D To run a custom airframe with a custom configuration using PX4-JSBSim SITL, I copied a custom airframe from windows. After then, I tried to run PX4-JSBSim SITL. PX4 couldn't find the airframe file. To resolve it, I ignored a line in rCS file (https://discuss.px4.io/t/error-when-simulating-a-new-airframe/31919/6). I think that was the reason. PX4 couldn't send the HIL_ACTUATOR_CONTROLS message.
After I recovered the line in rCS file, I also created custom airframe in ubuntu again. Then it was resolved. I don't know the exact reason, but PX4 didn't seem to recognize the Custom Airframe that Windows copied.
Thank you
@JeongseokHyun Thanks for the update
No idea how px4 works with windows, so not sure if I can comment on that side
Hi, Now, I try to edit the JSBSim code to add electric propulsion performance analysis and make SITL with PX4 using jsbsim-bridge.
I use the jsbsim v1.1.0 and PX4-Autopilot v1.13.0 with custom VTOL configuration.
I did not edit the communication part in JSBSim and PX4. But, When I add custom code in JSBSim, and try to run with PX4, The SITL is connected. Also, HIL_ACTUATOR_CONTROLS is not generating from PX4. To check it, I checked to send and run function in the simulator_mavelink.cpp code. The receiving part in the run function is always working with sending part in send function. The request_hil_state_quaternion function in the run function and the send_heartbeat function in send function also work at the initial time. But, only the send_controls function is not working in the while loop in send function because the pret value is zero. the So, I think actuator output is not generating in PX4. If someone know this problem, then, can I know the pret variables mean and the problem in this situation???
File location: home\PX4-Autopilot\src\modules\simulator\simulator_mavlink.cpp