diff --git a/ROMFS/px4fmu_common/init.d/airframes/50003_aion_robotics_r1_rover b/ROMFS/px4fmu_common/init.d/airframes/50003_aion_robotics_r1_rover new file mode 100644 index 0000000000..9835b9d4a7 --- /dev/null +++ b/ROMFS/px4fmu_common/init.d/airframes/50003_aion_robotics_r1_rover @@ -0,0 +1,75 @@ +#!/bin/sh +# +# @name Aion Robotics R1 UGV +# +# @url https://www.aionrobotics.com/r1 +# +# @type Rover +# @class Rover +# +# @board px4_fmu-v2 exclude +# @board bitcraze_crazyflie exclude +# + +. ${R}etc/init.d/rc.rover_defaults + +param set-default BAT1_N_CELLS 4 + +param set-default EKF2_GBIAS_INIT 0.01 +param set-default EKF2_ANGERR_INIT 0.01 +param set-default EKF2_MAG_TYPE 1 + +param set-default FW_AIRSPD_MIN 0 +param set-default FW_AIRSPD_TRIM 1 +param set-default FW_AIRSPD_MAX 3 + +param set-default GND_SP_CTRL_MODE 1 +param set-default GND_L1_DIST 5 +param set-default GND_L1_PERIOD 3 +param set-default GND_THR_CRUISE 0.7 +param set-default GND_THR_MAX 0.5 + +# Because this is differential drive, it can make a turn with radius 0. +# This corresponds to a turn angle of pi radians. +# If a special case is made for differential-drive, this will need to change. +param set-default GND_MAX_ANG 3.142 +param set-default GND_WHEEL_BASE 0.3 + +# TODO: Set to -1.0, to allow reversing. This will require many changes in the codebase +# to support negative throttle. +param set-default GND_THR_MIN 0 +param set-default GND_SPEED_P 0.25 +param set-default GND_SPEED_I 3 +param set-default GND_SPEED_D 0.001 +param set-default GND_SPEED_IMAX 0.125 +param set-default GND_SPEED_THR_SC 1 + +param set-default MIS_LTRMIN_ALT 0.01 +param set-default MIS_TAKEOFF_ALT 0.01 + +param set-default NAV_ACC_RAD 0.5 + +# Enable Airspeed check circuit breaker because Rovers will have no airspeed sensor +param set-default CBRK_AIRSPD_CHK 162128 + +# Differential drive acts like ackermann steering with a maximum turn angle of 180 degrees, or pi radians +param set-default GND_MAX_ANG 3.1415 + +param set-default RBCLW_BAUD 8 +param set-default RBCLW_COUNTS_REV 1200 +param set-default RBCLW_ADDRESS 128 +# 104 corresponds to Telem 4 +param set-default RBCLW_SER_CFG 104 +# Start this driver after setting parameters, because the driver uses some of those parameters. +# roboclaw start /dev/ttyS3 + +# Set geometry & output configration +param set-default CA_AIRFRAME 6 +param set-default CA_R_REV 3 +param set-default PWM_MAIN_FUNC1 101 +param set-default PWM_MAIN_FUNC2 102 +param set-default PWM_MAIN_DIS1 1500 +param set-default PWM_MAIN_DIS2 1500 +param set-default PWM_MAIN_TIM0 50 +param set-default PWM_MAIN_TIM1 50 + diff --git a/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt b/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt index b3222af826..8e9931aa89 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt +++ b/ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt @@ -118,6 +118,7 @@ px4_add_romfs_files( 50000_generic_ground_vehicle 50004_nxpcup_car_dfrobot_gpx + 50003_aion_robotics_r1_rover # [60000, 61000] (Unmanned) Underwater Robots 60000_uuv_generic