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

mention rate mode setpoint set in doc #452

Merged
merged 4 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
9 changes: 5 additions & 4 deletions cflib/crazyflie/commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member Author

Choose a reason for hiding this comment

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

test

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*.
knmcguire marked this conversation as resolved.
Show resolved Hide resolved
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:
Expand Down
5 changes: 5 additions & 0 deletions docs/user-guides/python_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
knmcguire marked this conversation as resolved.
Show resolved Hide resolved

> 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:
Expand Down
Loading