Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
bb021ed
Updated mavlink/include/mavlink/v2.0
JAParedes Feb 12, 2021
b607d76
Updated mavlink/include/mavlink/v2.0
JAParedes Feb 12, 2021
f9cd678
Updated mavlink/include/mavlink/v2.0
JAParedes Feb 12, 2021
ddcde31
Updated all files to enable RCAC functionality. Can build jmavSim
JAParedes Feb 13, 2021
806472d
Solved RCAC issues...
JAParedes Feb 19, 2021
02ad0d9
Added repo update script and SITL scripts.
JAParedes May 17, 2021
a515c2f
Solved rate controller SITL activation issue
JAParedes May 17, 2021
29432ea
Initial addition of RCACLib Class
joonghle May 18, 2021
7023d33
Initial addition of RCACLib Class
joonghle May 18, 2021
f64dca0
Accidental addition of a folder reverted
joonghle May 18, 2021
bdf0ca6
Fixing accidental library dir changes
joonghle May 18, 2021
ba7eb21
RCAC Library Submodule Inserted
joonghle May 18, 2021
dc18e2f
Fixed old lib directory
joonghle May 18, 2021
cf2e299
Modifications to add newest lib
joonghle May 19, 2021
b36a8d7
Implement RCAC Pos/Vel Controller
joonghle May 19, 2021
d79614c
git submodule update
joonghle May 20, 2021
25ba08a
Added reset_RCAC method to RCAC class ; Instantiated RCAC objects for…
spjohn93 May 22, 2021
c081066
New branch to track new att and rate ctrler changes
joonghle May 25, 2021
2e0ca92
Fix Att Bugs
joonghle May 25, 2021
77141d8
more changes to implement RCAC class in position controller
spjohn93 May 25, 2021
4ab64e2
more changes to implement RCAC class in position controller
spjohn93 May 25, 2021
50764ef
submodule update trial
joonghle May 27, 2021
c83aa89
submodule update trial 2
joonghle May 27, 2021
8756590
Update submodule to stop unnecessary printing and update shell script…
joonghle May 28, 2021
6f44b4f
Implemented RCAC library in position and velocity controllers
spjohn93 May 29, 2021
a1b49fe
ensured _rcac_r_p0 and _rcac_v_p0 in PositionControl.hpp will initial…
spjohn93 May 29, 2021
899f982
May 31st Code Changes to make Att/Rate control work independently
joonghle Jun 2, 2021
05c55e5
QC is able to complete FPL after lowering P0 of Rate Controller
joonghle Jun 2, 2021
e392ab5
edit Position Controller RCAC implementation
spjohn93 Jun 2, 2021
209f0c6
Merge pull request #2 from JAParedes/RCAC_r_v_control
JAParedes Jun 2, 2021
6fb81b4
Merge branch 'RCAC_branch_SITL_merge' into RCAClib_branch_SITL_att
JAParedes Jun 2, 2021
b40c7db
Merge pull request #3 from JAParedes/RCAClib_branch_SITL_att
JAParedes Jun 2, 2021
3d5bae7
Error fixes to compute_uk input params
joonghle Jun 3, 2021
82d2ab4
Merge branch 'RCAClib_branch_SITL_att' of github.com:JAParedes/PX4-Au…
joonghle Jun 3, 2021
bcb87e5
Enable alpha changes thru QGC
joonghle Jun 4, 2021
26ac600
Reset Params and update RCAClib
joonghle Jun 7, 2021
de4be64
Merge pull request #4 from JAParedes/RCAClib_branch_SITL_att
JAParedes Jun 7, 2021
a566010
Update outer loop to be more comprehensive
spjohn93 Jun 7, 2021
4934611
Merge branch 'RCAC_r_v_control' into RCAC_branch_SITL_merge
JAParedes Jun 7, 2021
6b29f85
Merged John's latest changes, updated RCAC submodule
JAParedes Jun 7, 2021
82268f4
Pulled down latest commit from RCAC repo
JAParedes Jun 7, 2021
5e0f3cc
Condense init_RCAC into resetRCAC in the outer loop and replace hardc…
spjohn93 Jun 8, 2021
140dcf7
cleaned RCAC code in outer-loop
spjohn93 Jun 8, 2021
7de3685
Enable QGC modification of outer-loop RCAC parameters
spjohn93 Jun 8, 2021
f9fb432
Get function fixes and used vector to store RCAC variables
joonghle Jun 8, 2021
74da4a1
Merge pull request #6 from JAParedes/RCAClib_branch_SITL_att
JAParedes Jun 8, 2021
2c7f4a4
Add reset integral to init_rcac
joonghle Jun 8, 2021
03caea2
Changed sources of get functions and z_k_att was set to eq
joonghle Jun 9, 2021
cde1878
Allow logging of outer-loop z_k values independent of outer-loop RCAC…
spjohn93 Jun 9, 2021
b60652d
Rate/Att Controller fixed to output Z even when RCAC is off
joonghle Jun 9, 2021
5fae706
Merge pull request #7 from JAParedes/RCAClib_branch_SITL_att
joonghle Jun 9, 2021
8a8a071
Enable HITL compilation
spjohn93 Jun 9, 2021
b44b23c
Flip signs of filter and z
joonghle Jun 10, 2021
44427fe
Flip signs of Filter and Z in attitude controller
joonghle Jun 10, 2021
c1ae39a
Merge pull request #8 from JAParedes/RCAClib_branch_SITL_att
joonghle Jun 10, 2021
ea72e16
reverse sign of z_k; update outer-loop RCAC constructors
spjohn93 Jun 10, 2021
6c74c8e
Merged
joonghle Jun 10, 2021
a890a3d
Attitude Controller fixed to flip z_k signs
joonghle Jun 10, 2021
af70366
Merge pull request #9 from JAParedes/RCAClib_branch_SITL_att
joonghle Jun 10, 2021
5cda9de
Initial implementations of the variable library
joonghle Jun 10, 2021
c44f18b
Merged with latest Merge branch
joonghle Jun 10, 2021
4fd8b18
Variable RCAC Implementation
joonghle Jun 11, 2021
b5f5526
Updated .gitmodules to be consistent with the connected RCAC Lib
joonghle Jun 11, 2021
fedddd5
Update PositionController.hpp variable names for better consistency a…
spjohn93 Jun 12, 2021
54ce769
Include Ru weight in RCAC class; Implement landed variable in outer-l…
spjohn93 Jun 12, 2021
8779b2a
implement RCAC Ru weight and error normalization is MC controllers
spjohn93 Jun 14, 2021
7b572d9
changes to allow HITL compilation
spjohn93 Jun 14, 2021
8c88c59
Integral implementation uses RCAC's integrator
joonghle Jun 15, 2021
c89f28d
Merge pull request #11 from JAParedes/RCAC_pos_vel_test
joonghle Jun 15, 2021
80d45eb
Merge pull request #12 from JAParedes/RCAC_Var_Ru_Int
joonghle Jun 15, 2021
c5b415b
Changes to implement updated RCAC class on branch Variable_RCAC_John
spjohn93 Jun 16, 2021
c5a4da3
Corrected logic error in vel controller
spjohn93 Jun 21, 2021
c23f902
Fixed hardware compilation issues
joonghle Jun 22, 2021
5880ca2
implement Ru as a QGC parameter
spjohn93 Jun 23, 2021
76bdc53
implement Ru as a QGC parameter
spjohn93 Jun 23, 2021
266b1a8
Not compile tested or functionality checked - Merge John's latest PX4…
joonghle Jun 23, 2021
6035e97
Merge John's branch into dev
joonghle Jun 24, 2021
7a5cc5d
Code compiles as SITL; RCAC Should be enabled for Attitude Control
joonghle Jun 25, 2021
2972f52
Enabled Roll RCAC, Enabled Setters for QGC, Setters not tested yet.
joonghle Jun 28, 2021
31f01be
uORB should be implemented
joonghle Jun 29, 2021
fb5f954
Enabled RCAC Roll logging, still having issues with vehicle take off …
joonghle Jun 29, 2021
678f4a0
Initialize potential source of instability
joonghle Jun 30, 2021
cd847b5
Add a TODO for params update
joonghle Jun 30, 2021
d7c3105
Roll RCAC fully implemented, except mavlink telemetry. Tested for RCA…
joonghle Jun 30, 2021
9053d7c
Reverse accidental change of Mavlink connection
joonghle Jun 30, 2021
923e6b6
Pitch RCAC Tested and Enabled
joonghle Jul 1, 2021
d3ed8f8
HW RCAC Switch added
joonghle Jul 1, 2021
abff1e6
Implement scaling factor beta for QC Front-Right motor PWM
spjohn93 Jul 6, 2021
12700c5
Enabled Logging for RCAC Variabled N and Ru
joonghle Jul 6, 2021
5a1deac
Enable beta_val and beta_switch_ON logging in _rcac_pos_vel_variables…
spjohn93 Jul 8, 2021
fd1ee99
Change RC channel for beta_switch in mixer_module.cpp to open channel
spjohn93 Jul 12, 2021
0956883
Pulled changes in the latest MC RCAC Code to enable Ru logging
joonghle Jul 13, 2021
5a68f32
Begin adding compatibility for simpler RCAC library
joonghle Jul 13, 2021
e3e71e1
Streamlined RCAC Library Implmentation progressing in pitch controller
joonghle Jul 21, 2021
84ca8e3
Fixed multiple simple library usages, fixes still coming along
joonghle Jul 22, 2021
c28b30e
Completed integration of all ptch and roll params
joonghle Jul 27, 2021
fb96582
Fixed many compilation issues regarding FW Controllers
joonghle Jul 28, 2021
dc32987
Significant Progress in making mc_pos utilize RCAC simple lib
joonghle Jul 28, 2021
aaf36e5
Update RCAC gitmodules to ssh
joonghle Jul 28, 2021
3ee2f96
Fixed multicopter portions of code to adapt to new RCAC simple
joonghle Aug 3, 2021
be31978
Made all code changes to enable RCAC Simple library to work properly …
joonghle Aug 3, 2021
8444343
Compile tested code, still need to configure initParams across modules
joonghle Aug 3, 2021
e22d98a
All MC Code verified to be operational, except one bug: When all alph…
joonghle Aug 5, 2021
2c51eee
Add ifdef flags to change compilation for HITL and SITL
joonghle Aug 6, 2021
f9aa8e9
Merge branch 'RCAC_FW_SITL_dev_simple' into RCAC_FW_hardware_dev
joonghle Aug 6, 2021
6ca5752
Merge pull request #14 from JAParedes/RCAC_FW_hardware_dev
joonghle Aug 6, 2021
97eb0e3
Latest RCAC branch with simple-lib for both MC and FW. Used ifdef fla…
joonghle Aug 6, 2021
911b2ce
Modify RBlock params to enable Ru in all controllers
joonghle Aug 6, 2021
eea9812
Fix u_km1_vel update issue
joonghle Aug 11, 2021
60fc1a7
Fixed landing detector issue from lacking u_km1 update in velocity co…
joonghle Aug 11, 2021
2076d9d
Merge pull request #15 from JAParedes/RCAC_simple_dev
joonghle Aug 13, 2021
627048e
Update RCAC Lib remote origin to joonghle
joonghle Aug 13, 2021
d38c036
Merge pull request #16 from JAParedes/RCAC_FW_dev
joonghle Aug 13, 2021
32609c9
Changes to enable compilation with editted RCAC lib
joonghle Aug 13, 2021
ebe0964
Theoretically Fixes kk counter issues; Need to test to verify
joonghle Aug 13, 2021
0192333
Seems to have fixed the Firmware issue. Issue seems to have originate…
joonghle Aug 16, 2021
d7907a9
Merge pull request #19 from JAParedes/RCAC_FW_dev
joonghle Aug 16, 2021
47b1d35
update submodules to simple lib
joonghle Sep 10, 2021
d2a4909
Merge pull request #21 from JAParedes/RCAC_FW_dev
joonghle Sep 13, 2021
7bb1c9b
Updated mavlink/include/mavlink/v2.0
JAParedes Nov 4, 2021
ff9713c
Juan: Added FW mavlink messages
JAParedes Nov 4, 2021
0ad318b
px4_io jamming code enabled
joonghle Nov 7, 2021
6e03ccc
Change submodule link to ssh
joonghle Nov 7, 2021
84be1e8
Merge pull request #22 from JAParedes/RCAC_FW_dev_mavlink
joonghle Nov 7, 2021
5db9ddd
Enable logging for entire P matrix
Mar 3, 2022
0ac67e9
Fixed versioning issues with RCAC lib
joonghle Mar 8, 2022
10ff1fb
Merge pull request #24 from JAParedes/rcac_fw_sitl
joonghle Mar 8, 2022
d2c3e9b
added pid override and fixed return values on enables
joonghle Jul 26, 2022
4251168
landed is added as an independent variable onto the rcac lib
joonghle Aug 5, 2022
8188333
Changed SITL initialization file and mixer file to fix aileron direction
JAParedes Oct 31, 2022
c514282
implemented rcaca deadzone in angular rate ctrl. Fixed some rate ctrl…
cyinyong Nov 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "mavlink/include/mavlink/v2.0"]
path = mavlink/include/mavlink/v2.0
url = https://github.com/mavlink/c_library_v2.git
branch = master
url = https://github.com/JAParedes/c_library_v2.git
branch = mavlink_rcac_FW
[submodule "src/drivers/uavcan/libuavcan"]
path = src/drivers/uavcan/libuavcan
url = https://github.com/PX4/libuavcan.git
Expand Down Expand Up @@ -66,3 +66,7 @@
[submodule "src/drivers/uavcannode_gps_demo/libcanard"]
path = src/drivers/uavcannode_gps_demo/libcanard
url = https://github.com/UAVCAN/libcanard
[submodule "src/lib/mathlib/math/RCAC"]
path = src/lib/mathlib/math/RCAC
url = git@github.com:joonghle/RCAC_cpp_light.git
branch = RCAC_v2_simple
13 changes: 12 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,16 @@
"workbench.settings.enableNaturalLanguageSearch": false,
"yaml.schemas": {
"${workspaceFolder}/validation/module_schema.yaml": "${workspaceFolder}/src/modules/*/module.yaml"
}
},
"editor.fontSize": 16,
"python.autoComplete.extraPaths": [
"/home/spjohn/work/cat_mav/devel_isolated/mavros/lib/python3/dist-packages",
"/home/spjohn/work/cat_mav/devel_isolated/mavros_msgs/lib/python3/dist-packages",
"/opt/ros/noetic/lib/python3/dist-packages"
],
"python.analysis.extraPaths": [
"/home/spjohn/work/cat_mav/devel_isolated/mavros/lib/python3/dist-packages",
"/home/spjohn/work/cat_mav/devel_isolated/mavros_msgs/lib/python3/dist-packages",
"/opt/ros/noetic/lib/python3/dist-packages"
]
}
16 changes: 16 additions & 0 deletions ROMFS/px4fmu_common/init.d-posix/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ if [ -e etc/init.d-posix/rc.mavlink_override ]
then
echo "Running non-default mavlink config rc.mavlink_override"
sh etc/init.d-posix/rc.mavlink_override
#mavlink stream -r 2 -s RCAC_ATT_VARIABLES -u $udp_gcs_port_local
#mavlink stream -r 2 -s RCAC_RATE_VARIABLES -u $udp_gcs_port_local
#mavlink stream -r 2 -s RCAC_POS_VEL_VARIABLES -u $udp_gcs_port_local
else
# GCS link
mavlink start -x -u $udp_gcs_port_local -r 4000000
Expand All @@ -254,9 +257,15 @@ else
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
#mavlink stream -r 2 -s RCAC_ATT_VARIABLES -u $udp_gcs_port_local
#mavlink stream -r 2 -s RCAC_RATE_VARIABLES -u $udp_gcs_port_local
#mavlink stream -r 2 -s RCAC_POS_VEL_VARIABLES -u $udp_gcs_port_local



# API/Offboard link
mavlink start -x -u $udp_offboard_port_local -r 4000000 -m onboard -o $udp_offboard_port_remote
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_offboard_port_local

# Onboard link to camera
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
Expand All @@ -276,3 +285,10 @@ fi

mavlink boot_complete
replay trystart

mavlink stream -r 2 -s RCAC_ATT_VARIABLES -u $udp_gcs_port_local
mavlink stream -r 2 -s RCAC_RATE_VARIABLES -u $udp_gcs_port_local
mavlink stream -r 2 -s RCAC_POS_VEL_VARIABLES -u $udp_gcs_port_local
mavlink stream -r 2 -s RCAC_FW_ROLL -u $udp_gcs_port_local
mavlink stream -r 2 -s RCAC_FW_PITCH -u $udp_gcs_port_local
mavlink stream -r 2 -s RCAC_FW_YAW -u $udp_gcs_port_local
21 changes: 21 additions & 0 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -612,3 +612,24 @@ unset VEHICLE_TYPE
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running.
#
mavlink boot_complete

mavlink stream -d /dev/ttyACM0 -s RCAC_ATT_VARIABLES -r 2
mavlink stream -d /dev/ttyS1 -s RCAC_ATT_VARIABLES -r 2
mavlink stream -d /dev/ttyS2 -s RCAC_ATT_VARIABLES -r 2
mavlink stream -d /dev/ttyACM0 -s RCAC_RATE_VARIABLES -r 2
mavlink stream -d /dev/ttyS1 -s RCAC_RATE_VARIABLES -r 2
mavlink stream -d /dev/ttyS2 -s RCAC_RATE_VARIABLES -r 2
mavlink stream -d /dev/ttyACM0 -s RCAC_POS_VEL_VARIABLES -r 2
mavlink stream -d /dev/ttyS1 -s RCAC_POS_VEL_VARIABLES -r 2
mavlink stream -d /dev/ttyS2 -s RCAC_POS_VEL_VARIABLES -r 2
mavlink stream -d /dev/ttyACM0 -s RCAC_FW_ROLL -r 2
mavlink stream -d /dev/ttyS1 -s RCAC_FW_ROLL -r 2
mavlink stream -d /dev/ttyS2 -s RCAC_FW_ROLL -r 2
mavlink stream -d /dev/ttyACM0 -s RCAC_FW_PITCH -r 2
mavlink stream -d /dev/ttyS1 -s RCAC_FW_PITCH -r 2
mavlink stream -d /dev/ttyS2 -s RCAC_FW_PITCH -r 2
mavlink stream -d /dev/ttyACM0 -s RCAC_FW_YAW -r 2
mavlink stream -d /dev/ttyS1 -s RCAC_FW_YAW -r 2
mavlink stream -d /dev/ttyS2 -s RCAC_FW_YAW -r 2
mavlink stream -d /dev/ttyS1 -s ODOMETRY -r 10
mavlink stream -d /dev/ttyS2 -s LOCAL_POSITION_NED -10
1 change: 1 addition & 0 deletions ROMFS/px4fmu_common/mixers/AETRFG.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ differences between the servos must be made mechanically. To obtain the correct
motion using a Y cable, the servos can be positioned reversed from one another.

M: 1
O: -10000 -10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000

CH2: Elevator mixer
Expand Down
2 changes: 1 addition & 1 deletion mavlink/include/mavlink/v2.0
Submodule v2.0 updated 830 files
6 changes: 6 additions & 0 deletions msg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ set(msg_files
qshell_retval.msg
radio_status.msg
rate_ctrl_status.msg
rcac_att_variables.msg
rcac_fw_pitch.msg
rcac_fw_roll.msg
rcac_fw_yaw.msg
rcac_pos_vel_variables.msg
rcac_rate_variables.msg
rc_channels.msg
rc_parameter_map.msg
rpm.msg
Expand Down
16 changes: 16 additions & 0 deletions msg/rcac_att_variables.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Fused local position in NED.

uint64 timestamp # time since system start (microseconds)

uint64 ii_att # iteration step of the RCAC Attitude Controller
bool switch_att # RCAC Attitude Controller switch
float32 alpha_pid_att # Gain that multiplies the attitude PID gains
float32[3] rcac_att_z # Performance variable for the Attitude Controller
float32[3] rcac_att_u # Control generated by the Attitude Controller
float32[3] rcac_att_theta # P gains for the Attitude Controller
float32 rcac_att_ru # Ru for Attitude Controller
float32 rcac_att_n # N Filter Coefficient for Attitude Controller

float32[3] px4_att_theta # P gains for the PX4 Attitude Controller

float32 p11_att # P(1,1) of the RCAC Attitude Controller
34 changes: 34 additions & 0 deletions msg/rcac_fw_pitch.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
uint64 timestamp # time since system start (microseconds)

uint64 ii_rate # iteration step of the FW RCAC Pitch Rate Controller
bool switch_rate # FW RCAC Pitch Rate Controller switch
float32 alpha_pid_rate # Gain that multiplies the rate PID gains
float32 rcac_z_rate # Performance variable for the FW RCAC Pitch Rate Controller
float32 rcac_dzz_rate # Deadzoned of performance variable
float32 rcac_u_rate # Control generated by the FW RCAC Pitch Rate Controller
float32 rcac_nnf_rate # N Filter Coefficient of RCAC Pitch Rate Controller
float32[2] rcac_theta_rate # P gains for the FW RCAC Pitch Rate Controller

float32[2] px4_theta_rate # P gains for the PX4 FW Pitch Rate Controller

float32 p11_rate # P(1,1) of the FW RCAC Pitch Rate Controller
float32 p12_rate # P(1,2) of the FW RCAC Pitch Rate Controller
float32 p21_rate # P(2,1) of the FW RCAC Pitch Rate Controller
float32 p22_rate # P(2,2) of the FW RCAC Pitch Rate Controller

uint64 ii_att # iteration step of the FW RCAC Pitch Att Controller
bool switch_att # FW RCAC Pitch Att Controller switch
float32 alpha_pid_att # Gain that multiplies the Pitch att PID gains
float32 rcac_z_att # Performance variable for the FW RCAC Pitch Att Controller
float32 rcac_u_att # Control generated by the FW RCAC Pitch Att Controller
float32 rcac_nnf_att # N Filter Coefficient of RCAC Pitch Att Controller
float32 rcac_theta_att # P gains for the FW RCAC Pitch Att Controller

float32 px4_theta_att # P gains for the PX4 FW Pitch Att Controller

float32 p11_att # P(1,1) of the FW RCAC Pitch Att Controller

uint8 rate_dz_type # Rate dz type
float32 rate_dz_s1 # Rate dz s1 parameter
float32 rate_dz_s2 # Rate dz s2 parameter
float32 rate_dz_alf # Rate dz alpha parameter
34 changes: 34 additions & 0 deletions msg/rcac_fw_roll.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
uint64 timestamp # time since system start (microseconds)

uint64 ii_rate # iteration step of the FW RCAC Roll Rate Controller
bool switch_rate # FW RCAC Roll Rate Controller switch
float32 alpha_pid_rate # Gain that multiplies the Roll Rate PID gains
float32 rcac_z_rate # Performance variable for the FW RCAC Roll Rate Controller
float32 rcac_dzz_rate # Deadzoned of performance variable
float32 rcac_u_rate # Control generated by the FW RCAC Roll Rate Controller
float32 rcac_nnf_rate # N Filter Coefficient of RCAC Roll Rate Controller
float32[2] rcac_theta_rate # P gains for the FW RCAC Roll Rate Controller

float32[2] px4_theta_rate # P gains for the PX4 FW Roll Rate Controller

float32 p11_rate # P(1,1) of the FW RCAC Roll Rate Controller
float32 p12_rate # P(1,2) of the FW RCAC Roll Rate Controller
float32 p21_rate # P(2,1) of the FW RCAC Roll Rate Controller
float32 p22_rate # P(2,2) of the FW RCAC Roll Rate Controller

uint64 ii_att # iteration step of the FW RCAC Roll Att Controller
bool switch_att # FW RCAC Roll Att Controller switch
float32 alpha_pid_att # Gain that multiplies the Roll att PID gains
float32 rcac_z_att # Performance variable for the FW RCAC Roll Att Controller
float32 rcac_u_att # Control generated by the FW RCAC Roll Att Controller
float32 rcac_nnf_att # N Filter Coefficient of RCAC Roll Att Controller
float32 rcac_theta_att # P gains for the FW RCAC Roll Att Controller

float32 px4_theta_att # P gains for the PX4 FW Roll Att Controller

float32 p11_att # P(1,1) of the FW RCAC Roll Att Controller

uint8 rate_dz_type # Rate dz type
float32 rate_dz_s1 # Rate dz s1 parameter
float32 rate_dz_s2 # Rate dz s2 parameter
float32 rate_dz_alf # Rate dz alpha parameter
19 changes: 19 additions & 0 deletions msg/rcac_fw_yaw.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uint64 timestamp # time since system start (microseconds)

uint64 ii_rate # iteration step of the FW RCAC Yaw Rate Controller
bool switch_rate # FW RCAC Yaw Rate Controller switch
float32 alpha_pid_rate # Gain that multiplies the Yaw Rate PID gains
float32 rcac_z_rate # Performance variable for the FW RCAC Yaw Rate Controller
float32 rcac_dzz_rate # Deadzoned of performance variable
float32 rcac_u_rate # Control generated by the FW RCAC Yaw Rate Controller
float32 rcac_nnf_rate # N Filter Coefficient of RCAC Pitch Rate Controller
float32[2] rcac_theta_rate # P gains for the FW RCAC Yaw Rate Controller

float32[2] px4_theta_rate # P gains for the PX4 FW Yaw Rate Controller

float32 p11_rate # P(1,1) of the FW RCAC Yaw Rate Controller

uint8 rate_dz_type # Rate dz type
float32 rate_dz_s1 # Rate dz s1 parameter
float32 rate_dz_s2 # Rate dz s2 parameter
float32 rate_dz_alf # Rate dz alpha parameter
32 changes: 32 additions & 0 deletions msg/rcac_pos_vel_variables.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Fused local position in NED.

uint64 timestamp # time since system start (microseconds)

float32 pid_factor # PID scaling
float32 rcac_master_sw # Master RCAC switch
float32 beta_mot_fr # Gain that limits the QC FR motor PWM signal
bool beta_mot_fr_sw # Switch for gain that limits the QC FR motor PWM signal

uint64 ii_pos # iteration step of the RCAC Position Controller
bool switch_pos # RCAC Position Controller switch
float32 alpha_pid_pos # Gain that multiplies the position PID gains
float32[3] rcac_pos_z # Performance variable for the Position Controller
float32[3] rcac_pos_u # Control generated by the Position Controller
float32[3] rcac_pos_theta # P gains for the Position Controller
float32 rcac_pos_ru # Ru for Position Controller
float32 rcac_pos_n # N Filter Coefficient for Position Controller

uint64 ii_vel # iteration step of the RCAC Velocity Controller
bool switch_vel # RCAC Velocity Controller switch
float32 alpha_pid_vel # Gain that multiplies the velocity PID gains
float32[3] rcac_vel_z # Performance variable for the Velocity Controller
float32[3] rcac_vel_u # Control generated by the Velocity Controller
float32[9] rcac_vel_theta # PID gains for the Velocity Controller
float32 rcac_vel_ru # Ru for Velocity Controller
float32 rcac_vel_n # N Filter Coefficient for Velocity Controller

float32[9] px4_ol_theta # P and PID gains for the PX4 outer loop Controller
# First 3 are P, next 3 are PID for XY, last 3 are PID for Z

float32 p11_pos # P(1,1) of the RCAC Position Controller
float32 p11_velx # P(1,1) of the RCAC Velocity Controller
17 changes: 17 additions & 0 deletions msg/rcac_rate_variables.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Fused local position in NED.

uint64 timestamp # time since system start (microseconds)

uint64 ii_rate # iteration step of the RCAC Rate Controller
bool switch_rate # RCAC Rate Controller switch
float32 alpha_pid_rate # Gain that multiplies the rate PID gains
float32[3] rcac_rate_z # Performance variable for the Rate Controller
float32[3] rcac_rate_u # Control generated by the Rate Controller
float32 rcac_rate_ru # Ru for Rate Controller
float32 rcac_rate_n # N Filter Coefficient for Rate Controller

float32[12] rcac_rate_theta # PID+FF gains for the Rate Controller

float32[12] px4_rate_theta # P gains for the PX4 Rate Controller

float32 p11_ratex # P(1,1) of the RCAC Rate Controller
2 changes: 1 addition & 1 deletion platforms/common/px4_work_queue/WorkQueueManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ WorkQueueManagerRun(int, char **)
// On posix system , the desired stacksize round to the nearest multiplier of the system pagesize
// It is a requirement of the pthread_attr_setstacksize* function
const unsigned int page_size = sysconf(_SC_PAGESIZE);
const size_t stacksize_adj = math::max(PTHREAD_STACK_MIN, PX4_STACK_ADJUSTED(wq->stacksize));
const size_t stacksize_adj = math::max(static_cast<long>(PTHREAD_STACK_MIN), static_cast<long>(PX4_STACK_ADJUSTED(wq->stacksize)));
const size_t stacksize = (stacksize_adj + page_size - (stacksize_adj % page_size));
#endif
int ret_setstacksize = pthread_attr_setstacksize(&attr, stacksize);
Expand Down
4 changes: 4 additions & 0 deletions repo_update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
make distclean
git submodule sync
git submodule update --init --recursive
git submodule update --remote --recursive mavlink
9 changes: 9 additions & 0 deletions run_gazebo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Quadcopter initial position
#export PX4_HOME_LAT=42.29454
#export PX4_HOME_LON=-83.710547
#export PX4_HOME_ALT=274.0
# FW initial position
export PX4_HOME_LAT=42.298612
export PX4_HOME_LON=-83.842467
export PX4_HOME_ALT=271.2
make px4_sitl gazebo_plane_catapult
10 changes: 10 additions & 0 deletions run_gazebo_plane_catapult_testfield_new.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# LL on the right (Comment accordingly!!)
#export PX4_HOME_LAT=42.298612
#export PX4_HOME_LON=-83.842467

# LL on the left (Comment accordingly!!)
export PX4_HOME_LAT=42.298502
export PX4_HOME_LON=-83.843980
export PX4_HOME_ALT=271.2

make px4_sitl gazebo_plane_catapult
4 changes: 4 additions & 0 deletions run_jmavsim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export PX4_HOME_LAT=42.29455
export PX4_HOME_LON=-83.710547
export PX4_HOME_ALT=274.0
make px4_sitl_default jmavsim
4 changes: 4 additions & 0 deletions run_jmavsim_valgrind.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export PX4_HOME_LAT=42.29455
export PX4_HOME_LON=-83.710547
export PX4_HOME_ALT=274.0
make px4_sitl_default
2 changes: 2 additions & 0 deletions src/lib/mathlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ px4_add_library(mathlib
math/test/test.cpp
math/filter/LowPassFilter2p.cpp
math/filter/LowPassFilter2pVector3f.cpp
math/filter/ContDiffDeadzone.cpp
math/RCAC/src/RCAC.cpp
)

px4_add_unit_gtest(SRC math/filter/MedianFilterTest.cpp)
Expand Down
1 change: 1 addition & 0 deletions src/lib/mathlib/math/RCAC
Submodule RCAC added at 67a5c2
Loading