Auterion / px4-jsbsim-bridge

JSBSim bridge for PX4 SITL/HITL simulations
BSD 3-Clause "New" or "Revised" License
26 stars 38 forks source link

Add support for HIL #64

Open tayyabkhalil-313 opened 1 year ago

tayyabkhalil-313 commented 1 year ago

Describe problem solved by this pull request

With reference to PR # 28 for enabling HITL with JSBSim bridge, this uses the modifications from that PR and further builds on it to successfully run HITL for Rascal with JSBSim Bridge. Using that PR directly resulted in takeoff issues which have now been resolved.

Steps for HITL

  1. Change the mixer file referenced in 1000_rc_fw_easystar.hil to plane_sitl.main.mix required by rascal.
  2. Build and upload the code on hardware. Select the HILStar airframe from QGC.
  3. Build the jsbsim bridge with make px4_sitl jsbsim.
  4. Change the directory to the location of build of jsbsim bridge. It is usually PX4-Autopilot/build/px4_sitl_default/build_jsbsim_bridge.
  5. From the above directory, run the following command: HEADLESS=1 ./jsbsim_bridge rascal -d /dev/ttyACM0 -s ~/13.2/PX4-Autopilot/Tools/jsbsim_bridge/scene/LSZH.xml Where:
herewego48 commented 1 year ago

Hello, I really need your help. I tried to run your modified code, but an error message will be reported as follows:

`Opened serial device/dev/ttyACM0

In file/home/lh/Code/autopilot HITL/Tools/jsbsim_ Bridge/models/Rapid/Rapid 110 JSBSim.xml: line 104

Engine location ignored, only thrust location is used

In file/home/lh/Code/autopilot HITL/Tools/jsbsim_ Bridge/models/Rapid/Rapid 110 JSBSim.xml: line 109

Engine orientation ignored, only thrust orientation is used

Send: Connection reused

Send: Connection reused

Send: Connection reused

Send: Connection reused `

If you take the time out of your busy schedule to help me take a look, I would greatly appreciate it