From 287bf9a46cd4cc0720648baf650a55bb4367d53f Mon Sep 17 00:00:00 2001 From: Rik Bouwmeester Date: Mon, 9 Dec 2024 13:49:18 +0100 Subject: [PATCH 1/2] Update brushless platform default mass Add comment that mass should be set based on specific setup --- src/platform/interface/platform_defaults_cf21bl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform/interface/platform_defaults_cf21bl.h b/src/platform/interface/platform_defaults_cf21bl.h index 9a7d6696f4..536aa74de1 100644 --- a/src/platform/interface/platform_defaults_cf21bl.h +++ b/src/platform/interface/platform_defaults_cf21bl.h @@ -43,10 +43,10 @@ #define DEFAULT_SYSTEM_SHUTDOWN_TIMEOUT_MIN 5 // Drone physical constants -// m -#define ARM_LENGTH 0.046f -// kg -#define CF_MASS 0.030f +#define ARM_LENGTH 0.050f // m +// Default: Crazyflie 2.1 Brushless with propeller guards, 350mAh battery, and Lighthouse deck. +// Update this value with the mass of your specific setup if different. +#define CF_MASS 0.0393f // kg // Default PID gains #define PID_ROLL_RATE_KP 200.0 From dbad112cfc29c6b9d41395e6136b3dc2fcb5f461 Mon Sep 17 00:00:00 2001 From: Rik Bouwmeester Date: Mon, 9 Dec 2024 14:20:15 +0100 Subject: [PATCH 2/2] docs: add notes about updating platform mass for controllers --- docs/functional-areas/sensor-to-control/controllers.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/functional-areas/sensor-to-control/controllers.md b/docs/functional-areas/sensor-to-control/controllers.md index 2421f12914..cc15ba86e2 100644 --- a/docs/functional-areas/sensor-to-control/controllers.md +++ b/docs/functional-areas/sensor-to-control/controllers.md @@ -58,6 +58,8 @@ Check the implementation details in `position_controller_pid.c` in `positionCont ## Mellinger Controller +_**Note:** This controller relies on the platform mass for its calculations. Ensure the platform mass is updated in [the firmware's platform defaults](https://github.com/bitcraze/crazyflie-firmware/tree/master/src/platform/interface) whenever the setup changes._ + Conceptually the Mellinger controller is similar to the cascaded PID controller, i.e. there is an attitude controller (running at 250 Hz) and a position controller (running at 100 Hz). The main difference to the cascaded PID controller is how errors are defined and how the position error is translated into desired attitude setpoints. Like the cascaded PID, this is a reactive geometric controller that uses the mathematical property of differential flatness. Details are given in the following scientific publication: ``` @@ -82,6 +84,8 @@ https://doi.org/10.2514/1.G001490 ## Brescianini Controller +_**Note:** This controller relies on the platform mass for its calculations. Ensure the platform mass is updated in [the firmware's platform defaults](https://github.com/bitcraze/crazyflie-firmware/tree/master/src/platform/interface) whenever the setup changes._ + Details of this controller are in the following scientific publication: ``` @@ -93,6 +97,8 @@ https://doi.org/10.3929/ethz-a-009970340 ## Lee Controller +_**Note:** This controller relies on the platform mass for its calculations. Ensure the platform mass is updated in [the firmware's platform defaults](https://github.com/bitcraze/crazyflie-firmware/tree/master/src/platform/interface) whenever the setup changes._ + Conceptually the Lee controller is similar to the cascaded PID controller, i.e. there is an attitude controller (running at 250 Hz) and a position controller (running at 100 Hz). The main difference to the cascaded PID controller is how errors are defined and how the position error is translated into desired attitude setpoints. Like the cascaded PID, this is a reactive geometric controller that uses the mathematical property of differential flatness. Compared to the Mellinger controller, a different angular velocity error and higher-order terms in the attitude controller are used. Details including a stability proof are given in the following scientific publication: ```