mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 17:36:40 +08:00
Add jsbsim bridge to enable jsbsim for px4 SITL on jsbsim (#15748)
* Add jsbsim bridge to enable jsbsim for px4 SITL/HIL on jsbsim This is a PX4 HIL/SITL integration into JSBSim. JSBSim is an open source flight dynamics model (http://jsbsim.sourceforge.net/) Currently there are three models available which is the rascal, quadrotor_x, hexarotor_x integrated into the bridge. The simulation can be run with the firmware with the following command for example ``` make px4_sitl jsbsim_rascal ``` The visualization is done flightgear and is done by the bridge sending UDP packets to flightgear. To disable the visualization `HEADLESS=1` when running the make command. The simulation can be configured through the configuration files under the `config` directory through a xml file. Senor configurations, The xml file name should match the name of the model. * Update Tools/sitl_run.sh Co-authored-by: Beat Küng <beat-kueng@gmx.net> Co-authored-by: Beat Küng <beat-kueng@gmx.net>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Quadrotor SITL model for JSBSim
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
# @maintainer Jaeyoung Lim <jaeyoung@auterion.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_w
|
||||
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Hexacopter SITL model for JSBSim
|
||||
#
|
||||
# @type Hexarotor x
|
||||
#
|
||||
# @maintainer Jaeyoung Lim <jaeyoung@auterion.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set MC_PITCHRATE_P 0.1
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MPC_XY_VEL_I_ACC 4
|
||||
param set MPC_XY_VEL_P_ACC 3
|
||||
|
||||
param set RTL_DESCEND_ALT 10
|
||||
param set RTL_LAND_DELAY 0
|
||||
|
||||
param set TRIG_INTERFACE 3
|
||||
param set TRIG_MODE 4
|
||||
param set MNT_MODE_IN 4
|
||||
param set MNT_DO_STAB 2
|
||||
param set MAV_PROTO_VER 2
|
||||
fi
|
||||
|
||||
set MAV_TYPE 13
|
||||
|
||||
set MIXER hexa_x
|
||||
Reference in New Issue
Block a user