Skip to content

Commit

Permalink
Merge branch 'PX4:main' into px4xplane-sitl
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza787b authored Apr 14, 2024
2 parents 1cfb084 + 1b1479a commit a7603f3
Show file tree
Hide file tree
Showing 62 changed files with 4,206 additions and 213 deletions.
2 changes: 2 additions & 0 deletions .ci/Jenkinsfile-compile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pipeline {
"ark_cannode_default",
"ark_fmu-v6x_bootloader",
"ark_fmu-v6x_default",
"ark_pi6x_bootloader",
"ark_pi6x_default"
"atl_mantis-edu_default",
"av_x-v1_default",
"bitcraze_crazyflie21_default",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/compile_nuttx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
ark_can-rtk-gps,
ark_cannode,
ark_fmu-v6x,
ark_pi6x,
ark_septentrio-gps,
atl_mantis-edu,
av_x-v1,
Expand Down
10 changes: 10 additions & 0 deletions .vscode/cmake-variants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: ark_fmu-v6x_default
ark_pi6x_bootloader:
short: ark_pi6x_bootloader
buildType: MinSizeRel
settings:
CONFIG: ark_pi6x_bootloader
ark_pi6x_default:
short: ark_pi6x_default
buildType: MinSizeRel
settings:
CONFIG: ark_pi6x_default
atl_mantis-edu_default:
short: atl_mantis-edu
buildType: MinSizeRel
Expand Down
2 changes: 0 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,8 @@ pipeline {
sh('cp airframes.md PX4-user_guide/en/airframes/airframe_reference.md')
sh('cp parameters.md PX4-user_guide/en/advanced_config/parameter_reference.md')
sh('cp -R modules/*.md PX4-user_guide/en/modules/')
sh('cp -R graph_*.json PX4-user_guide/.vuepress/public/en/middleware/') // vuepress
sh('cp -R graph_*.json PX4-user_guide/public/middleware/') // vitepress
sh('cp -R msg_docs/*.md PX4-user_guide/en/msg_docs/')
sh('cp -R failsafe_sim/* PX4-user_guide/.vuepress/public/en/config/failsafe') // vuepress
sh('cp -R failsafe_sim/* PX4-user_guide/public/config/failsafe') // vitepress
sh('cd PX4-user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
sh('cd PX4-user_guide; git push origin main || true')
Expand Down
78 changes: 78 additions & 0 deletions ROMFS/px4fmu_common/init.d/airframes/4601_droneblocks_dexi_5
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/bin/sh
#
# @name Droneblocks DEXI 5
#
# @type Quadrotor x
# @class Copter
#
# @maintainer Dennis Baldwin <[email protected]>
# @maintainer Alex klimaj <[email protected]>
#
# @board px4_fmu-v2 exclude
# @board px4_fmu-v3 exclude
# @board px4_fmu-v4 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board px4_fmu-v6x exclude
# @board bitcraze_crazyflie exclude
# @board diatone_mamba-f405-mk2 exclude
# @board ark_fmu-v6x exclude
#

. ${R}etc/init.d/rc.mc_defaults

param set-default BAT1_CAPACITY 4000
param set-default BAT1_N_CELLS 6
param set-default BAT1_V_EMPTY 3.3
param set-default BAT1_V_LOAD_DROP 0.5
param set-default BAT_AVRG_CURRENT 13

# Square quadrotor X PX4 numbering
param set-default CA_ROTOR_COUNT 4
param set-default CA_ROTOR0_PX 0.0762
param set-default CA_ROTOR0_PY 0.09525
param set-default CA_ROTOR0_KM 0.05
param set-default CA_ROTOR1_PX -0.0762
param set-default CA_ROTOR1_PY -0.09525
param set-default CA_ROTOR1_KM 0.05
param set-default CA_ROTOR2_PX 0.0762
param set-default CA_ROTOR2_PY -0.09525
param set-default CA_ROTOR2_KM -0.05
param set-default CA_ROTOR3_PX -0.0762
param set-default CA_ROTOR3_PY 0.09525
param set-default CA_ROTOR3_KM -0.05

param set-default EKF2_MIN_RNG 0.01
param set-default EKF2_OF_POS_X 0.043
param set-default EKF2_OF_POS_Y 0.011
param set-default EKF2_OF_QMIN_GND 1
param set-default EKF2_RNG_POS_X 0.043
param set-default EKF2_RNG_POS_Y 0.0

param set-default IMU_GYRO_DNF_EN 2

param set-default MC_PITCHRATE_D 0.0013
param set-default MC_PITCHRATE_I 0.185
param set-default MC_PITCHRATE_P 0.105
param set-default MC_PITCH_P 7.5
param set-default MC_ROLLRATE_D 0.0010
param set-default MC_ROLLRATE_I 0.165
param set-default MC_ROLLRATE_P 0.095
param set-default MC_ROLL_P 7.5
param set-default MC_YAWRATE_I 0.35
param set-default MC_YAWRATE_P 0.13

param set-default MPC_THR_HOVER 0.22
param set-default MPC_THR_MAX 0.5
param set-default MPC_THR_MIN 0.025
param set-default MPC_VEL_MANUAL 5.0
param set-default MPC_XY_VEL_MAX 8.0

param set-default RTL_RETURN_ALT 15

param set-default SENS_FLOW_MINHGT 0.0

param set-default SER_TEL2_BAUD 3000000

param set-default UXRCE_DDS_CFG 102
1 change: 1 addition & 0 deletions ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ if(CONFIG_MODULES_MC_RATE_CONTROL)
4071_ifo
4073_ifo-s
4500_clover4
4601_droneblocks_dexi_5
4901_crazyflie21

# [5000, 5999] Quadrotor +
Expand Down
16 changes: 8 additions & 8 deletions Tools/msg/generate_msg_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ def get_msgs_list(msgdir):
with open(output_file, 'w') as content_file:
content_file.write(markdown_output)

readme_markdown_file_link='- [%s](%s.md)' % (msg_name,msg_name)
index_markdown_file_link='- [%s](%s.md)' % (msg_name,msg_name)
if summary_description:
readme_markdown_file_link+=" — %s" % summary_description
filelist_in_markdown+=readme_markdown_file_link+"\n"
index_markdown_file_link+=" — %s" % summary_description
filelist_in_markdown+=index_markdown_file_link+"\n"

# Write out the README.md file
readme_text="""# uORB Message Reference
# Write out the index.md file
index_text="""# uORB Message Reference
:::note
This list is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/msg/generate_msg_docs.py) from the source code.
Expand All @@ -98,6 +98,6 @@ def get_msgs_list(msgdir):
%s
""" % (filelist_in_markdown)
readme_file = os.path.join(output_dir, 'README.md')
with open(readme_file, 'w') as content_file:
content_file.write(readme_text)
index_file = os.path.join(output_dir, 'index.md')
with open(index_file, 'w') as content_file:
content_file.write(index_text)
3 changes: 3 additions & 0 deletions boards/ark/pi6x/bootloader.px4board
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi"
CONFIG_BOARD_ARCHITECTURE="cortex-m7"
CONFIG_BOARD_ROMFSROOT=""
70 changes: 70 additions & 0 deletions boards/ark/pi6x/default.px4board
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi"
CONFIG_BOARD_ARCHITECTURE="cortex-m7"
CONFIG_BOARD_SERIAL_GPS1="/dev/ttyS0"
CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS5"
CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS3"
CONFIG_BOARD_SERIAL_TEL4="/dev/ttyS2"
CONFIG_BOARD_SERIAL_RC="/dev/ttyS4"
CONFIG_DRIVERS_ADC_BOARD_ADC=y
CONFIG_DRIVERS_BAROMETER_BMP388=y
CONFIG_COMMON_DIFFERENTIAL_PRESSURE=y
CONFIG_DRIVERS_DISTANCE_SENSOR_BROADCOM_AFBRS50=y
CONFIG_DRIVERS_DSHOT=y
CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_HEATER=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
CONFIG_COMMON_LIGHT=y
CONFIG_DRIVERS_MAGNETOMETER_MEMSIC_MMC5983MA=y
CONFIG_DRIVERS_OPTICAL_FLOW_PAW3902=y
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
CONFIG_DRIVERS_PWM_OUT=y
CONFIG_DRIVERS_RC_INPUT=y
CONFIG_DRIVERS_TONE_ALARM=y
CONFIG_DRIVERS_UAVCAN=y
CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=2
CONFIG_MODULES_AIRSPEED_SELECTOR=y
CONFIG_MODULES_COMMANDER=y
CONFIG_MODULES_CONTROL_ALLOCATOR=y
CONFIG_MODULES_DATAMAN=y
CONFIG_MODULES_EKF2=y
CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_GYRO_CALIBRATION=y
CONFIG_MODULES_GYRO_FFT=y
CONFIG_MODULES_LAND_DETECTOR=y
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y
CONFIG_MODULES_LOAD_MON=y
CONFIG_MODULES_LOGGER=y
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
CONFIG_MODULES_MANUAL_CONTROL=y
CONFIG_MODULES_MAVLINK=y
CONFIG_MODULES_MC_ATT_CONTROL=y
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
CONFIG_MODULES_MC_POS_CONTROL=y
CONFIG_MODULES_MC_RATE_CONTROL=y
CONFIG_MODULES_NAVIGATOR=y
CONFIG_MODULES_RC_UPDATE=y
CONFIG_MODULES_SENSORS=y
CONFIG_MODULES_UXRCE_DDS_CLIENT=y
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y
CONFIG_SYSTEMCMDS_BSONDUMP=y
CONFIG_SYSTEMCMDS_DMESG=y
CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
CONFIG_SYSTEMCMDS_I2CDETECT=y
CONFIG_SYSTEMCMDS_LED_CONTROL=y
CONFIG_SYSTEMCMDS_MFT=y
CONFIG_SYSTEMCMDS_MTD=y
CONFIG_SYSTEMCMDS_NSHTERM=y
CONFIG_SYSTEMCMDS_PARAM=y
CONFIG_SYSTEMCMDS_PERF=y
CONFIG_SYSTEMCMDS_REBOOT=y
CONFIG_SYSTEMCMDS_SD_BENCH=y
CONFIG_SYSTEMCMDS_SD_STRESS=y
CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
CONFIG_SYSTEMCMDS_TOP=y
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
CONFIG_SYSTEMCMDS_TUNE_CONTROL=y
CONFIG_SYSTEMCMDS_UORB=y
CONFIG_SYSTEMCMDS_VER=y
CONFIG_SYSTEMCMDS_WORK_QUEUE=y
Binary file added boards/ark/pi6x/extras/ark_pi6x_bootloader.bin
Binary file not shown.
13 changes: 13 additions & 0 deletions boards/ark/pi6x/firmware.prototype
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"board_id": 58,
"magic": "ARKPi6XFWv1",
"description": "Firmware for the ARKPi6X board",
"image": "",
"build_time": 0,
"summary": "ARKPi6X",
"version": "0.1",
"image_size": 0,
"image_maxsize": 1835008,
"git_identity": "",
"board_revision": 0
}
50 changes: 50 additions & 0 deletions boards/ark/pi6x/init/rc.board_defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/sh
#
# board specific defaults
#------------------------------------------------------------------------------

# transision from params file to flash-based params (2022-08)
if [ -f $PARAM_FILE ]
then
param load $PARAM_FILE
param save
# create a backup
mv $PARAM_FILE ${PARAM_FILE}.bak
reboot
fi

param set-default SENS_EN_INA226 1

# TODO: Set params to start UXRCE DDS on Telem2

# TODO: Start Mavlink on USB by default

# TODO: Tune the following parameters
param set-default SENS_EN_THERMAL 1
param set-default SENS_IMU_TEMP 10.0
#param set-default SENS_IMU_TEMP_FF 0.0
#param set-default SENS_IMU_TEMP_I 0.025
#param set-default SENS_IMU_TEMP_P 1.0

if ver hwtypecmp ARKPI6X000
then
# TODO: Add the correct sensor ID
param set-default SENS_TEMP_ID 2490378
fi

param set-default EKF2_BARO_DELAY 13
param set-default EKF2_BARO_NOISE 0.9
param set-default EKF2_HGT_REF 2
param set-default EKF2_MAG_DELAY 100
param set-default EKF2_MAG_NOISE 0.06
param set-default EKF2_MULTI_IMU 2
param set-default EKF2_OF_CTRL 1
param set-default EKF2_OF_DELAY 48
param set-default EKF2_OF_N_MIN 0.05
param set-default EKF2_RNG_A_HMAX 25
param set-default EKF2_RNG_DELAY 48
param set-default EKF2_RNG_NOISE 0.03
param set-default EKF2_RNG_QLTY_T 0.1
param set-default EKF2_RNG_SFE 0.03

param set-default SENS_FLOW_RATE 150
34 changes: 34 additions & 0 deletions boards/ark/pi6x/init/rc.board_sensors
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh
#
# ARKPI6X specific board sensors init
#------------------------------------------------------------------------------

board_adc start

if param compare SENS_EN_INA226 1
then
# Start Digital power monitors
ina226 -I -b 3 -t 1 -k start
fi

if ver hwtypecmp ARKPI6X000
then
# Internal SPI bus ICM42688p with SPIX measured frequency of 32.051kHz
icm42688p -R 3 -s -b 1 -C 32051 start

# Internal SPI bus ICM42688p with SPIX measured frequency of 32.051kHz
icm42688p -R 1 -s -b 2 -C 32051 start
fi

# Internal magnetometer on I2C
# TODO: Write a driver for the MMC5983MA
mmc5983ma -I -b 4 start

# Internal Baro on I2C
bmp388 -I -b 4 start

# Internal optical flow
paw3902 -s -b 3 start -Y 90

# Internal distance sensor
afbrs50 start
17 changes: 17 additions & 0 deletions boards/ark/pi6x/nuttx-config/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
config BOARD_HAS_PROBES
bool "Board provides GPIO or other Hardware for signaling to timing analyze."
default y
---help---
This board provides GPIO FMU-CH1-5, CAP1-6 as PROBE_1-11 to provide timing signals from selected drivers.

config BOARD_USE_PROBES
bool "Enable the use the board provided FMU-CH1-5, CAP1-6 as PROBE_1-11"
default n
depends on BOARD_HAS_PROBES

---help---
Select to use GPIO FMU-CH1-5, CAP1-6 to provide timing signals from selected drivers.
Loading

0 comments on commit a7603f3

Please sign in to comment.