Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit e9774e9

Browse files
committed
Added KX4 mixers and geometries, updated sitlgz version, updated cmakelists to incl. kx4
1 parent 01accfa commit e9774e9

File tree

13 files changed

+319
-4
lines changed

13 files changed

+319
-4
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
#!/bin/sh
2+
#
3+
# @name kiteX
4+
#
5+
# @type MODIFIED VTOL
6+
#
7+
8+
sh /etc/init.d/rc.vtol_defaults
9+
10+
if [ $AUTOCNF = yes ]
11+
then
12+
# battery configuration 3 cells
13+
param set BAT_N_CELLS 3
14+
# sensor calibration data
15+
param set CAL_ACC0_ID 1376264
16+
param set CAL_ACC0_XOFF 0.01
17+
param set CAL_ACC0_XSCALE 1.01
18+
param set CAL_ACC0_YOFF -0.01
19+
param set CAL_ACC0_YSCALE 1.01
20+
param set CAL_ACC0_ZOFF 0.01
21+
param set CAL_ACC0_ZSCALE 1.01
22+
param set CAL_ACC1_ID 1310728
23+
param set CAL_ACC1_XOFF 0.01
24+
param set CAL_GYRO0_ID 2293768
25+
param set CAL_GYRO0_XOFF 0.01
26+
param set CAL_MAG0_ID 196616
27+
param set CAL_MAG0_XOFF 0.01
28+
# timeout for disarm after landing
29+
param set COM_DISARM_LAND 5
30+
# RC control input
31+
# ----------------------------
32+
#0: RC Transmitter
33+
#1: Joystick/No RC Checks
34+
#2: Virtual RC by Joystick
35+
# ----------------------------
36+
param set COM_RC_IN_MODE 1
37+
# some EKF configurations
38+
param set EKF2_ANGERR_INIT 0.01
39+
param set EKF2_GBIAS_INIT 0.01
40+
param set EKF2_MAG_TYPE 1
41+
# select the main source of the height estimation
42+
# ----------------------------
43+
#0: Barometric pressure
44+
#1: GPS
45+
#2: Range sensor
46+
#3: Vision
47+
# ----------------------------
48+
param set EKF2_HGT_MODE 0
49+
50+
51+
param set FW_AIRSPD_MAX 25
52+
param set FW_AIRSPD_MIN 14
53+
param set FW_AIRSPD_TRIM 16
54+
55+
param set MC_PITCH_P 6
56+
param set MC_PITCHRATE_P 0.2
57+
param set MC_ROLL_P 6
58+
param set MC_ROLLRATE_P 0.3
59+
60+
param set MIS_LTRMIN_ALT 10
61+
param set MIS_TAKEOFF_ALT 10
62+
param set MIS_YAW_TMT 10
63+
64+
param set MPC_ACC_HOR_MAX 2
65+
param set MPC_ACC_HOR_MAX 2
66+
param set MPC_THR_MIN 0.1
67+
param set MPC_TKO_SPEED 1
68+
param set MPC_XY_P 0.8
69+
param set MPC_XY_VEL_D 0.005
70+
param set MPC_XY_VEL_I 0.2
71+
param set MPC_XY_VEL_P 0.15
72+
param set MPC_Z_VEL_MAX_DN 1.5
73+
param set MPC_Z_VEL_P 0.6
74+
75+
param set NAV_ACC_RAD 5
76+
param set NAV_LOITER_RAD 80
77+
param set NAV_DLL_ACT 2
78+
79+
param set VT_F_TRANS_DUR 5
80+
param set VT_F_TRANS_THR 0.75
81+
# number of the motors of the VTOL
82+
param set VT_MOT_COUNT 8 # This is where we set the motor count
83+
param set VT_IDLE_PWM_MC 1080
84+
# type of the vtol
85+
# 3 is KITE
86+
param set VT_TYPE 3
87+
88+
param set RTL_DESCEND_ALT 10.0
89+
param set RTL_LAND_DELAY 0
90+
param set RTL_RETURN_ALT 30.0
91+
92+
param set SENS_BOARD_ROT 0
93+
param set SENS_BOARD_X_OFF 0.000001
94+
param set SENS_DPRES_OFF 0.001
95+
96+
param set SYS_AUTOSTART 13013
97+
param set SYS_MC_EST_GROUP 2
98+
param set SYS_RESTART_TYPE 2
99+
100+
param set WEST_EN 1
101+
102+
param set V19_VT_ROLLDIR 0
103+
fi
104+
# This is special kitex VTOL ( from now it has to be always 22)
105+
set MAV_TYPE 22
106+
# kitex special H configuration for the mixer
107+
set MIXER_FILE etc/mixers-sitl/kx4_vtol.main.mix
108+
set MIXER custom
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
mixer append /dev/pwm_output0 etc/mixers/KX4.aux.mix
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
#!/bin/sh
2+
#
3+
# @name kiteX
4+
#
5+
# @type MODIFIED VTOL
6+
#
7+
8+
sh /etc/init.d/rc.vtol_defaults
9+
10+
if [ $AUTOCNF = yes ]
11+
then
12+
# battery configuration 3 cells
13+
param set BAT_N_CELLS 3
14+
# sensor calibration data
15+
param set CAL_ACC0_ID 1376264
16+
param set CAL_ACC0_XOFF 0.01
17+
param set CAL_ACC0_XSCALE 1.01
18+
param set CAL_ACC0_YOFF -0.01
19+
param set CAL_ACC0_YSCALE 1.01
20+
param set CAL_ACC0_ZOFF 0.01
21+
param set CAL_ACC0_ZSCALE 1.01
22+
param set CAL_ACC1_ID 1310728
23+
param set CAL_ACC1_XOFF 0.01
24+
param set CAL_GYRO0_ID 2293768
25+
param set CAL_GYRO0_XOFF 0.01
26+
param set CAL_MAG0_ID 196616
27+
param set CAL_MAG0_XOFF 0.01
28+
# timeout for disarm after landing
29+
param set COM_DISARM_LAND 5
30+
# RC control input
31+
# ----------------------------
32+
#0: RC Transmitter
33+
#1: Joystick/No RC Checks
34+
#2: Virtual RC by Joystick
35+
# ----------------------------
36+
param set COM_RC_IN_MODE 1
37+
# some EKF configurations
38+
param set EKF2_ANGERR_INIT 0.01
39+
param set EKF2_GBIAS_INIT 0.01
40+
param set EKF2_MAG_TYPE 1
41+
# select the main source of the height estimation
42+
# ----------------------------
43+
#0: Barometric pressure
44+
#1: GPS
45+
#2: Range sensor
46+
#3: Vision
47+
# ----------------------------
48+
param set EKF2_HGT_MODE 0
49+
50+
51+
param set FW_AIRSPD_MAX 25
52+
param set FW_AIRSPD_MIN 14
53+
param set FW_AIRSPD_TRIM 16
54+
55+
param set MC_PITCH_P 6
56+
param set MC_PITCHRATE_P 0.2
57+
param set MC_ROLL_P 6
58+
param set MC_ROLLRATE_P 0.3
59+
60+
param set MIS_LTRMIN_ALT 10
61+
param set MIS_TAKEOFF_ALT 10
62+
param set MIS_YAW_TMT 10
63+
64+
param set MPC_ACC_HOR_MAX 2
65+
param set MPC_ACC_HOR_MAX 2
66+
param set MPC_THR_MIN 0.1
67+
param set MPC_TKO_SPEED 1
68+
param set MPC_XY_P 0.8
69+
param set MPC_XY_VEL_D 0.005
70+
param set MPC_XY_VEL_I 0.2
71+
param set MPC_XY_VEL_P 0.15
72+
param set MPC_Z_VEL_MAX_DN 1.5
73+
param set MPC_Z_VEL_P 0.6
74+
75+
param set NAV_ACC_RAD 5
76+
param set NAV_LOITER_RAD 80
77+
param set NAV_DLL_ACT 2
78+
79+
param set VT_F_TRANS_DUR 5
80+
param set VT_F_TRANS_THR 0.75
81+
# number of the motors of the VTOL
82+
param set VT_MOT_COUNT 8
83+
param set VT_IDLE_PWM_MC 1080
84+
# type of the vtol
85+
# 3 is KITE
86+
param set VT_TYPE 3
87+
88+
param set RTL_DESCEND_ALT 10.0
89+
param set RTL_LAND_DELAY 0
90+
param set RTL_RETURN_ALT 30.0
91+
92+
param set SENS_BOARD_ROT 0
93+
param set SENS_BOARD_X_OFF 0.000001
94+
param set SENS_DPRES_OFF 0.001
95+
96+
param set SYS_AUTOSTART 13013
97+
param set SYS_MC_EST_GROUP 2
98+
param set SYS_RESTART_TYPE 2
99+
100+
param set WEST_EN 1
101+
102+
param set V19_VT_ROLLDIR 0
103+
fi
104+
# This is special kitex VTOL ( from now it has to be always 22)
105+
set MAV_TYPE 22
106+
# kitex special H configuration for the mixer
107+
set MIXER_FILE etc/mixers-sitl/kx4_with_tether.main.mix
108+
set MIXER custom
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mixer append /dev/pwm_output0 etc/mixers/KX4_with_tether.aux.mix

ROMFS/px4fmu_common/mixers-sitl/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ px4_add_romfs_files(
3737
over_sitl.main.mix
3838
standard_vtol_sitl.main.mix
3939
tiltrotor_sitl.main.mix
40+
kx4_vtol.main.mix # Kitex
41+
kx4_vtol_with_tether.main.mix # Kitex
4042
)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Mixer for standard vtol plane (SITL) with motor x configuration
2+
=========================================================
3+
4+
This file defines a single mixer for a standard vtol plane (SITL gazebo) with motors in H configuration. The plane has two ailerons and one elevator.
5+
6+
#
7+
# @type Kitex special Octo-copter
8+
# @class VTOL
9+
#
10+
# @output MAIN1 motor 1
11+
# @output MAIN2 motor 2
12+
# @output MAIN3 motor 3
13+
# @output MAIN4 motor 4
14+
# @output MAIN5 motor 5
15+
# @output MAIN6 motor 6
16+
# @output MAIN7 motor 7
17+
18+
19+
R: 8kitex 10000 10000 10000 0
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Mixer for the KX4 8 rotor VTOL
2+
=======================
3+
# mixer for the rudder ( for kite the yaw is roll after transition)
4+
M: 1
5+
O: 10000 10000 0 -10000 10000
6+
S: 1 0 10000 10000 0 -10000 10000
7+
8+
# mixer for the elevator ( remain stil pitch angle )
9+
M: 1
10+
O: 10000 10000 0 -10000 10000
11+
S: 1 1 10000 10000 0 -10000 10000
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Mixer for the KX4 8 rotor VTOL
2+
=======================
3+
# mixer for the rudder ( for kite the yaw is roll after transition)
4+
M: 1
5+
O: 10000 10000 0 -10000 10000
6+
S: 1 0 10000 10000 0 -10000 10000
7+
8+
# mixer for the elevator ( remain stil pitch angle )
9+
M: 1
10+
O: 10000 10000 0 -10000 10000
11+
S: 1 1 10000 10000 0 -10000 10000

Tools/sitl_gazebo

platforms/posix/cmake/sitl_target.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ set(models none shell
5555
if750a iris iris_opt_flow iris_vision iris_rplidar iris_irlock iris_obs_avoid solo typhoon_h480
5656
plane
5757
standard_vtol tailsitter tiltrotor
58-
hippocampus rover)
58+
hippocampus rover
59+
kx4_vtol kx4_with_tether) # Kitex
5960
set(all_posix_vmd_make_targets)
6061
foreach(viewer ${viewers})
6162
foreach(debugger ${debuggers})

0 commit comments

Comments
 (0)