Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 52e98f99f4 |
@@ -903,12 +903,11 @@ void printTopics() {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener rate_ctrl_status" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener safety" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_accel" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_accel_fifo" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_imu_fifo" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_baro" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_combined" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_gyro" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_gyro_fft" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_gyro_fifo" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_mag" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_preflight_mag" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_selection" || true'
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
[submodule "Tools/simulation/jmavsim/jMAVSim"]
|
||||
path = Tools/simulation/jmavsim/jMAVSim
|
||||
url = https://github.com/PX4/jMAVSim.git
|
||||
branch = main
|
||||
branch = master
|
||||
[submodule "Tools/simulation/gazebo/sitl_gazebo"]
|
||||
path = Tools/simulation/gazebo/sitl_gazebo
|
||||
url = https://github.com/PX4/PX4-SITL_gazebo.git
|
||||
branch = main
|
||||
branch = master
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/PX4-GPSDrivers.git
|
||||
branch = main
|
||||
branch = master
|
||||
[submodule "src/modules/micrortps_bridge/micro-CDR"]
|
||||
path = src/modules/micrortps_bridge/micro-CDR
|
||||
url = https://github.com/PX4/Micro-CDR.git
|
||||
@@ -53,7 +53,6 @@
|
||||
[submodule "src/lib/events/libevents"]
|
||||
path = src/lib/events/libevents
|
||||
url = https://github.com/mavlink/libevents.git
|
||||
branch = main
|
||||
[submodule "src/lib/crypto/libtomcrypt"]
|
||||
path = src/lib/crypto/libtomcrypt
|
||||
url = https://github.com/PX4/libtomcrypt.git
|
||||
|
||||
@@ -218,10 +218,10 @@
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"IGN_GAZEBO_RESOURCE_PATH": "${workspaceFolder}/Tools/simulation/gz/models",
|
||||
"IGN_GAZEBO_RESOURCE_PATH": "${workspaceFolder}/Tools/simulation/ignition/models",
|
||||
}
|
||||
},
|
||||
"command": "ign gazebo -v 4 -r ${workspaceFolder}/Tools/simulation/gz/worlds/${input:gzWorld}.sdf",
|
||||
"command": "ign gazebo -v 4 -r ${workspaceFolder}/Tools/simulation/ignition/worlds/${input:ignWorld}.sdf",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
@@ -342,8 +342,8 @@
|
||||
"inputs": [
|
||||
{
|
||||
"type": "pickString",
|
||||
"id": "gzWorld",
|
||||
"description": "gz world",
|
||||
"id": "ignWorld",
|
||||
"description": "Ignition world",
|
||||
"options": [
|
||||
"default"
|
||||
],
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Advanced Plane SITL
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default EKF2_MAG_ACCLIM 0
|
||||
param set-default EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1
|
||||
param set-default FW_LND_ANG 8
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
|
||||
param set-default FW_L1_PERIOD 12
|
||||
|
||||
param set-default FW_MAN_P_MAX 30
|
||||
|
||||
param set-default FW_PSP_OFF 2
|
||||
param set-default FW_P_LIM_MAX 32
|
||||
param set-default FW_P_LIM_MIN -15
|
||||
|
||||
param set-default FW_SPOILERS_LND 0.4
|
||||
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_THR_TRIM 0.25
|
||||
|
||||
param set-default FW_T_CLMB_MAX 8
|
||||
param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
|
||||
param set-default FW_W_EN 1
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 30
|
||||
param set-default MIS_TAKEOFF_ALT 30
|
||||
|
||||
param set-default NAV_ACC_RAD 15
|
||||
param set-default NAV_DLL_ACT 2
|
||||
|
||||
param set-default RWTO_TKOFF 1
|
||||
|
||||
#param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 1
|
||||
|
||||
param set-default CA_ROTOR_COUNT 1
|
||||
param set-default CA_ROTOR0_PX 0.3
|
||||
|
||||
param set-default CA_SV_CS_COUNT 6
|
||||
param set-default CA_SV_CS0_TRQ_R -0.5
|
||||
param set-default CA_SV_CS0_TYPE 1
|
||||
param set-default CA_SV_CS1_TRQ_R 0.5
|
||||
param set-default CA_SV_CS1_TYPE 2
|
||||
param set-default CA_SV_CS2_TRQ_P 1.0
|
||||
param set-default CA_SV_CS2_TYPE 3
|
||||
param set-default CA_SV_CS3_TRQ_Y 1.0
|
||||
param set-default CA_SV_CS3_TYPE 4
|
||||
param set-default CA_SV_CS4_TYPE 9
|
||||
param set-default CA_SV_CS5_TYPE 10
|
||||
param set-default PWM_MAIN_FUNC3 204
|
||||
param set-default PWM_MAIN_FUNC4 205
|
||||
param set-default PWM_MAIN_FUNC5 101
|
||||
param set-default PWM_MAIN_FUNC6 201
|
||||
param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_FUNC8 203
|
||||
param set-default PWM_MAIN_FUNC9 206
|
||||
param set-default PWM_MAIN_REV 256
|
||||
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
|
||||
set MIXER custom
|
||||
@@ -61,7 +61,6 @@ param set-default FW_T_CLMB_MAX 8
|
||||
param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
|
||||
param set-default MC_AIRMODE 1
|
||||
param set-default MC_ROLLRATE_P 0.3
|
||||
param set-default MC_YAW_P 1.6
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
param set-default FW_T_TAS_TC 2
|
||||
|
||||
param set-default MC_AIRMODE 1
|
||||
param set-default MC_ROLLRATE_P 0.3
|
||||
|
||||
param set-default MPC_ACC_HOR_MAX 2
|
||||
|
||||
@@ -34,6 +34,8 @@ param set-default CA_SV_CS1_TYPE 2
|
||||
param set-default CA_SV_CS2_TRQ_P 1.0
|
||||
param set-default CA_SV_CS2_TYPE 3
|
||||
param set-default CA_SV_CS_COUNT 3
|
||||
param set-default CA_SV_TL0_CT 0
|
||||
param set-default CA_SV_TL1_CT 0
|
||||
param set-default CA_SV_TL_COUNT 2
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
@@ -60,7 +62,6 @@ param set-default FW_T_CLMB_MAX 8
|
||||
param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
|
||||
param set-default MC_AIRMODE 1
|
||||
param set-default MC_YAWRATE_P 0.3
|
||||
param set-default MC_YAWRATE_I 0.3
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Gazebo x500
|
||||
# @name Ignition Gazebo X3
|
||||
#
|
||||
# @type Quadrotor
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
|
||||
PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
|
||||
PX4_SIMULATOR=${PX4_SIMULATOR:=ignition}
|
||||
PX4_SIM_MODEL=${PX4_SIM_MODEL:=x500}
|
||||
PX4_SIM_WORLD=${PX4_SIM_WORLD:=default}
|
||||
|
||||
param set-default CA_AIRFRAME 0
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
@@ -30,19 +30,19 @@ param set-default CA_ROTOR3_PX -0.13
|
||||
param set-default CA_ROTOR3_PY 0.20
|
||||
param set-default CA_ROTOR3_KM -0.05
|
||||
|
||||
param set-default SIM_GZ_FUNC1 101
|
||||
param set-default SIM_GZ_FUNC2 102
|
||||
param set-default SIM_GZ_FUNC3 103
|
||||
param set-default SIM_GZ_FUNC4 104
|
||||
param set-default SIM_IGN_FUNC1 101
|
||||
param set-default SIM_IGN_FUNC2 102
|
||||
param set-default SIM_IGN_FUNC3 103
|
||||
param set-default SIM_IGN_FUNC4 104
|
||||
|
||||
param set-default SIM_GZ_MIN1 150
|
||||
param set-default SIM_GZ_MIN2 150
|
||||
param set-default SIM_GZ_MIN3 150
|
||||
param set-default SIM_GZ_MIN4 150
|
||||
param set-default SIM_IGN_MIN1 150
|
||||
param set-default SIM_IGN_MIN2 150
|
||||
param set-default SIM_IGN_MIN3 150
|
||||
param set-default SIM_IGN_MIN4 150
|
||||
|
||||
param set-default SIM_GZ_MAX1 1000
|
||||
param set-default SIM_GZ_MAX2 1000
|
||||
param set-default SIM_GZ_MAX3 1000
|
||||
param set-default SIM_GZ_MAX4 1000
|
||||
param set-default SIM_IGN_MAX1 1000
|
||||
param set-default SIM_IGN_MAX2 1000
|
||||
param set-default SIM_IGN_MAX3 1000
|
||||
param set-default SIM_IGN_MAX4 1000
|
||||
|
||||
param set-default MPC_THR_HOVER 0.60
|
||||
|
||||
@@ -61,7 +61,6 @@ px4_add_romfs_files(
|
||||
1036_malolo
|
||||
1037_believer
|
||||
1038_glider
|
||||
1039_advanced_plane
|
||||
1040_standard_vtol
|
||||
1041_tailsitter
|
||||
1042_tiltrotor
|
||||
|
||||
@@ -17,7 +17,7 @@ if [ "$PX4_SIMULATOR" = "sihsim" ] || [ "$(param show -q SYS_AUTOSTART)" -eq "0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
elif [ "$PX4_SIMULATOR" = "gz" ]; then
|
||||
elif [ "$PX4_SIMULATOR" = "ignition" ]; then
|
||||
|
||||
# source generated gazebo_env.sh for IGN_GAZEBO_RESOURCE_PATH
|
||||
if [ -f gazebo_env.sh ]; then
|
||||
@@ -26,66 +26,28 @@ elif [ "$PX4_SIMULATOR" = "gz" ]; then
|
||||
. ../gazebo_env.sh
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2236
|
||||
if [ ! -z $PX4_GZ_VERBOSE ]; then
|
||||
if [ "$PX4_GZ_VERBOSE" -le "4" ] && [ "$PX4_GZ_VERBOSE" -ge "1" ]; then
|
||||
gz_verbose=$PX4_GZ_VERBOSE
|
||||
else
|
||||
gz_verbose=4
|
||||
echo "WARN [init] PX4_GZ_VERBOSE was passed: $PX4_GZ_VERBOSE, not in range [1,4], defaulting to: $gz_verbose."
|
||||
fi
|
||||
echo "INFO [init] PX4_GZ_VERBOSE set to $gz_verbose."
|
||||
else
|
||||
gz_verbose=1
|
||||
echo "INFO [init] PX4_GZ_VERBOSE not explicitly set, defaulting to: $gz_verbose."
|
||||
fi
|
||||
ign_world=$( ign topic -l | grep -m 1 -e "/world/.*/clock" | sed 's/\/world\///g; s/\/clock//g' )
|
||||
|
||||
gz_world=$( ign topic -l | grep -m 1 -e "/world/.*/clock" | sed 's/\/world\///g; s/\/clock//g' )
|
||||
|
||||
gz_version_major=$( ign gazebo --versions | sed 's/\..*//g' )
|
||||
gz_version_minor=$( ign gazebo --versions | sed 's/'"${gz_version_major}"\.'//; s/\..*//g' )
|
||||
gz_version_point=$( ign gazebo --versions | sed 's/'"${gz_version_major}"\.'//; s/'"${gz_version_minor}"\.'//')
|
||||
if [ -z $ign_world ]; then
|
||||
|
||||
if [ "$gz_version_major" -gt "6" ] || { [ "$gz_version_major" -eq "6" ] && [ "$gz_version_minor" -gt "12" ]; } || { [ "$gz_version_major" -eq "6" ] && [ "$gz_version_minor" -eq "12" ] && [ "$gz_version_point" -gt "0" ]; }; then
|
||||
echo "INFO [init] using latest version of MultiCopterMotor plugin."
|
||||
else
|
||||
echo "WARN [init] using older version of MultiCopterMotor plugin, please update to latest gazebo > 6.12.0."
|
||||
if [ "$PX4_SIM_MODEL" = "x500" ]; then
|
||||
PX4_SIM_MODEL="x500-Legacy"
|
||||
echo "WARN [init] setting PX4_SIM_MODEL -> $PX4_SIM_MODEL from x500 till gazebo > 6.12.0"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z $gz_world ]; then
|
||||
|
||||
# starting ign gazebo with ${PX4_GZ_WORLD} world
|
||||
# starting ign gazebo with ${PX4_SIM_WORLD} world
|
||||
echo "INFO [init] starting ign gazebo"
|
||||
# shellcheck disable=SC2153
|
||||
ign gazebo --verbose=$gz_verbose -r -s "${PX4_GZ_WORLDS}/${PX4_GZ_WORLD}.sdf" &
|
||||
|
||||
ign gazebo --verbose=1 -r -s "${PX4_IGN_GAZEBO_WORLDS}/${PX4_SIM_WORLD}.sdf" &
|
||||
|
||||
if [ -z $HEADLESS ]; then
|
||||
# HEADLESS not set, starting ign gazebo gui
|
||||
ign gazebo -g &
|
||||
fi
|
||||
else
|
||||
echo "INFO [init] ign gazebo already running world: $gz_world"
|
||||
PX4_GZ_WORLD=$gz_world
|
||||
echo "INFO [init] ign gazebo already running world: $ign_world"
|
||||
PX4_SIM_WORLD=$ign_world
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2236
|
||||
if [ ! -z $PX4_GZ_MODEL ] && [ -z $PX4_GZ_MODEL_NAME ]; then
|
||||
|
||||
# shellcheck disable=SC2236
|
||||
if [ ! -z $PX4_GZ_MODEL_POSE ]; then
|
||||
# Clean potential input line formatting.
|
||||
model_pose="$( echo ${PX4_GZ_MODEL_POSE} | sed -e 's/^[ \t]*//; s/[ \t]*$//; s/,/ /g; s/ / /g; s/ /,/g' )"
|
||||
echo "INFO [init] PX4_GZ_MODEL_POSE set, spawning at: ${model_pose}"
|
||||
else
|
||||
echo "WARN [init] PX4_GZ_MODEL_POSE not set, spawning at origin."
|
||||
model_pose="0,0,0,0,0,0"
|
||||
fi
|
||||
# start gz bridge with pose arg.
|
||||
if gz_bridge start -p "${model_pose}" -m "${PX4_GZ_MODEL}" -w "${PX4_GZ_WORLD}" -i "${px4_instance}"; then
|
||||
if [ -z $PX4_IGN_MODEL_POSE ]; then
|
||||
# start ignition bridge without pose arg.
|
||||
echo "WARN [init] PX4_IGN_MODEL_POSE not set, spawning at origin."
|
||||
if simulator_ignition_bridge start -m "${PX4_SIM_MODEL}" -w "${PX4_SIM_WORLD}"; then
|
||||
sensor_baro_sim start
|
||||
sensor_gps_sim start
|
||||
sensor_mag_sim start
|
||||
@@ -93,29 +55,22 @@ elif [ "$PX4_SIMULATOR" = "gz" ]; then
|
||||
echo "ERROR [init] ign gazebo failed to start"
|
||||
exit 1
|
||||
fi
|
||||
elif [ ! -z $PX4_GZ_MODEL_NAME ] && [ -z $PX4_GZ_MODEL ]; then
|
||||
if gz_bridge start -n "${PX4_GZ_MODEL_NAME}" -w "${PX4_GZ_WORLD}"; then
|
||||
sensor_baro_sim start
|
||||
sensor_gps_sim start
|
||||
sensor_mag_sim start
|
||||
else
|
||||
echo "ERROR [init] ign gazebo failed to start"
|
||||
exit 1
|
||||
fi
|
||||
elif [ ! -z $PX4_SIM_MODEL ] && [ -z $PX4_GZ_MODEL_NAME ] && [ -z $PX4_GZ_MODEL ]; then
|
||||
echo "WARN [init] PX4_GZ_MODEL_NAME or PX4_GZ_MODEL not set using PX4_SIM_MODEL."
|
||||
if gz_bridge start -m "${PX4_SIM_MODEL}" -w "${PX4_GZ_WORLD}" -i "${px4_instance}"; then
|
||||
sensor_baro_sim start
|
||||
sensor_gps_sim start
|
||||
sensor_mag_sim start
|
||||
else
|
||||
echo "ERROR [init] ign gazebo failed to start"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
echo "ERROR [init] failed to pass only PX4_GZ_MODEL_NAME or PX4_GZ_MODEL"
|
||||
exit 1
|
||||
|
||||
# Clean potential input line formatting.
|
||||
model_pose="$( echo ${PX4_IGN_MODEL_POSE} | sed -e 's/^[ \t]*//; s/[ \t]*$//; s/,/ /g; s/ / /g; s/ /,/g' )"
|
||||
echo "INFO [init] PX4_IGN_MODEL_POSE set, spawning at: ${model_pose}"
|
||||
|
||||
# start ignition bridge with pose arg.
|
||||
if simulator_ignition_bridge start -p "${model_pose}" -m "${PX4_SIM_MODEL}" -w "${PX4_SIM_WORLD}"; then
|
||||
sensor_baro_sim start
|
||||
sensor_gps_sim start
|
||||
sensor_mag_sim start
|
||||
else
|
||||
echo "ERROR [init] ign gazebo failed to start"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
@@ -38,6 +38,7 @@ param set-default MIS_YAW_TMT 10
|
||||
param set-default MPC_ACC_HOR_MAX 2
|
||||
param set-default MPC_ACC_HOR_MAX 2
|
||||
param set-default MPC_THR_MIN 0.1
|
||||
param set-default MPC_TKO_SPEED 1
|
||||
param set-default MPC_XY_P 0.8
|
||||
param set-default MPC_XY_VEL_D_ACC 0.1
|
||||
param set-default MPC_XY_VEL_I_ACC 4
|
||||
|
||||
@@ -65,6 +65,7 @@ param set-default COM_SPOOLUP_TIME 1.5
|
||||
param set-default MPC_THR_HOVER 0.45
|
||||
param set-default MPC_TILTMAX_AIR 25
|
||||
param set-default MPC_TKO_RAMP_T 1.8
|
||||
param set-default MPC_TKO_SPEED 1
|
||||
param set-default MPC_VEL_MANUAL 3
|
||||
param set-default MPC_XY_CRUISE 3
|
||||
param set-default MPC_XY_VEL_MAX 3.5
|
||||
|
||||
@@ -63,6 +63,7 @@ param set-default MPC_ACC_UP_MAX 4
|
||||
param set-default MPC_MAN_Y_MAX 120
|
||||
param set-default MPC_TILTMAX_AIR 45
|
||||
param set-default MPC_THR_HOVER 0.3
|
||||
param set-default MPC_TKO_SPEED 1
|
||||
param set-default MPC_VEL_MANUAL 5
|
||||
param set-default MPC_XY_CRUISE 5
|
||||
param set-default MPC_XY_VEL_MAX 5
|
||||
|
||||
@@ -64,6 +64,7 @@ param set-default MPC_MANTHR_MIN 0
|
||||
param set-default MPC_MAN_Y_MAX 120
|
||||
param set-default MPC_TILTMAX_AIR 45
|
||||
param set-default MPC_THR_HOVER 0.3
|
||||
param set-default MPC_TKO_SPEED 1
|
||||
param set-default MPC_VEL_MANUAL 5
|
||||
param set-default MPC_XY_CRUISE 5
|
||||
param set-default MPC_XY_VEL_MAX 5
|
||||
|
||||
@@ -53,6 +53,7 @@ param set-default MPC_XY_VEL_P_ACC 2.6
|
||||
param set-default MPC_XY_VEL_I_ACC 1.2
|
||||
param set-default MPC_XY_VEL_D_ACC 0.2
|
||||
param set-default MPC_TKO_RAMP_T 1
|
||||
param set-default MPC_TKO_SPEED 1.1
|
||||
param set-default MPC_VEL_MANUAL 3
|
||||
|
||||
param set-default BAT1_SOURCE 0
|
||||
|
||||
@@ -62,6 +62,7 @@ param set-default MPC_XY_VEL_P_ACC 2.6
|
||||
param set-default MPC_XY_VEL_I_ACC 1.2
|
||||
param set-default MPC_XY_VEL_D_ACC 0.2
|
||||
param set-default MPC_TKO_RAMP_T 1
|
||||
param set-default MPC_TKO_SPEED 1.1
|
||||
param set-default MPC_VEL_MANUAL 3
|
||||
|
||||
param set-default BAT1_SOURCE 0
|
||||
|
||||
@@ -324,27 +324,6 @@ else
|
||||
rc_update start
|
||||
manual_control start
|
||||
|
||||
# Start camera trigger, capture and PPS before pwm_out as they might access
|
||||
# pwm pins
|
||||
if param greater -s TRIG_MODE 0
|
||||
then
|
||||
camera_trigger start
|
||||
camera_feedback start
|
||||
fi
|
||||
# PPS capture driver
|
||||
if param greater -s PPS_CAP_ENABLE 0
|
||||
then
|
||||
pps_capture start
|
||||
fi
|
||||
# Camera capture driver
|
||||
if param greater -s CAM_CAP_FBACK 0
|
||||
then
|
||||
if camera_capture start
|
||||
then
|
||||
camera_capture on
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Sensors System (start before Commander so Preflight checks are properly run).
|
||||
# Commander needs to be this early for in-air-restarts.
|
||||
@@ -411,6 +390,12 @@ else
|
||||
mag_bias_estimator start
|
||||
fi
|
||||
|
||||
if param greater -s TRIG_MODE 0
|
||||
then
|
||||
camera_trigger start
|
||||
camera_feedback start
|
||||
fi
|
||||
|
||||
#
|
||||
# Optional board mavlink streams: rc.board_mavlink
|
||||
#
|
||||
@@ -431,6 +416,21 @@ else
|
||||
# Must be started after the serial config is read
|
||||
rc_input start $RC_INPUT_ARGS
|
||||
|
||||
# PPS capture driver (before pwm_out)
|
||||
if param greater -s PPS_CAP_ENABLE 0
|
||||
then
|
||||
pps_capture start
|
||||
fi
|
||||
|
||||
# Camera capture driver (before pwm_out)
|
||||
if param greater -s CAM_CAP_FBACK 0
|
||||
then
|
||||
if camera_capture start
|
||||
then
|
||||
camera_capture on
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Play the startup tune (if not disabled or there is an error)
|
||||
#
|
||||
|
||||
@@ -28,13 +28,12 @@ args = parser.parse_args()
|
||||
verbose = args.verbose
|
||||
|
||||
build_configs = []
|
||||
excluded_boards = ['modalai_voxl2'] # TODO: fix and enable
|
||||
excluded_manufacturers = ['atlflight']
|
||||
excluded_platforms = ['qurt']
|
||||
excluded_labels = [
|
||||
'stackcheck',
|
||||
'nolockstep', 'replay', 'test',
|
||||
'uavcanv1', # TODO: fix and enable
|
||||
'uavcanv1' # TODO: fix and enable
|
||||
]
|
||||
|
||||
def process_target(px4board_file, target_name):
|
||||
@@ -88,18 +87,10 @@ for manufacturer in os.scandir(os.path.join(source_dir, 'boards')):
|
||||
for board in os.scandir(manufacturer.path):
|
||||
if not board.is_dir():
|
||||
continue
|
||||
|
||||
for files in os.scandir(board.path):
|
||||
if files.is_file() and files.name.endswith('.px4board'):
|
||||
|
||||
board_name = manufacturer.name + '_' + board.name
|
||||
label = files.name[:-9]
|
||||
target_name = manufacturer.name + '_' + board.name + '_' + label
|
||||
|
||||
if board_name in excluded_boards:
|
||||
if verbose: print(f'excluding board {board_name} ({target_name})')
|
||||
continue
|
||||
|
||||
if label in excluded_labels:
|
||||
if verbose: print(f'excluding label {label} ({target_name})')
|
||||
continue
|
||||
|
||||
@@ -489,7 +489,7 @@ actuators = {
|
||||
|
||||
with open(output_file, 'w') as outfile:
|
||||
indent = 2 if verbose else None
|
||||
json.dump(actuators, outfile, indent=indent, sort_keys=True)
|
||||
json.dump(actuators, outfile, indent=indent)
|
||||
|
||||
if compress:
|
||||
save_compressed(output_file)
|
||||
|
||||
@@ -92,7 +92,7 @@ class SourceParser(object):
|
||||
re_comment_start = re.compile(r'^\/\*\s*EVENT$')
|
||||
re_events_send = re.compile(r'^events::send[<\(]')
|
||||
re_comment_content = re.compile(r'^\*\s*(.*)')
|
||||
re_comment_tag = re.compile(r'^@([a-zA-Z][a-zA-Z0-9_-]*):?\s*(.*)')
|
||||
re_comment_tag = re.compile(r'^@([a-zA-Z][a-zA-Z0-9_]*):?\s*(.*)')
|
||||
re_comment_end = re.compile(r'(.*?)\s*\*\/$')
|
||||
re_code_end = re.compile(r'(.*?)\s*;$')
|
||||
re_template_args = re.compile(r'([a-zA-Z0-9_:\.]+)\s*<([a-zA-Z0-9_,\s:]+)\s*>\s*\((.*)\);$')
|
||||
@@ -107,7 +107,7 @@ class SourceParser(object):
|
||||
""" dict of 'group': [Event] list """
|
||||
return self._events
|
||||
|
||||
def Parse(self, contents, path):
|
||||
def Parse(self, contents):
|
||||
"""
|
||||
Incrementally parse program contents and append all found events
|
||||
to the list.
|
||||
@@ -117,7 +117,7 @@ class SourceParser(object):
|
||||
# names.
|
||||
state = None
|
||||
def finalize_current_tag(event, tag, value):
|
||||
if tag is None: return True
|
||||
if tag is None: return
|
||||
if tag == "description":
|
||||
descr = value.strip()
|
||||
# merge continued lines (but not e.g. enumerations)
|
||||
@@ -133,9 +133,6 @@ class SourceParser(object):
|
||||
"If this is not a typo, add the new group to the script".format(event.group, known_groups))
|
||||
elif tag == "type":
|
||||
event.type = value.strip()
|
||||
elif tag == "skip-file":
|
||||
print("Skipping file: {:}".format(path))
|
||||
return False
|
||||
elif tag.startswith("arg"):
|
||||
arg_index = int(tag[3:])-1
|
||||
arg_name = value.strip()
|
||||
@@ -143,7 +140,6 @@ class SourceParser(object):
|
||||
event.add_argument(None, arg_name)
|
||||
else:
|
||||
raise Exception("Invalid tag: {}\nvalue: {}".format(tag, value))
|
||||
return True
|
||||
|
||||
for line in self.re_split_lines.split(contents):
|
||||
line = line.strip()
|
||||
@@ -271,8 +267,7 @@ class SourceParser(object):
|
||||
comment_content = m.group(1)
|
||||
m = self.re_comment_tag.match(comment_content)
|
||||
if m:
|
||||
if not finalize_current_tag(event, current_tag, current_value):
|
||||
return True # skip file
|
||||
finalize_current_tag(event, current_tag, current_value)
|
||||
current_tag, current_value = m.group(1, 2)
|
||||
elif current_tag is not None:
|
||||
current_value += "\n"+comment_content
|
||||
@@ -282,8 +277,7 @@ class SourceParser(object):
|
||||
# "*" or "*/".
|
||||
raise Exception("Excpected a comment, got '{}'".format(line))
|
||||
if last_comment_line:
|
||||
if not finalize_current_tag(event, current_tag, current_value):
|
||||
return True # skip file
|
||||
finalize_current_tag(event, current_tag, current_value)
|
||||
state = "parse-command"
|
||||
return True
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class SourceScanner(object):
|
||||
print('Failed reading file: %s, skipping content.' % path)
|
||||
pass
|
||||
try:
|
||||
return parser.Parse(contents, path)
|
||||
return parser.Parse(contents)
|
||||
except Exception as e:
|
||||
print("Exception while parsing file {}".format(path))
|
||||
raise
|
||||
|
||||
@@ -77,23 +77,11 @@ except ImportError as e:
|
||||
print("")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# Define time to use time.time() by default
|
||||
def _time():
|
||||
return time.time()
|
||||
|
||||
# Detect python version
|
||||
if sys.version_info[0] < 3:
|
||||
runningPython3 = False
|
||||
else:
|
||||
runningPython3 = True
|
||||
if sys.version_info[1] >=3:
|
||||
# redefine to use monotonic time when available
|
||||
def _time():
|
||||
try:
|
||||
return time.monotonic()
|
||||
except Exception:
|
||||
return time.time()
|
||||
|
||||
class FirmwareNotSuitableException(Exception):
|
||||
def __init__(self, message):
|
||||
@@ -242,7 +230,7 @@ class uploader(object):
|
||||
|
||||
def open(self):
|
||||
# upload timeout
|
||||
timeout = _time() + 0.2
|
||||
timeout = time.time() + 0.2
|
||||
|
||||
# attempt to open the port while it exists and until timeout occurs
|
||||
while self.port is not None:
|
||||
@@ -252,7 +240,7 @@ class uploader(object):
|
||||
except AttributeError:
|
||||
portopen = self.port.isOpen()
|
||||
|
||||
if not portopen and _time() < timeout:
|
||||
if not portopen and time.time() < timeout:
|
||||
try:
|
||||
self.port.open()
|
||||
except OSError:
|
||||
@@ -427,16 +415,16 @@ class uploader(object):
|
||||
uploader.EOC)
|
||||
|
||||
# erase is very slow, give it 30s
|
||||
deadline = _time() + 30.0
|
||||
while _time() < deadline:
|
||||
deadline = time.time() + 30.0
|
||||
while time.time() < deadline:
|
||||
|
||||
usualEraseDuration = 15.0
|
||||
estimatedTimeRemaining = deadline-_time()
|
||||
estimatedTimeRemaining = deadline-time.time()
|
||||
if estimatedTimeRemaining >= usualEraseDuration:
|
||||
self.__drawProgressBar(label, 30.0-estimatedTimeRemaining, usualEraseDuration)
|
||||
else:
|
||||
self.__drawProgressBar(label, 10.0, 10.0)
|
||||
sys.stdout.write(" (timeout: %d seconds) " % int(deadline-_time()))
|
||||
sys.stdout.write(" (timeout: %d seconds) " % int(deadline-time.time()))
|
||||
sys.stdout.flush()
|
||||
|
||||
if self.__trySync():
|
||||
@@ -584,7 +572,7 @@ class uploader(object):
|
||||
# upload the firmware
|
||||
def upload(self, fw, force=False, boot_delay=None):
|
||||
# Make sure we are doing the right thing
|
||||
start = _time()
|
||||
start = time.time()
|
||||
if self.board_type != fw.property('board_id'):
|
||||
msg = "Firmware not suitable for this board (Firmware board_type=%u board_id=%u)" % (
|
||||
self.board_type, fw.property('board_id'))
|
||||
@@ -680,7 +668,7 @@ class uploader(object):
|
||||
print("\nRebooting.", end='')
|
||||
self.__reboot()
|
||||
self.port.close()
|
||||
print(" Elapsed Time %3.3f\n" % (_time() - start))
|
||||
print(" Elapsed Time %3.3f\n" % (time.time() - start))
|
||||
|
||||
def __next_baud_flightstack(self):
|
||||
if self.baudrate_flightstack_idx + 1 >= len(self.baudrate_flightstack):
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
## Bash script to setup PX4 development environment on Ubuntu LTS (22.04, 20.04, 18.04).
|
||||
## Bash script to setup PX4 development environment on Ubuntu LTS (20.04, 18.04, 16.04).
|
||||
## Can also be used in docker.
|
||||
##
|
||||
## Installs:
|
||||
@@ -16,7 +16,6 @@ set -e
|
||||
INSTALL_NUTTX="true"
|
||||
INSTALL_SIM="true"
|
||||
INSTALL_ARCH=`uname -m`
|
||||
INSTALL_SIM_JAMMY="false"
|
||||
|
||||
# Parse arguments
|
||||
for arg in "$@"
|
||||
@@ -29,10 +28,6 @@ do
|
||||
INSTALL_SIM="false"
|
||||
fi
|
||||
|
||||
if [[ $arg == "--sim_jammy" ]]; then
|
||||
INSTALL_SIM_JAMMY="true"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
# detect if running in docker
|
||||
@@ -72,10 +67,6 @@ elif [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
||||
echo "Ubuntu 18.04"
|
||||
elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
echo "Ubuntu 20.04"
|
||||
elif [[ "${UBUNTU_RELEASE}" == "22.04" ]]; then
|
||||
echo "Ubuntu 22.04, simulation build off by default."
|
||||
echo "Use --sim_jammy to enable simulation build."
|
||||
INSTALL_SIM=$INSTALL_SIM_JAMMY
|
||||
fi
|
||||
|
||||
|
||||
@@ -155,7 +146,7 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
util-linux \
|
||||
vim-common \
|
||||
;
|
||||
if [[ "${UBUNTU_RELEASE}" == "20.04" || "${UBUNTU_RELEASE}" == "22.04" ]]; then
|
||||
if [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
kconfig-frontends \
|
||||
;
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<sdf version='1.9'>
|
||||
<model name='x500-Depth'>
|
||||
<include merge='true'>
|
||||
<uri>https://fuel.gazebosim.org/1.0/RudisLaboratories/models/x500-Base</uri>
|
||||
</include>
|
||||
<include merge='true'>
|
||||
<uri>https://fuel.gazebosim.org/1.0/RudisLaboratories/models/OakD-Lite</uri>
|
||||
<pose>.12 .03 .242 0 0 0</pose>
|
||||
</include>
|
||||
<joint name="CameraJoint" type="fixed">
|
||||
<parent>base_link</parent>
|
||||
<child>OakD-Lite/base_link</child>
|
||||
<pose relative_to="base_link">.12 .03 .242 0 0 0</pose>
|
||||
</joint>
|
||||
</model>
|
||||
</sdf>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<model>
|
||||
<name>x500-NoPlugin</name>
|
||||
<version>1.0</version>
|
||||
<sdf version="1.9">model.sdf</sdf>
|
||||
<author>
|
||||
<name>Benjamin Perseghetti</name>
|
||||
<email>bperseghetti@rudislabs.com</email>
|
||||
</author>
|
||||
<description>Model of the NXP HoverGames Drone development kit (KIT-HGDRONEK66). The PX4 software compatible kit provides mechanical, RC remote and other components needed to evaluate the RDDRONE-FMUK66 reference design. The FMU includes 100Base-T1 Automotive Ethernet, dual CAN transceivers, as well as SE050 secure element, and works with add on boards NavQPlus, MR-T1ETH8, MR-T1ADAPT, and CAN-nodes such as UCANS32K1SIC. Kit may be used with, and contains the components needed for the HoverGames.com coding challenges.</description>
|
||||
</model>
|
||||
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<model>
|
||||
<name>x500-Legacy</name>
|
||||
<name>x500-Base</name>
|
||||
<version>1.0</version>
|
||||
<sdf version="1.9">model.sdf</sdf>
|
||||
<author>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<sdf version='1.9'>
|
||||
<model name='x500-NoPlugin'>
|
||||
<model name='x500-Base'>
|
||||
<pose>0 0 .24 0 0 0</pose>
|
||||
<self_collide>false</self_collide>
|
||||
<static>false</static>
|
||||
@@ -23,7 +23,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>1 1 1</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/NXP-HGD-CF.dae</uri>
|
||||
<uri>model://x500-Base/meshes/NXP-HGD-CF.dae</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
@@ -32,7 +32,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>1 1 1</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/5010Base.dae</uri>
|
||||
<uri>model://x500-Base/meshes/5010Base.dae</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
@@ -41,7 +41,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>1 1 1</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/5010Base.dae</uri>
|
||||
<uri>model://x500-Base/meshes/5010Base.dae</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
@@ -50,7 +50,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>1 1 1</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/5010Base.dae</uri>
|
||||
<uri>model://x500-Base/meshes/5010Base.dae</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
@@ -59,7 +59,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>1 1 1</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/5010Base.dae</uri>
|
||||
<uri>model://x500-Base/meshes/5010Base.dae</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
@@ -77,7 +77,7 @@
|
||||
<specular>1.0 1.0 1.0</specular>
|
||||
<pbr>
|
||||
<metal>
|
||||
<albedo_map>model://x500-NoPlugin/materials/textures/nxp.png</albedo_map>
|
||||
<albedo_map>model://x500-Base/materials/textures/nxp.png</albedo_map>
|
||||
</metal>
|
||||
</pbr>
|
||||
</material>
|
||||
@@ -96,7 +96,7 @@
|
||||
<specular>1.0 1.0 1.0</specular>
|
||||
<pbr>
|
||||
<metal>
|
||||
<albedo_map>model://x500-NoPlugin/materials/textures/nxp.png</albedo_map>
|
||||
<albedo_map>model://x500-Base/materials/textures/nxp.png</albedo_map>
|
||||
</metal>
|
||||
</pbr>
|
||||
</material>
|
||||
@@ -115,7 +115,7 @@
|
||||
<specular>1.0 1.0 1.0</specular>
|
||||
<pbr>
|
||||
<metal>
|
||||
<albedo_map>model://x500-NoPlugin/materials/textures/rd.png</albedo_map>
|
||||
<albedo_map>model://x500-Base/materials/textures/rd.png</albedo_map>
|
||||
</metal>
|
||||
</pbr>
|
||||
</material>
|
||||
@@ -238,7 +238,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>0.8461538461538461 0.8461538461538461 0.8461538461538461</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/1345_prop_ccw.stl</uri>
|
||||
<uri>model://x500-Base/meshes/1345_prop_ccw.stl</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
<material>
|
||||
@@ -253,7 +253,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>1 1 1</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/5010Bell.dae</uri>
|
||||
<uri>model://x500-Base/meshes/5010Bell.dae</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
@@ -311,7 +311,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>0.8461538461538461 0.8461538461538461 0.8461538461538461</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/1345_prop_ccw.stl</uri>
|
||||
<uri>model://x500-Base/meshes/1345_prop_ccw.stl</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
<material>
|
||||
@@ -326,7 +326,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>1 1 1</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/5010Bell.dae</uri>
|
||||
<uri>model://x500-Base/meshes/5010Bell.dae</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
@@ -384,7 +384,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>0.8461538461538461 0.8461538461538461 0.8461538461538461</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/1345_prop_cw.stl</uri>
|
||||
<uri>model://x500-Base/meshes/1345_prop_cw.stl</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
<material>
|
||||
@@ -399,7 +399,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>1 1 1</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/5010Bell.dae</uri>
|
||||
<uri>model://x500-Base/meshes/5010Bell.dae</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
@@ -457,7 +457,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>0.8461538461538461 0.8461538461538461 0.8461538461538461</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/1345_prop_cw.stl</uri>
|
||||
<uri>model://x500-Base/meshes/1345_prop_cw.stl</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
<material>
|
||||
@@ -472,7 +472,7 @@
|
||||
<geometry>
|
||||
<mesh>
|
||||
<scale>1 1 1</scale>
|
||||
<uri>model://x500-NoPlugin/meshes/5010Bell.dae</uri>
|
||||
<uri>model://x500-Base/meshes/5010Bell.dae</uri>
|
||||
</mesh>
|
||||
</geometry>
|
||||
</visual>
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<sdf version='1.9'>
|
||||
<model name='x500-Legacy'>
|
||||
<model name='x500-Depth'>
|
||||
<include merge='true'>
|
||||
<uri>model://x500-NoPlugin</uri>
|
||||
<uri>model://x500-Base</uri>
|
||||
</include>
|
||||
<plugin filename="ignition-gazebo-multicopter-motor-model-system" name="ignition::gazebo::systems::MulticopterMotorModel">
|
||||
<robotNamespace>/x500-Legacy_0</robotNamespace>
|
||||
<robotNamespace>model/x500-Depth</robotNamespace>
|
||||
<jointName>rotor_0_joint</jointName>
|
||||
<linkName>rotor_0</linkName>
|
||||
<turningDirection>ccw</turningDirection>
|
||||
@@ -22,7 +22,7 @@
|
||||
<motorType>velocity</motorType>
|
||||
</plugin>
|
||||
<plugin filename="ignition-gazebo-multicopter-motor-model-system" name="ignition::gazebo::systems::MulticopterMotorModel">
|
||||
<robotNamespace>/x500-Legacy_0</robotNamespace>
|
||||
<robotNamespace>model/x500-Depth</robotNamespace>
|
||||
<jointName>rotor_1_joint</jointName>
|
||||
<linkName>rotor_1</linkName>
|
||||
<turningDirection>ccw</turningDirection>
|
||||
@@ -39,7 +39,7 @@
|
||||
<motorType>velocity</motorType>
|
||||
</plugin>
|
||||
<plugin filename="ignition-gazebo-multicopter-motor-model-system" name="ignition::gazebo::systems::MulticopterMotorModel">
|
||||
<robotNamespace>/x500-Legacy_0</robotNamespace>
|
||||
<robotNamespace>model/x500-Depth</robotNamespace>
|
||||
<jointName>rotor_2_joint</jointName>
|
||||
<linkName>rotor_2</linkName>
|
||||
<turningDirection>cw</turningDirection>
|
||||
@@ -56,7 +56,7 @@
|
||||
<motorType>velocity</motorType>
|
||||
</plugin>
|
||||
<plugin filename="ignition-gazebo-multicopter-motor-model-system" name="ignition::gazebo::systems::MulticopterMotorModel">
|
||||
<robotNamespace>/x500-Legacy_0</robotNamespace>
|
||||
<robotNamespace>model/x500-Depth</robotNamespace>
|
||||
<jointName>rotor_3_joint</jointName>
|
||||
<linkName>rotor_3</linkName>
|
||||
<turningDirection>cw</turningDirection>
|
||||
@@ -72,5 +72,14 @@
|
||||
<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
|
||||
<motorType>velocity</motorType>
|
||||
</plugin>
|
||||
<include merge='true'>
|
||||
<uri>https://fuel.gazebosim.org/1.0/RudisLaboratories/models/OakD-Lite</uri>
|
||||
<pose>.12 .03 .242 0 0 0</pose>
|
||||
</include>
|
||||
<joint name="CameraJoint" type="fixed">
|
||||
<parent>base_link</parent>
|
||||
<child>OakD-Lite/base_link</child>
|
||||
<pose relative_to="base_link">.12 .03 .242 0 0 0</pose>
|
||||
</joint>
|
||||
</model>
|
||||
</sdf>
|
||||
</sdf>
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -2,9 +2,10 @@
|
||||
<sdf version='1.9'>
|
||||
<model name='x500'>
|
||||
<include merge='true'>
|
||||
<uri>model://x500-NoPlugin</uri>
|
||||
<uri>model://x500-Base</uri>
|
||||
</include>
|
||||
<plugin filename="ignition-gazebo-multicopter-motor-model-system" name="ignition::gazebo::systems::MulticopterMotorModel">
|
||||
<robotNamespace>model/x500</robotNamespace>
|
||||
<jointName>rotor_0_joint</jointName>
|
||||
<linkName>rotor_0</linkName>
|
||||
<turningDirection>ccw</turningDirection>
|
||||
@@ -21,6 +22,7 @@
|
||||
<motorType>velocity</motorType>
|
||||
</plugin>
|
||||
<plugin filename="ignition-gazebo-multicopter-motor-model-system" name="ignition::gazebo::systems::MulticopterMotorModel">
|
||||
<robotNamespace>model/x500</robotNamespace>
|
||||
<jointName>rotor_1_joint</jointName>
|
||||
<linkName>rotor_1</linkName>
|
||||
<turningDirection>ccw</turningDirection>
|
||||
@@ -37,6 +39,7 @@
|
||||
<motorType>velocity</motorType>
|
||||
</plugin>
|
||||
<plugin filename="ignition-gazebo-multicopter-motor-model-system" name="ignition::gazebo::systems::MulticopterMotorModel">
|
||||
<robotNamespace>model/x500</robotNamespace>
|
||||
<jointName>rotor_2_joint</jointName>
|
||||
<linkName>rotor_2</linkName>
|
||||
<turningDirection>cw</turningDirection>
|
||||
@@ -53,6 +56,7 @@
|
||||
<motorType>velocity</motorType>
|
||||
</plugin>
|
||||
<plugin filename="ignition-gazebo-multicopter-motor-model-system" name="ignition::gazebo::systems::MulticopterMotorModel">
|
||||
<robotNamespace>model/x500</robotNamespace>
|
||||
<jointName>rotor_3_joint</jointName>
|
||||
<linkName>rotor_3</linkName>
|
||||
<turningDirection>cw</turningDirection>
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -8,8 +8,6 @@ CONFIG_DRIVERS_BOOTLOADERS=y
|
||||
CONFIG_DRIVERS_DISTANCE_SENSOR_BROADCOM_AFBRS50=y
|
||||
CONFIG_DRIVERS_IMU_BOSCH_BMI088=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_IIM42652=y
|
||||
CONFIG_DRIVERS_OPTICAL_FLOW_PAA3905=y
|
||||
CONFIG_DRIVERS_OPTICAL_FLOW_PAW3902=y
|
||||
CONFIG_BOARD_UAVCAN_INTERFACES=1
|
||||
CONFIG_DRIVERS_UAVCANNODE=y
|
||||
|
||||
@@ -6,18 +6,12 @@
|
||||
param set-default IMU_GYRO_RATEMAX 1000
|
||||
|
||||
# Internal SPI
|
||||
if ! paw3902 -s start -Y 180
|
||||
then
|
||||
paa3905 -s start -Y 180
|
||||
fi
|
||||
paw3902 -s start -Y 180
|
||||
|
||||
if ! icm42688p -R 0 -s start
|
||||
then
|
||||
if ! iim42652 -R 0 -s start
|
||||
then
|
||||
bmi088 -A -s -R 4 start
|
||||
bmi088 -G -s -R 4 start
|
||||
fi
|
||||
bmi088 -A -s -R 4 start
|
||||
bmi088 -G -s -R 4 start
|
||||
fi
|
||||
|
||||
afbrs50 start
|
||||
|
||||
@@ -40,9 +40,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIDevice(DRV_GYR_DEVTYPE_BMI088, SPI::CS{GPIO::PortA, GPIO::Pin15}, SPI::DRDY{GPIO::PortA, GPIO::Pin10}),
|
||||
initSPIDevice(DRV_ACC_DEVTYPE_BMI088, SPI::CS{GPIO::PortA, GPIO::Pin4}, SPI::DRDY{GPIO::PortB, GPIO::Pin0}),
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortA, GPIO::Pin4}, SPI::DRDY{GPIO::PortB, GPIO::Pin0}),
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_IIM42652, SPI::CS{GPIO::PortA, GPIO::Pin4}, SPI::DRDY{GPIO::PortB, GPIO::Pin0}),
|
||||
initSPIDevice(DRV_FLOW_DEVTYPE_PAW3902, SPI::CS{GPIO::PortB, GPIO::Pin5}, SPI::DRDY{GPIO::PortB, GPIO::Pin2}),
|
||||
initSPIDevice(DRV_FLOW_DEVTYPE_PAA3905, SPI::CS{GPIO::PortB, GPIO::Pin5}, SPI::DRDY{GPIO::PortB, GPIO::Pin2}),
|
||||
}),
|
||||
initSPIBus(SPI::Bus::SPI2, {
|
||||
initSPIDevice(DRV_DEVTYPE_UNUSED, SPI::CS{GPIO::PortB, GPIO::Pin12}, SPI::DRDY{GPIO::PortB, GPIO::Pin4}),
|
||||
|
||||
@@ -548,9 +548,6 @@ Syslink::handle_raw(syslink_message_t *sys)
|
||||
rc.values[3] = cmd->thrust * 1000 / USHRT_MAX + 1000;
|
||||
rc.values[4] = 1000; // Dummy channel as px4 needs at least 5
|
||||
|
||||
rc.link_quality = -1;
|
||||
rc.rssi_dbm = NAN;
|
||||
|
||||
_rc_pub.publish(rc);
|
||||
|
||||
} else if (c->port == CRTP_PORT_MAVLINK) {
|
||||
|
||||
@@ -23,6 +23,7 @@ CONFIG_DRIVERS_IRLOCK=y
|
||||
CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
CONFIG_DRIVERS_OSD=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
CONFIG_DRIVERS_PWM_INPUT=y
|
||||
|
||||
@@ -152,9 +152,6 @@ void NavioSysRCInput::Run()
|
||||
data.timestamp_last_signal = timestamp_sample;
|
||||
data.channel_count = CHANNELS;
|
||||
data.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_PPM;
|
||||
data.link_quality = -1;
|
||||
data.rssi_dbm = NAN;
|
||||
|
||||
data.timestamp = hrt_absolute_time();
|
||||
|
||||
_input_rc_pub.publish(data);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
CONFIG_MODULES_MICRORTPS_BRIDGE=y
|
||||
@@ -24,7 +24,7 @@ CONFIG_DRIVERS_IRLOCK=y
|
||||
CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
CONFIG_COMMON_OSD=y
|
||||
CONFIG_DRIVERS_OSD=y
|
||||
CONFIG_DRIVERS_PCA9685=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
|
||||
@@ -23,7 +23,7 @@ CONFIG_DRIVERS_IRLOCK=y
|
||||
CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
CONFIG_COMMON_OSD=y
|
||||
CONFIG_DRIVERS_OSD=y
|
||||
CONFIG_DRIVERS_PCA9685=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
# PX4 on VOXL 2
|
||||
|
||||
VOXL 2 from ModalAI can be used as a companion computer to a flight control board
|
||||
but it can also run PX4 directly.
|
||||
|
||||
## Overview
|
||||
|
||||
When running PX4 directly on the QRB5165 SoC it runs partially on the Sensor Low Power Island (SLPI) DSP (aka sdsp) and partially on the application processor (ARM64 / aarch64).
|
||||
The portion running on the DSP hosts the flight critical portions of PX4 such as
|
||||
the IMU, barometer, magnetometer, GPS, ESC, and power management drivers, and the
|
||||
state estimation. The DSP acts as the real time portion of the system. Non flight
|
||||
critical applications such as Mavlink, logging, and commander are running on the
|
||||
ARM CPU cluster (aka apps proc). The DSP and ARM CPU cluster communicate via a
|
||||
Qualcomm proprietary shared memory interface.
|
||||
|
||||
## Build environment
|
||||
|
||||
In order to build for this platform both the Qualcomm Hexagon (DSP) toolchain and the Linaro ARM64 toolchain need to be installed. The (nearly) complete setup including the ARM64 toolchain is provided in the base Docker image provided by ModalAI, but since ModalAI is not allowed to redistribute the Qualcomm Hexagon DSP SDK this must be added by the end user.
|
||||
|
||||
The full instructions are available here:
|
||||
- https://gitlab.com/voxl-public/rb5-flight/rb5-flight-px4-build-docker
|
||||
|
||||
## Build overview
|
||||
|
||||
- Clone the repo (Don't forget to update and initialize all submodules)
|
||||
- In the top level directory
|
||||
```
|
||||
px4$ boards/modalai/voxl2/run-docker.sh
|
||||
root@9373fa1401b8:/usr/local/workspace# boards/modalai/voxl2/clean.sh
|
||||
root@9373fa1401b8:/usr/local/workspace# boards/modalai/voxl2/build-posix.sh
|
||||
root@9373fa1401b8:/usr/local/workspace# boards/modalai/voxl2/build-qurt.sh
|
||||
root@9373fa1401b8:/usr/local/workspace# exit
|
||||
```
|
||||
|
||||
## Install and run on VOXL 2
|
||||
|
||||
Once the DSP and Linux images have been built they can be installed on a VOXL 2
|
||||
board using ADB. There is a script to do this.
|
||||
```
|
||||
px4$ boards/modalai/voxl2/install-voxl.sh
|
||||
```
|
||||
|
||||
## Running PX4 on VOXL 2
|
||||
|
||||
After installing PX4 on the board, open a terminal on VOXL 2 using ADB shell.
|
||||
PX4 can be run using a start script.
|
||||
```
|
||||
root@m0054:/# voxl-px4
|
||||
Found DSP signature file
|
||||
/
|
||||
INFO [px4] mlockall() enabled. PX4's virtual address space is locked into RAM.
|
||||
INFO [px4] assuming working directory is rootfs, no symlinks needed.
|
||||
|
||||
______ __ __ ___
|
||||
| ___ \ \ \ / / / |
|
||||
| |_/ / \ V / / /| |
|
||||
| __/ / \ / /_| |
|
||||
| | / /^\ \ \___ |
|
||||
\_| \/ \/ |_/
|
||||
|
||||
px4 starting.
|
||||
|
||||
INFO [px4] Calling startup script: /bin/sh /etc/modalai/voxl-px4.config 0
|
||||
INFO [muorb] muorb protobuf initalize method succeeded
|
||||
INFO [px4] Startup script returned successfully
|
||||
pxh>
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
Start with a VOXL 2 that only has the system image installed, not the SDK
|
||||
|
||||
In order to see DSP specific debug messages the mini-dm tool in the Hexagon SDK
|
||||
can be used:
|
||||
```
|
||||
modalai@modalai-XPS-15-9570:/local/mnt/workspace/Qualcomm/Hexagon_SDK/4.1.0.4/tools/debug/mini-dm/Ubuntu18$ sudo ./mini-dm
|
||||
[sudo] password for modalai:
|
||||
Running mini-dm version: 3.2
|
||||
Completed processing command line ---
|
||||
Connecting to the only usbport connected
|
||||
mini-dm is waiting for a DMSS connection...
|
||||
DMSS is connected. Running mini-dm...
|
||||
------------Mini-dm is ready to log-------------
|
||||
[08500/02] 06:21.030 0069:01: SDSP: Creating new instance. 0355 sns_flight_controller_sensor.
|
||||
[08500/02] 06:21.030 0069:01: SDSP: Creating data streams 0292 sns_flight_controller_sensor_
|
||||
[08500/02] 06:21.030 0069:01: SDSP: Configuring devices 0305 sns_flight_controller_sensor_
|
||||
[08500/02] 06:21.030 0069:01: SDSP: Flight controller sensor instance initialized 0344 sns_flight_controller_sensor_
|
||||
[08500/01] 06:21.092 0069:01: SDSP: Hello, world! 0000 test
|
||||
[08500/02] 06:21.092 006a:01: SDSP: CPU Utilization: 0.04, wait percentage 99.94 0162 sns_flight_controller_sensor.
|
||||
[08500/02] 06:21.092 006a:01: SDSP: Got interrupt registered event 0082 sns_flight_controller_sensor_
|
||||
```
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "*** Starting posix build ***"
|
||||
|
||||
source /home/build-env.sh
|
||||
|
||||
make modalai_voxl2_default
|
||||
|
||||
cat build/modalai_voxl2_default/src/lib/version/build_git_version.h
|
||||
|
||||
|
||||
echo "*** End of posix build ***"
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "*** Starting qurt build ***"
|
||||
|
||||
source /home/build-env.sh
|
||||
|
||||
make modalai_voxl2_qurt
|
||||
|
||||
cat build/modalai_voxl2_default/src/lib/version/build_git_version.h
|
||||
|
||||
echo "*** End of qurt build ***"
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Clean out the build artifacts
|
||||
source /home/build-env.sh
|
||||
make clean
|
||||
@@ -1,54 +0,0 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2022 ModalAI, Inc. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# Overview:
|
||||
# Voxl2 PX4 is built in 2 parts, the part that runs on the
|
||||
# application (apps) processor, and the library that is loaded on the DSP.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include(px4_git)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH
|
||||
"${PX4_SOURCE_DIR}/platforms/posix/cmake"
|
||||
)
|
||||
|
||||
# set(DISABLE_PARAMS_MODULE_SCOPING TRUE)
|
||||
|
||||
add_definitions(-DORB_COMMUNICATOR)
|
||||
|
||||
set(CONFIG_PARAM_SERVER "1")
|
||||
|
||||
add_definitions( -D__PX4_LINUX )
|
||||
|
||||
include(CMakeParseArguments)
|
||||
@@ -1,43 +0,0 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2022 ModalAI, Inc. All rights reserved.
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This cmake config builds for QURT which is the operating system running on
|
||||
# the DSP side of VOXL 2
|
||||
#
|
||||
# Required environment variables:
|
||||
# HEXAGON_TOOLS_ROOT
|
||||
# HEXAGON_SDK_ROOT
|
||||
#
|
||||
############################################################################
|
||||
|
||||
if ("$ENV{HEXAGON_SDK_ROOT}" STREQUAL "")
|
||||
message(FATAL_ERROR "Enviroment variable HEXAGON_SDK_ROOT must be set")
|
||||
else()
|
||||
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
|
||||
endif()
|
||||
|
||||
if ("$ENV{HEXAGON_TOOLS_ROOT}" STREQUAL "")
|
||||
message(FATAL_ERROR "Environment variable HEXAGON_TOOLS_ROOT must be set")
|
||||
else()
|
||||
set(HEXAGON_TOOLS_ROOT $ENV{HEXAGON_TOOLS_ROOT})
|
||||
endif()
|
||||
|
||||
include(px4_git)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH
|
||||
"${PX4_SOURCE_DIR}/platforms/qurt/cmake"
|
||||
)
|
||||
|
||||
include(Toolchain-qurt)
|
||||
include(qurt_reqs)
|
||||
|
||||
include_directories(${HEXAGON_SDK_INCLUDES})
|
||||
|
||||
add_definitions(-DORB_COMMUNICATOR)
|
||||
|
||||
set(CONFIG_PARAM_CLIENT "1")
|
||||
|
||||
set(DISABLE_PARAMS_MODULE_SCOPING TRUE)
|
||||
@@ -1,4 +0,0 @@
|
||||
CONFIG_PLATFORM_POSIX=y
|
||||
CONFIG_BOARD_LINUX=y
|
||||
CONFIG_BOARD_TOOLCHAIN="aarch64-linux-gnu"
|
||||
CONFIG_MODULES_MUORB_APPS=y
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Push qurt image to voxl2
|
||||
adb push build/modalai_voxl2_qurt/platforms/qurt/libpx4.so /usr/lib/rfsa/adsp
|
||||
|
||||
# Push posix image to voxl2
|
||||
adb push build/modalai_voxl2_default/bin/px4 /usr/bin
|
||||
|
||||
# Push scripts to voxl2
|
||||
adb push build/modalai_voxl2_default/bin/px4-alias.sh /usr/bin
|
||||
adb push boards/modalai/voxl2/voxl-px4 /usr/bin
|
||||
adb shell chmod a+x /usr/bin/px4-alias.sh
|
||||
adb shell chmod a+x /usr/bin/voxl-px4
|
||||
|
||||
# Push configuration file
|
||||
adb shell mkdir -p /etc/modalai
|
||||
adb push boards/modalai/voxl2/voxl-px4.config /etc/modalai
|
||||
|
||||
adb shell sync
|
||||
@@ -1,3 +0,0 @@
|
||||
CONFIG_PLATFORM_QURT=y
|
||||
CONFIG_BOARD_TOOLCHAIN="qurt"
|
||||
CONFIG_MODULES_MUORB_SLPI=y
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run this from the px4 project top level directory
|
||||
docker run -it --rm -v `pwd`:/usr/local/workspace rb5-flight-px4-build-docker
|
||||
@@ -1,37 +0,0 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2022 ModalAI, Inc. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_library(drivers_board
|
||||
board_config.h
|
||||
init.c
|
||||
)
|
||||
@@ -1,35 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2022 ModalAI, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include "board_config.h"
|
||||
|
||||
// Place holder for VOXL2-specific early startup code
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Make sure that the SLPI DSP test signature is there otherwise px4 cannot run
|
||||
# on the DSP
|
||||
if /bin/ls /usr/lib/rfsa/adsp/testsig-*.so &> /dev/null; then
|
||||
/bin/echo "Found DSP signature file"
|
||||
else
|
||||
/bin/echo "Error, could not find DSP signature file"
|
||||
# Look for the DSP signature generation script
|
||||
if [ -f /share/modalai/qrb5165-slpi-test-sig/generate-test-sig.sh ]; then
|
||||
/bin/echo "Attempting to generate the DSP signature file"
|
||||
# Automatically generate the test signature so that px4 can run on SLPI DSP
|
||||
/share/modalai/qrb5165-slpi-test-sig/generate-test-sig.sh
|
||||
else
|
||||
/bin/echo "Could not find the DSP signature file generation script"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make sure to setup all of the needed px4 aliases.
|
||||
cd /usr/bin
|
||||
/bin/ln -f -s px4 px4-muorb
|
||||
cd -
|
||||
|
||||
DAEMON=" "
|
||||
S="OFF"
|
||||
|
||||
while getopts "ds" flag
|
||||
do
|
||||
case "${flag}" in
|
||||
# Use -d to put PX4 into daemon mode
|
||||
d) DAEMON="-d";;
|
||||
# Use -s to run self tests
|
||||
s) S="ON";;
|
||||
esac
|
||||
done
|
||||
|
||||
TESTMODE=$S px4 $DAEMON -s /etc/modalai/voxl-px4.config
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
# PX4 commands need the 'px4-' prefix in bash.
|
||||
# (px4-alias.sh is expected to be in the PATH)
|
||||
. px4-alias.sh
|
||||
|
||||
if [ $TESTMODE = "ON" ]; then
|
||||
/bin/echo "Running self tests"
|
||||
muorb test
|
||||
MUORB_TEST_STATUS=$?
|
||||
if [ $MUORB_TEST_STATUS -ne 0 ]; then
|
||||
/bin/echo "muorb test failed"
|
||||
shutdown
|
||||
exit 0
|
||||
else
|
||||
/bin/echo "muorb test passed"
|
||||
fi
|
||||
fi
|
||||
|
||||
muorb start
|
||||
@@ -127,6 +127,7 @@ CONFIG_MTD_RAMTRON=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETINIT_THREAD=y
|
||||
CONFIG_NETINIT_THREAD_PRIORITY=49
|
||||
CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NET_ARP_IPIN=y
|
||||
CONFIG_NET_ARP_SEND=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
@@ -156,6 +157,7 @@ CONFIG_NSH_DISABLE_UNAME=y
|
||||
CONFIG_NSH_DISABLE_WGET=y
|
||||
CONFIG_NSH_DISABLE_XD=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_IOBUFFER_SIZE=256
|
||||
CONFIG_NSH_LINELEN=128
|
||||
CONFIG_NSH_MAXARGUMENTS=15
|
||||
CONFIG_NSH_NESTDEPTH=8
|
||||
@@ -163,6 +165,8 @@ CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=1280
|
||||
CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=1024
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
@@ -200,6 +204,10 @@ CONFIG_SYSTEM_CUTERM_DEFAULT_BAUD=57600
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_TASK_NAME_SIZE=24
|
||||
CONFIG_TELNET_IOTHREAD_STACKSIZE=512
|
||||
CONFIG_TELNET_MAXLCLIENTS=1
|
||||
CONFIG_TELNET_RXBUFFER_SIZE=128
|
||||
CONFIG_TELNET_TXBUFFER_SIZE=128
|
||||
CONFIG_UART0_IFLOWCONTROL=y
|
||||
CONFIG_UART0_OFLOWCONTROL=y
|
||||
CONFIG_UART1_RXBUFSIZE=600
|
||||
|
||||
@@ -95,9 +95,7 @@ CONFIG_KINETIS_SDHC=y
|
||||
CONFIG_KINETIS_SERIALBRK_BSDCOMPAT=y
|
||||
CONFIG_KINETIS_SPI0=y
|
||||
CONFIG_KINETIS_SPI1=y
|
||||
CONFIG_KINETIS_SPI1_DMA=y
|
||||
CONFIG_KINETIS_SPI2=y
|
||||
CONFIG_KINETIS_SPI_DMA=y
|
||||
CONFIG_KINETIS_UART0=y
|
||||
CONFIG_KINETIS_UART0_RXDMA=y
|
||||
CONFIG_KINETIS_UART1=y
|
||||
@@ -127,6 +125,7 @@ CONFIG_MTD_RAMTRON=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETINIT_THREAD=y
|
||||
CONFIG_NETINIT_THREAD_PRIORITY=49
|
||||
CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NET_ARP_IPIN=y
|
||||
CONFIG_NET_ARP_SEND=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
@@ -156,6 +155,7 @@ CONFIG_NSH_DISABLE_UNAME=y
|
||||
CONFIG_NSH_DISABLE_WGET=y
|
||||
CONFIG_NSH_DISABLE_XD=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_IOBUFFER_SIZE=256
|
||||
CONFIG_NSH_LINELEN=128
|
||||
CONFIG_NSH_MAXARGUMENTS=15
|
||||
CONFIG_NSH_NESTDEPTH=8
|
||||
@@ -163,6 +163,8 @@ CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=1280
|
||||
CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=1024
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
@@ -200,6 +202,10 @@ CONFIG_SYSTEM_CUTERM_DEFAULT_BAUD=57600
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_TASK_NAME_SIZE=24
|
||||
CONFIG_TELNET_IOTHREAD_STACKSIZE=512
|
||||
CONFIG_TELNET_MAXLCLIENTS=1
|
||||
CONFIG_TELNET_RXBUFFER_SIZE=128
|
||||
CONFIG_TELNET_TXBUFFER_SIZE=128
|
||||
CONFIG_UART1_RXBUFSIZE=600
|
||||
CONFIG_UART1_TXBUFSIZE=1100
|
||||
CONFIG_UART4_BAUD=57600
|
||||
|
||||
@@ -100,7 +100,7 @@ else
|
||||
# V3 build hwtypecmp supports V2|V2M|V30
|
||||
if ! ver hwtypecmp V2M
|
||||
then
|
||||
mpu9250 -s -b 1 -R 14 -q start
|
||||
mpu9250 -s -b 1 -R 14 start
|
||||
# else: On the PixhawkMini the mpu9250 has been disabled due to HW errata
|
||||
fi
|
||||
|
||||
|
||||
@@ -47,14 +47,14 @@ constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
|
||||
};
|
||||
|
||||
|
||||
bool px4_i2c_bus_external(int bus)
|
||||
bool px4_i2c_bus_external(const px4_i2c_bus_t &bus)
|
||||
{
|
||||
if (HW_VER_FMUV3 == board_get_hw_version()) {
|
||||
/* All FMUV3 2.1 i2c buses are external */
|
||||
return true;
|
||||
|
||||
} else {
|
||||
if (bus != 2) {
|
||||
if (bus.bus != 2) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ else
|
||||
# V3 build hwtypecmp supports V2|V2M|V30
|
||||
if ! ver hwtypecmp V2M
|
||||
then
|
||||
mpu9250 -s -b 1 -R 14 -q start
|
||||
mpu9250 -s -b 1 -R 14 start
|
||||
# else: On the PixhawkMini the mpu9250 has been disabled due to HW errata
|
||||
fi
|
||||
|
||||
|
||||
@@ -47,14 +47,14 @@ constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
|
||||
};
|
||||
|
||||
|
||||
bool px4_i2c_bus_external(int bus)
|
||||
bool px4_i2c_bus_external(const px4_i2c_bus_t &bus)
|
||||
{
|
||||
if (HW_VER_FMUV3 == board_get_hw_version()) {
|
||||
/* All FMUV3 2.1 i2c buses are external */
|
||||
return true;
|
||||
|
||||
} else {
|
||||
if (bus != 2) {
|
||||
if (bus.bus != 2) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_DRIVERS_LIGHTS_RGBLED_PWM=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
CONFIG_COMMON_OSD=y
|
||||
CONFIG_DRIVERS_OSD_MSP_OSD=y
|
||||
CONFIG_DRIVERS_PCA9685=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
|
||||
@@ -29,7 +29,7 @@ CONFIG_DRIVERS_IRLOCK=y
|
||||
CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
CONFIG_COMMON_OSD=y
|
||||
CONFIG_DRIVERS_OSD=y
|
||||
CONFIG_DRIVERS_PCA9685=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
|
||||
@@ -9,7 +9,6 @@ CONFIG_BOARD_SERIAL_TEL3="/dev/ttyS1"
|
||||
CONFIG_DRIVERS_ADC_BOARD_ADC=y
|
||||
CONFIG_DRIVERS_BAROMETER_BMP388=y
|
||||
CONFIG_DRIVERS_BAROMETER_MS5611=y
|
||||
CONFIG_DRIVERS_BAROMETER_INVENSENSE_ICP201XX=y
|
||||
CONFIG_DRIVERS_BATT_SMBUS=y
|
||||
CONFIG_DRIVERS_CAMERA_CAPTURE=y
|
||||
CONFIG_DRIVERS_CAMERA_TRIGGER=y
|
||||
@@ -24,11 +23,9 @@ CONFIG_DRIVERS_IMU_INVENSENSE_ICM20649=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM20948=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42670P=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_RM3100=y
|
||||
CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
CONFIG_COMMON_OSD=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA228=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA238=y
|
||||
|
||||
@@ -70,34 +70,19 @@ else
|
||||
fi
|
||||
|
||||
# Internal magnetometer on I2c
|
||||
if ver hwtypecmp V6X002001
|
||||
then
|
||||
rm3100 -I -b 4 start
|
||||
else
|
||||
bmm150 -I start
|
||||
fi
|
||||
bmm150 -I start
|
||||
|
||||
# External compass on GPS1/I2C1 (the 3rd external bus): standard Holybro Pixhawk 4 or CUAV V5 GPS/compass puck (with lights, safety button, and buzzer)
|
||||
ist8310 -X -b 1 -R 10 start
|
||||
|
||||
# Possible internal Baro
|
||||
if ver hwtypecmp V6X002001
|
||||
then
|
||||
icp201xx -I -a 0x64 start
|
||||
else
|
||||
bmp388 -I -a 0x77 start
|
||||
fi
|
||||
bmp388 -I -a 0x77 start
|
||||
|
||||
if ver hwtypecmp V6X000000 V6X001000
|
||||
then
|
||||
bmp388 -I start
|
||||
else
|
||||
if ver hwtypecmp V6X002001
|
||||
then
|
||||
icp201xx -X start
|
||||
else
|
||||
bmp388 -X start
|
||||
fi
|
||||
bmp388 -X start
|
||||
fi
|
||||
|
||||
# Baro on I2C3
|
||||
|
||||
@@ -133,8 +133,6 @@
|
||||
*
|
||||
* Note that these are unshifted addresses.
|
||||
*/
|
||||
#define BOARD_MTD_NUM_EEPROM 2 /* MTD: base_eeprom, imu_eeprom*/
|
||||
|
||||
#define PX4_I2C_OBDEV_SE050 0x48
|
||||
|
||||
#define GPIO_I2C2_DRDY1_BMP388 /* PG5 */ (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTG|GPIO_PIN5)
|
||||
@@ -215,8 +213,7 @@
|
||||
#define GPIO_HW_VER_SENSE /* PH3 */ GPIO_ADC3_INP14
|
||||
#define HW_INFO_INIT_PREFIX "V6X"
|
||||
|
||||
#define BOARD_NUM_SPI_CFG_HW_VERSIONS 9 // Rev 0 and Rev 3,4 Sensor sets
|
||||
|
||||
#define BOARD_NUM_SPI_CFG_HW_VERSIONS 8 // Rev 0 and Rev 3,4 Sensor sets
|
||||
// Base/FMUM
|
||||
#define V6X00 HW_VER_REV(0x0,0x0) // FMUV6X, Rev 0
|
||||
#define V6X01 HW_VER_REV(0x0,0x1) // FMUV6X, BMI388 I2C2 Rev 1
|
||||
@@ -225,7 +222,6 @@
|
||||
#define V6X10 HW_VER_REV(0x1,0x0) // NO PX4IO, Rev 0
|
||||
#define V6X13 HW_VER_REV(0x1,0x3) // NO PX4IO, Sensor Set Rev 3
|
||||
#define V6X14 HW_VER_REV(0x1,0x4) // NO PX4IO, Sensor Set Rev 4
|
||||
#define V6X21 HW_VER_REV(0x2,0x1) // FMUV6X, CUAV Sensor Set
|
||||
#define V6X40 HW_VER_REV(0x4,0x0) // FMUV6X, HB CM4 base Rev 0
|
||||
#define V6X41 HW_VER_REV(0x4,0x1) // FMUV6X, BMI388 I2C2 HB CM4 base Rev 1
|
||||
#define V6X43 HW_VER_REV(0x4,0x3) // FMUV6X, Sensor Set HB CM4 base Rev 3
|
||||
|
||||
@@ -154,7 +154,6 @@ static px4_hw_mft_list_entry_t mft_lists[] = {
|
||||
{V6X13, hw_mft_list_v0610, arraySize(hw_mft_list_v0610)}, // No PX4IO BMP388 moved to I2C2, Sensor Set 3
|
||||
{V6X04, hw_mft_list_v0600, arraySize(hw_mft_list_v0600)}, // BMP388 moved to I2C2, Sensor Set 4
|
||||
{V6X14, hw_mft_list_v0610, arraySize(hw_mft_list_v0610)}, // No PX4IO BMP388 moved to I2C2, Sensor Set 4
|
||||
{V6X21, hw_mft_list_v0600, arraySize(hw_mft_list_v0600)},
|
||||
};
|
||||
|
||||
/************************************************************************************
|
||||
|
||||
@@ -84,30 +84,6 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
|
||||
}),
|
||||
}),
|
||||
|
||||
initSPIHWVersion(V6X21, {
|
||||
initSPIBus(SPI::Bus::SPI1, {
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM20649, SPI::CS{GPIO::PortI, GPIO::Pin9}, SPI::DRDY{GPIO::PortF, GPIO::Pin2}),
|
||||
}, {GPIO::PortI, GPIO::Pin11}),
|
||||
initSPIBus(SPI::Bus::SPI2, {
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortH, GPIO::Pin5}, SPI::DRDY{GPIO::PortA, GPIO::Pin10}),
|
||||
}, {GPIO::PortF, GPIO::Pin4}),
|
||||
initSPIBus(SPI::Bus::SPI3, {
|
||||
initSPIDevice(DRV_GYR_DEVTYPE_BMI088, SPI::CS{GPIO::PortI, GPIO::Pin8}, SPI::DRDY{GPIO::PortI, GPIO::Pin7}),
|
||||
initSPIDevice(DRV_ACC_DEVTYPE_BMI088, SPI::CS{GPIO::PortI, GPIO::Pin4}),
|
||||
}, {GPIO::PortE, GPIO::Pin7}),
|
||||
// initSPIBus(SPI::Bus::SPI4, {
|
||||
// // no devices
|
||||
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
|
||||
// }, {GPIO::PortG, GPIO::Pin8}),
|
||||
initSPIBus(SPI::Bus::SPI5, {
|
||||
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
|
||||
}),
|
||||
initSPIBusExternal(SPI::Bus::SPI6, {
|
||||
initSPIConfigExternal(SPI::CS{GPIO::PortI, GPIO::Pin10}, SPI::DRDY{GPIO::PortD, GPIO::Pin11}),
|
||||
initSPIConfigExternal(SPI::CS{GPIO::PortA, GPIO::Pin15}, SPI::DRDY{GPIO::PortD, GPIO::Pin12}),
|
||||
}),
|
||||
}),
|
||||
|
||||
initSPIHWVersion(V6X43, {
|
||||
initSPIBus(SPI::Bus::SPI1, {
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42670P, SPI::CS{GPIO::PortI, GPIO::Pin9}, SPI::DRDY{GPIO::PortF, GPIO::Pin2}),
|
||||
|
||||
@@ -3,7 +3,6 @@ CONFIG_BOARD_TESTING=y
|
||||
CONFIG_BOARD_ETHERNET=y
|
||||
CONFIG_DRIVERS_CAMERA_TRIGGER=y
|
||||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_OSD_MSP_OSD=y
|
||||
CONFIG_DRIVERS_TONE_ALARM=y
|
||||
CONFIG_MODULES_AIRSHIP_ATT_CONTROL=y
|
||||
CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
@@ -41,7 +40,7 @@ CONFIG_MODULES_REPLAY=y
|
||||
CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_COMMON_SIMULATION=y
|
||||
CONFIG_MODULES_SIMULATION_GZ_BRIDGE=y
|
||||
CONFIG_MODULES_SIMULATION_SIMULATOR_IGNITION_BRIDGE=y
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
CONFIG_MODULES_UUV_ATT_CONTROL=y
|
||||
CONFIG_MODULES_UUV_POS_CONTROL=y
|
||||
|
||||
@@ -34,7 +34,7 @@ if(EXISTS ${BOARD_DEFCONFIG})
|
||||
# Depend on BOARD_DEFCONFIG so that we reconfigure on config change
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${BOARD_DEFCONFIG})
|
||||
|
||||
if(${LABEL} MATCHES "default" OR ${LABEL} MATCHES "qurt" OR ${LABEL} MATCHES "recovery" OR ${LABEL} MATCHES "bootloader" OR ${LABEL} MATCHES "canbootloader")
|
||||
if(${LABEL} MATCHES "default" OR ${LABEL} MATCHES "recovery" OR ${LABEL} MATCHES "bootloader" OR ${LABEL} MATCHES "canbootloader")
|
||||
# Generate boardconfig from saved defconfig
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E env ${COMMON_KCONFIG_ENV_SETTINGS}
|
||||
${DEFCONFIG_PATH} ${BOARD_DEFCONFIG}
|
||||
@@ -228,10 +228,6 @@ if(EXISTS ${BOARD_DEFCONFIG})
|
||||
|
||||
# platform-specific include path
|
||||
include_directories(${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/src/px4/common/include)
|
||||
|
||||
if(PLATFORM STREQUAL "qurt")
|
||||
include(${PX4_SOURCE_DIR}/boards/modalai/voxl2/cmake/voxl2_qurt.cmake)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ARCHITECTURE)
|
||||
|
||||