Skip to content

Commit 4cc9005

Browse files
authored
Merge pull request #452 from bitcraze/add-rate-explanation
mention rate mode setpoint set in doc
2 parents c2408ef + 2d3422e commit 4cc9005

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

cflib/crazyflie/commander.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,13 @@ def send_setpoint(self, roll, pitch, yawrate, thrust):
7171
"""
7272
Send a new control setpoint for roll/pitch/yaw_Rate/thrust to the copter.
7373
74-
The meaning of these values is depended on the mode of the RPYT commander in the firmware
75-
Default settings are Roll, pitch, yawrate and thrust
74+
The meaning of these values is depended on the mode of the RPYT commander in the firmware.
75+
The roll, pitch and yaw can be set in a rate or absolute mode with parameter group
76+
`flightmode` with variables `stabModeRoll`, `.stabModeRoll` and `.stabModeRoll`.
77+
Default settings are roll, pitch, yawrate and thrust
7678
77-
roll, pitch are in degrees
78-
yawrate is in degrees/s
79+
roll, pitch are in degrees,
80+
yawrate is in degrees/s,
7981
thrust is an integer value ranging from 10001 (next to no power) to 60000 (full power)
8082
"""
8183
if thrust > 0xFFFF or thrust < 0:

docs/user-guides/python_api.md

+5
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,17 @@ setpoint with the same thrust but with roll/pitch/yawrate = 0, this
246246
will make the Crazyflie stop accelerating. After 2 seconds without new
247247
setpoint the Crazyflie will cut power from the motors.
248248

249+
249250
Note that this command implements a motor lock mechanism that is
250251
intended to avoid flyaway when connecting a gamepad. You must send
251252
one command with thrust = 0 in order to unlock the command. This
252253
unlock procedure needs to be repeated if the watchdog described above
253254
kicks-in.
254255

256+
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/).
257+
258+
> 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).
259+
255260
### Other commander setpoints sending
256261

257262
If your Crazyflie has a positioning system (Loco, flowdeck, MoCap, Lighthouse), you can also send velocity or position setpoints, like for instance:

0 commit comments

Comments
 (0)