mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
airframe metadata sort by SYS_AUTOSTART and minor cleanup (#8009)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!nsh
|
#!nsh
|
||||||
#
|
#
|
||||||
# @name Generic Hexa coaxial geometry
|
# @name Generic Hexarotor coaxial geometry
|
||||||
#
|
#
|
||||||
# @type Hexarotor Coaxial
|
# @type Hexarotor Coaxial
|
||||||
# @class Copter
|
# @class Copter
|
||||||
|
|||||||
38
ROMFS/px4fmu_common/init.d/13000_generic_vtol_standard
Normal file
38
ROMFS/px4fmu_common/init.d/13000_generic_vtol_standard
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#!nsh
|
||||||
|
#
|
||||||
|
# @name Generic Quadplane VTOL
|
||||||
|
#
|
||||||
|
# @type Standard VTOL
|
||||||
|
# @class VTOL
|
||||||
|
#
|
||||||
|
# @maintainer
|
||||||
|
#
|
||||||
|
# @output MAIN1 motor 1
|
||||||
|
# @output MAIN2 motor 2
|
||||||
|
# @output MAIN3 motor 3
|
||||||
|
# @output MAIN4 motor 4
|
||||||
|
# @output AUX1 Aileron 1
|
||||||
|
# @output AUX2 Aileron 2
|
||||||
|
# @output AUX3 Elevator
|
||||||
|
# @output AUX4 Rudder
|
||||||
|
# @output AUX5 Throttle
|
||||||
|
#
|
||||||
|
# @board px4fmu-v1 exclude
|
||||||
|
|
||||||
|
sh /etc/init.d/rc.vtol_defaults
|
||||||
|
|
||||||
|
if [ $AUTOCNF == yes ]
|
||||||
|
then
|
||||||
|
param set VT_TYPE 2
|
||||||
|
param set VT_MOT_COUNT 4
|
||||||
|
fi
|
||||||
|
|
||||||
|
set MIXER quad_x
|
||||||
|
set PWM_OUT 1234
|
||||||
|
set PWM_RATE 400
|
||||||
|
|
||||||
|
set MIXER_AUX vtol_AAERT
|
||||||
|
set PWM_ACHDIS 5
|
||||||
|
set PWM_AUX_DISARMED 950
|
||||||
|
|
||||||
|
set MAV_TYPE 22
|
||||||
18
ROMFS/px4fmu_common/init.d/3000_generic_wing
Normal file
18
ROMFS/px4fmu_common/init.d/3000_generic_wing
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!nsh
|
||||||
|
#
|
||||||
|
# @name Generic Flying Wing
|
||||||
|
#
|
||||||
|
# @type Flying Wing
|
||||||
|
# @class Plane
|
||||||
|
#
|
||||||
|
# @maintainer
|
||||||
|
#
|
||||||
|
|
||||||
|
sh /etc/init.d/rc.fw_defaults
|
||||||
|
|
||||||
|
if [ $AUTOCNF == yes ]
|
||||||
|
then
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
set MIXER fw_generic_wing
|
||||||
@@ -43,7 +43,8 @@ then
|
|||||||
param set FW_RR_P 0.04
|
param set FW_RR_P 0.04
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set MIXER Q
|
set MIXER fw_generic_wing
|
||||||
|
|
||||||
# Provide ESC a constant 1000 us pulse while disarmed
|
# Provide ESC a constant 1000 us pulse while disarmed
|
||||||
set PWM_OUT 4
|
set PWM_OUT 4
|
||||||
set PWM_DISARMED 1000
|
set PWM_DISARMED 1000
|
||||||
|
|||||||
@@ -40,4 +40,4 @@ then
|
|||||||
param set FW_RR_P 0.04
|
param set FW_RR_P 0.04
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set MIXER X5
|
set MIXER fw_generic_wing
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!nsh
|
#!nsh
|
||||||
#
|
#
|
||||||
# @name Generic Quadrotor X config
|
# @name Generic Quadrotor x
|
||||||
#
|
#
|
||||||
# @type Quadrotor x
|
# @type Quadrotor x
|
||||||
# @class Copter
|
# @class Copter
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!nsh
|
#!nsh
|
||||||
#
|
#
|
||||||
# @name Generic Quadrotor X config with mount (e.g. gimbal)
|
# @name Generic Quadrotor x with mount (e.g. gimbal)
|
||||||
#
|
#
|
||||||
# @type Quadrotor x
|
# @type Quadrotor x
|
||||||
# @class Copter
|
# @class Copter
|
||||||
|
|||||||
61
ROMFS/px4fmu_common/init.d/50000_generic_ground_vehicle
Normal file
61
ROMFS/px4fmu_common/init.d/50000_generic_ground_vehicle
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
#!nsh
|
||||||
|
#
|
||||||
|
# @name Generic Ground Vehicle
|
||||||
|
#
|
||||||
|
# @type Rover
|
||||||
|
# @class Rover
|
||||||
|
#
|
||||||
|
# @output MAIN2 steering
|
||||||
|
# @output MAIN4 throttle
|
||||||
|
#
|
||||||
|
# @maintainer
|
||||||
|
#
|
||||||
|
|
||||||
|
sh /etc/init.d/rc.ugv_defaults
|
||||||
|
|
||||||
|
if [ $AUTOCNF == yes ]
|
||||||
|
then
|
||||||
|
param set BAT_N_CELLS 2
|
||||||
|
|
||||||
|
param set FW_AIRSPD_MIN 0
|
||||||
|
param set FW_AIRSPD_TRIM 1
|
||||||
|
param set FW_AIRSPD_MAX 3
|
||||||
|
|
||||||
|
param set NAV_ACC_RAD 0.5
|
||||||
|
|
||||||
|
param set MIS_LTRMIN_ALT 0.01
|
||||||
|
param set MIS_TAKEOFF_ALT 0.01
|
||||||
|
|
||||||
|
param set EKF2_GBIAS_INIT 0.01
|
||||||
|
param set EKF2_ANGERR_INIT 0.01
|
||||||
|
param set EKF2_MAG_TYPE 1
|
||||||
|
|
||||||
|
param set GND_WR_P 2
|
||||||
|
param set GND_WR_I 0.9674
|
||||||
|
param set GND_WR_IMAX 0.1
|
||||||
|
param set GND_WR_D 1.2
|
||||||
|
param set GND_SP_CTRL_MODE 1
|
||||||
|
param set GND_L1_DIST 10
|
||||||
|
param set GND_THR_IDLE 0
|
||||||
|
param set GND_THR_CRUISE 0
|
||||||
|
param set GND_THR_MAX 0.5
|
||||||
|
param set GND_THR_MIN 0
|
||||||
|
param set GND_SPEED_P 0.25
|
||||||
|
param set GND_SPEED_I 0.001
|
||||||
|
param set GND_SPEED_D 3
|
||||||
|
param set GND_SPEED_IMAX 0.125
|
||||||
|
param set GND_SPEED_THR_SC 1
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure this as ugv
|
||||||
|
set MAV_TYPE 10
|
||||||
|
|
||||||
|
# Set mixer
|
||||||
|
set MIXER ugv_generic
|
||||||
|
|
||||||
|
# Provide ESC a constant 1500 us pulse
|
||||||
|
set PWM_DISARMED 1500
|
||||||
|
set PWM_MAIN_REV2 1
|
||||||
|
set PWM_MAX 2000
|
||||||
|
set PWM_MIN 1000
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
# @maintainer Marco Zorzi
|
# @maintainer Marco Zorzi
|
||||||
#
|
#
|
||||||
|
|
||||||
sh /etc/init.d/rc.gnd_defaults
|
sh /etc/init.d/rc.ugv_defaults
|
||||||
|
|
||||||
if [ $AUTOCNF == yes ]
|
if [ $AUTOCNF == yes ]
|
||||||
then
|
then
|
||||||
@@ -52,6 +52,7 @@ fi
|
|||||||
|
|
||||||
# Configure this as ugv
|
# Configure this as ugv
|
||||||
set MAV_TYPE 10
|
set MAV_TYPE 10
|
||||||
|
|
||||||
# Set mixer
|
# Set mixer
|
||||||
set MIXER stampede
|
set MIXER stampede
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ then
|
|||||||
#
|
#
|
||||||
param set NAV_DLL_ACT 0
|
param set NAV_DLL_ACT 0
|
||||||
param set NAV_ACC_RAD 2.0
|
param set NAV_ACC_RAD 2.0
|
||||||
|
|
||||||
# temporary
|
# temporary
|
||||||
param set NAV_FW_ALT_RAD 1000
|
param set NAV_FW_ALT_RAD 1000
|
||||||
|
|
||||||
@@ -865,7 +865,7 @@ then
|
|||||||
if [ $MIXER == none ]
|
if [ $MIXER == none ]
|
||||||
then
|
then
|
||||||
# Set default mixer for UGV if not defined
|
# Set default mixer for UGV if not defined
|
||||||
set MIXER stampede
|
set MIXER ugv_generic
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $MAV_TYPE == none ]
|
if [ $MAV_TYPE == none ]
|
||||||
@@ -880,7 +880,7 @@ then
|
|||||||
sh /etc/init.d/rc.interface
|
sh /etc/init.d/rc.interface
|
||||||
|
|
||||||
# Start standard UGV apps
|
# Start standard UGV apps
|
||||||
sh /etc/init.d/rc.gnd_apps
|
sh /etc/init.d/rc.ugv_apps
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
Delta-wing mixer for PX4FMU
|
|
||||||
===========================
|
|
||||||
|
|
||||||
Designed for Bormatec Camflyer Q
|
|
||||||
|
|
||||||
This file defines mixers suitable for controlling a delta wing aircraft using
|
|
||||||
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
|
|
||||||
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
|
|
||||||
assumed to be unused.
|
|
||||||
|
|
||||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
|
||||||
(roll), 1 (pitch) and 3 (thrust).
|
|
||||||
|
|
||||||
See the README for more information on the scaler format.
|
|
||||||
|
|
||||||
Elevon mixers
|
|
||||||
-------------
|
|
||||||
Three scalers total (output, roll, pitch).
|
|
||||||
|
|
||||||
On the assumption that the two elevon servos are physically reversed, the pitch
|
|
||||||
input is inverted between the two servos.
|
|
||||||
|
|
||||||
The scaling factor for roll inputs is adjusted to implement differential travel
|
|
||||||
for the elevons.
|
|
||||||
|
|
||||||
M: 2
|
|
||||||
O: 10000 10000 0 -10000 10000
|
|
||||||
S: 0 0 -8000 -8000 0 -10000 10000
|
|
||||||
S: 0 1 6000 6000 0 -10000 10000
|
|
||||||
|
|
||||||
M: 2
|
|
||||||
O: 10000 10000 0 -10000 10000
|
|
||||||
S: 0 0 -8000 -8000 0 -10000 10000
|
|
||||||
S: 0 1 -6000 -6000 0 -10000 10000
|
|
||||||
|
|
||||||
Output 2
|
|
||||||
--------
|
|
||||||
This mixer is empty.
|
|
||||||
|
|
||||||
Z:
|
|
||||||
|
|
||||||
Motor speed mixer
|
|
||||||
-----------------
|
|
||||||
Two scalers total (output, thrust).
|
|
||||||
|
|
||||||
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
|
|
||||||
range. Inputs below zero are treated as zero.
|
|
||||||
|
|
||||||
M: 1
|
|
||||||
O: 10000 10000 0 -10000 10000
|
|
||||||
S: 0 3 0 20000 -10000 -10000 10000
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
Delta-wing mixer for PX4FMU
|
Generic wing mixer
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
This file defines mixers suitable for controlling a delta wing aircraft using
|
This file defines mixers suitable for controlling a delta wing aircraft.
|
||||||
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
|
The configuration assumes the elevon servos are connected to servo
|
||||||
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
|
outputs 0 and 1 and the motor speed control to output 3. Output 2 is
|
||||||
assumed to be unused.
|
assumed to be unused.
|
||||||
|
|
||||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||||
37
ROMFS/px4fmu_common/mixers/ugv_generic.main.mix
Normal file
37
ROMFS/px4fmu_common/mixers/ugv_generic.main.mix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
Generic car mixer (eg Traxxas Stampede RC Car)
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Designed for Traxxas Stampede
|
||||||
|
|
||||||
|
This file defines mixers suitable for controlling a Traxxas Stampede rover using
|
||||||
|
PX4FMU. The configuration assumes the steering is connected to PX4FMU
|
||||||
|
servo outputs 1 and the motor speed control to output 3. Output 0 and 2 is
|
||||||
|
assumed to be unused.
|
||||||
|
|
||||||
|
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 2 (yaw), and 3 (thrust).
|
||||||
|
|
||||||
|
See the README for more information on the scaler format.
|
||||||
|
|
||||||
|
|
||||||
|
Output 0
|
||||||
|
---------------------------------------
|
||||||
|
Z:
|
||||||
|
|
||||||
|
Steering mixer using roll on output 1
|
||||||
|
---------------------------------------
|
||||||
|
M: 1
|
||||||
|
O: 10000 10000 0 -10000 10000
|
||||||
|
S: 0 2 10000 10000 0 -10000 10000
|
||||||
|
|
||||||
|
|
||||||
|
Output 2
|
||||||
|
---------------------------------------
|
||||||
|
This mixer is empty.
|
||||||
|
Z:
|
||||||
|
|
||||||
|
|
||||||
|
Output 3
|
||||||
|
---------------------------------------
|
||||||
|
M: 1
|
||||||
|
O: 10000 10000 0 -10000 10000
|
||||||
|
S: 0 3 10000 10000 0 -10000 10000
|
||||||
@@ -90,16 +90,14 @@ class ParameterGroup(object):
|
|||||||
return "Boat"
|
return "Boat"
|
||||||
return "AirframeUnknown"
|
return "AirframeUnknown"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def GetParams(self):
|
def GetParams(self):
|
||||||
"""
|
"""
|
||||||
Returns the parsed list of parameters. Every parameter is a Parameter
|
Returns the parsed list of parameters. Every parameter is a Parameter
|
||||||
object. Note that returned object is not a copy. Modifications affect
|
object. Note that returned object is not a copy. Modifications affect
|
||||||
state of the parser.
|
state of the parser.
|
||||||
"""
|
"""
|
||||||
return sorted(self.params,
|
|
||||||
key=lambda x: x.GetFieldValue("code"))
|
return sorted(self.params, key=lambda x: x.GetId())
|
||||||
|
|
||||||
class Parameter(object):
|
class Parameter(object):
|
||||||
"""
|
"""
|
||||||
@@ -443,28 +441,7 @@ class SourceParser(object):
|
|||||||
sys.stderr.write("Duplicate parameter definition: {0}\n".format(name_plus_board))
|
sys.stderr.write("Duplicate parameter definition: {0}\n".format(name_plus_board))
|
||||||
return False
|
return False
|
||||||
seenParamNames.append(name_plus_board)
|
seenParamNames.append(name_plus_board)
|
||||||
# Validate values
|
|
||||||
default = param.GetDefault()
|
|
||||||
min = param.GetFieldValue("min")
|
|
||||||
max = param.GetFieldValue("max")
|
|
||||||
#sys.stderr.write("{0} default:{1} min:{2} max:{3}\n".format(name, default, min, max))
|
|
||||||
if default != "" and not self.IsNumber(default):
|
|
||||||
sys.stderr.write("Default value not number: {0} {1}\n".format(name, default))
|
|
||||||
return False
|
|
||||||
if min != "":
|
|
||||||
if not self.IsNumber(min):
|
|
||||||
sys.stderr.write("Min value not number: {0} {1}\n".format(name, min))
|
|
||||||
return False
|
|
||||||
if default != "" and float(default) < float(min):
|
|
||||||
sys.stderr.write("Default value is smaller than min: {0} default:{1} min:{2}\n".format(name, default, min))
|
|
||||||
return False
|
|
||||||
if max != "":
|
|
||||||
if not self.IsNumber(max):
|
|
||||||
sys.stderr.write("Max value not number: {0} {1}\n".format(name, max))
|
|
||||||
return False
|
|
||||||
if default != "" and float(default) > float(max):
|
|
||||||
sys.stderr.write("Default value is larger than max: {0} default:{1} max:{2}\n".format(name, default, max))
|
|
||||||
return False
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def GetParamGroups(self):
|
def GetParamGroups(self):
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ class XMLOutput():
|
|||||||
attribstrs = attrib.split(":")
|
attribstrs = attrib.split(":")
|
||||||
xml_field.attrib[attribstrs[0].strip()] = attribstrs[1].strip()
|
xml_field.attrib[attribstrs[0].strip()] = attribstrs[1].strip()
|
||||||
xml_field.text = valstrs[0]
|
xml_field.text = valstrs[0]
|
||||||
|
|
||||||
indent(xml_parameters)
|
indent(xml_parameters)
|
||||||
self.xml_document = ET.ElementTree(xml_parameters)
|
self.xml_document = ET.ElementTree(xml_parameters)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user