Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/TPA #5861

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9a08b77
Rework TPA to have per-component setup and use more stable and intuit…
anton-matosov Nov 15, 2016
40a70f9
Add ZMR250 params
anton-matosov Nov 15, 2016
c4285a0
Remove debug code for RATE_I_MODE
anton-matosov Nov 15, 2016
195b618
Fix formatting
anton-matosov Nov 15, 2016
3a1c689
Remove code that should be in MC-Failsafe branch
anton-matosov Nov 16, 2016
26cf17f
Rename TPA_SLOPE into TPA_RATE and remove unused params
anton-matosov Nov 16, 2016
a4a795c
Merge latest 'master' into feature/TPA
anton-matosov Nov 16, 2016
e127e4a
Merge branch 'master' into feature/TPA
anton-matosov Nov 17, 2016
125cfb1
Merge commit 'b020be13f67838047d1c2532cf66a99ceb28cddf' into feature/TPA
anton-matosov Nov 30, 2016
fb7eb50
Merge branch 'master' into feature/TPA
anton-matosov Dec 1, 2016
7141b0f
Rename to solve conflict
anton-matosov Dec 2, 2016
4df4226
Update to the most recent config
anton-matosov Dec 2, 2016
50ff01d
Merge commit 'fee75c61a18d8c8d6a32406575ed5ede79d01446' into feature/TPA
anton-matosov Dec 2, 2016
2caf71e
Merge commit '64657900de1b306c509aeeb704ef897a00aa4183' into feature/TPA
anton-matosov Dec 3, 2016
3f57f08
Merge branch 'master' into feature/TPA
anton-matosov Dec 5, 2016
3adaf6a
Merge branch 'master' into feature/TPA
anton-matosov Dec 7, 2016
62a9f28
Merge branch 'master' into feature/TPA
anton-matosov Dec 7, 2016
c19e37d
Merge branch 'master' into feature/TPA
anton-matosov Dec 8, 2016
e280259
Merge branch 'master' into feature/TPA
anton-matosov Dec 9, 2016
983b745
Merge branch 'master' into feature/TPA
anton-matosov Dec 10, 2016
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
58 changes: 58 additions & 0 deletions ROMFS/px4fmu_common/init.d/4070_zmr250
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!nsh
#
# @name ZMR250 Racer
#
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
#
# @maintainer Anton Matosov <anton.matosov@gmail.com>
#

sh /etc/init.d/rc.mc_defaults

set MIXER zmr250
set PWM_OUT 1234

if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 2.0
param set MC_ROLLRATE_P 0.05
param set MC_ROLLRATE_I 0.2
param set MC_ROLLRATE_D 0.0003
param set MC_ROLL_TC 0.18

param set MC_PITCH_P 2.0
param set MC_PITCHRATE_P 0.05
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_D 0.0003
param set MC_PITCH_TC 0.18

param set MC_YAW_P 1.0
param set MC_YAWRATE_P 0.15
param set MC_YAWRATE_I 0.2
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5

param set MC_ROLLRATE_MAX 720.0
param set MC_PITCHRATE_MAX 720.0
param set MC_YAWRATE_MAX 400.0
param set MC_ACRO_R_MAX 720.0
param set MC_ACRO_P_MAX 720.0

param set MC_TPA_BREAK_P 0.7
param set MC_TPA_BREAK_D 0.7
param set MC_TPA_SLOPE_P 0.3
param set MC_TPA_SLOPE_D 0.3

param set PWM_MIN 1075
param set PWM_RATE 1000

param set MPC_THR_MIN 0.06
param set MPC_THR_MAX 0.9
param set MPC_MANTHR_MIN 0.06
param set MPC_MANTHR_MAX 0.9

param set CBRK_IO_SAFETY 22027
fi
10 changes: 10 additions & 0 deletions ROMFS/px4fmu_common/mixers/zmr250.main.mix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# R: <geometry> <roll scale> <pitch scale> <yaw scale> <deadband>
R: 4x 7654 10000 10000 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anton-matosov I'm talking about the roll_scale parameter (7654) on this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, never mind my previous post then.
Mixer config is the best way to accommodate custom geometry. ZMR 250 is asymmetric and mixer compensates this.
For ZMR250 mixing for cleanflight/betaflight please refer to https://oscarliang.com/custom-motor-output-mix-quadcopter/


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

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