From 50a4abc573b337b3df22183948d2253f9e4f3fbf Mon Sep 17 00:00:00 2001 From: knmcguire Date: Wed, 24 Apr 2024 15:23:09 +0200 Subject: [PATCH 1/4] mention rate mode setpoint set in doc --- cflib/crazyflie/commander.py | 9 +++++---- docs/user-guides/python_api.md | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cflib/crazyflie/commander.py b/cflib/crazyflie/commander.py index 1f0501436..96f52d454 100644 --- a/cflib/crazyflie/commander.py +++ b/cflib/crazyflie/commander.py @@ -71,11 +71,12 @@ def send_setpoint(self, roll, pitch, yawrate, thrust): """ Send a new control setpoint for roll/pitch/yaw_Rate/thrust to the copter. - The meaning of these values is depended on the mode of the RPYT commander in the firmware - Default settings are Roll, pitch, yawrate and thrust + The meaning of these values is depended on the mode of the RPYT commander in the firmware. + The roll, pitch and yaw can be set in a rate or absolute mode with paramter flightmode.stabMode*. + Default settings are roll, pitch, yawrate and thrust - roll, pitch are in degrees - yawrate is in degrees/s + roll, pitch are in degrees, + yawrate is in degrees/s, thrust is an integer value ranging from 10001 (next to no power) to 60000 (full power) """ if thrust > 0xFFFF or thrust < 0: diff --git a/docs/user-guides/python_api.md b/docs/user-guides/python_api.md index 7063192d9..0e844395c 100644 --- a/docs/user-guides/python_api.md +++ b/docs/user-guides/python_api.md @@ -246,12 +246,17 @@ setpoint with the same thrust but with roll/pitch/yawrate = 0, this will make the Crazyflie stop accelerating. After 2 seconds without new setpoint the Crazyflie will cut power from the motors. + Note that this command implements a motor lock mechanism that is intended to avoid flyaway when connecting a gamepad. You must send one command with thrust = 0 in order to unlock the command. This unlock procedure needs to be repeated if the watchdog described above kicks-in. +This the current default behavior, but it is depended on the [Supervisor configuration in the Crazyflie firmware](https://www.bitcraze.io/documentation/repository/crazyflie-firmware/master/functional-areas/supervisor/). + +> Note: If you'd like to send rate commands instead, make sure that the [flightmode.stabModeRoll/Pitch/Yaw](https://www.bitcraze.io/documentation/repository/crazyflie-firmware/master/api/params/#flightmode) is set to rate (0). + ### Other commander setpoints sending If your Crazyflie has a positioning system (Loco, flowdeck, MoCap, Lighthouse), you can also send velocity or position setpoints, like for instance: From 9a19ceb96da490d4efe039b782ec1b93acff5e29 Mon Sep 17 00:00:00 2001 From: Kimberly McGuire Date: Tue, 7 May 2024 13:30:58 +0200 Subject: [PATCH 2/4] Update docs/user-guides/python_api.md --- docs/user-guides/python_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guides/python_api.md b/docs/user-guides/python_api.md index 0e844395c..a81b2da7f 100644 --- a/docs/user-guides/python_api.md +++ b/docs/user-guides/python_api.md @@ -253,7 +253,7 @@ one command with thrust = 0 in order to unlock the command. This unlock procedure needs to be repeated if the watchdog described above kicks-in. -This the current default behavior, but it is depended on the [Supervisor configuration in the Crazyflie firmware](https://www.bitcraze.io/documentation/repository/crazyflie-firmware/master/functional-areas/supervisor/). +This the current default behavior, but it depends on the [Supervisor configuration in the Crazyflie firmware](https://www.bitcraze.io/documentation/repository/crazyflie-firmware/master/functional-areas/supervisor/). > Note: If you'd like to send rate commands instead, make sure that the [flightmode.stabModeRoll/Pitch/Yaw](https://www.bitcraze.io/documentation/repository/crazyflie-firmware/master/api/params/#flightmode) is set to rate (0). From 06de96ef63a4065dadf9ca9210629a40541fcb1b Mon Sep 17 00:00:00 2001 From: Kimberly McGuire Date: Tue, 7 May 2024 13:34:04 +0200 Subject: [PATCH 3/4] Update cflib/crazyflie/commander.py --- cflib/crazyflie/commander.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cflib/crazyflie/commander.py b/cflib/crazyflie/commander.py index 96f52d454..6916c1f5e 100644 --- a/cflib/crazyflie/commander.py +++ b/cflib/crazyflie/commander.py @@ -72,7 +72,7 @@ def send_setpoint(self, roll, pitch, yawrate, thrust): Send a new control setpoint for roll/pitch/yaw_Rate/thrust to the copter. The meaning of these values is depended on the mode of the RPYT commander in the firmware. - The roll, pitch and yaw can be set in a rate or absolute mode with paramter flightmode.stabMode*. + The roll, pitch and yaw can be set in a rate or absolute mode with parameter group `flightmode` with variables `stabModeRoll`, `.stabModeRoll` and `.stabModeRoll`. Default settings are roll, pitch, yawrate and thrust roll, pitch are in degrees, From 2d3422ec59d7ad43ddf0f01b9095a0646999a918 Mon Sep 17 00:00:00 2001 From: Kimberly McGuire Date: Tue, 7 May 2024 13:40:54 +0200 Subject: [PATCH 4/4] Update cflib/crazyflie/commander.py --- cflib/crazyflie/commander.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cflib/crazyflie/commander.py b/cflib/crazyflie/commander.py index 6916c1f5e..4f78da782 100644 --- a/cflib/crazyflie/commander.py +++ b/cflib/crazyflie/commander.py @@ -72,7 +72,8 @@ def send_setpoint(self, roll, pitch, yawrate, thrust): Send a new control setpoint for roll/pitch/yaw_Rate/thrust to the copter. The meaning of these values is depended on the mode of the RPYT commander in the firmware. - The roll, pitch and yaw can be set in a rate or absolute mode with parameter group `flightmode` with variables `stabModeRoll`, `.stabModeRoll` and `.stabModeRoll`. + The roll, pitch and yaw can be set in a rate or absolute mode with parameter group + `flightmode` with variables `stabModeRoll`, `.stabModeRoll` and `.stabModeRoll`. Default settings are roll, pitch, yawrate and thrust roll, pitch are in degrees,