-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Pid update #161
Pid update #161
Conversation
… z velocity max as a parameter.
…ring of when thrust command is sent.
Hi, |
It's true that the thrust cannot go negative, but within the crazyflie-firmware the name thrust is somewhat of a misnomer, as it is used for direct/scaled thrust, z velocity, or z position. The value should be properly limited based on what the flight mode is within the crazyflie-firmware. |
Hi, For the commander packer: we will not change the current commander packet since too many client are currently dependent on it. CRTP has port and channels to route packets, the current plan is to create a new commander packet format on a new channel (see #113). The current usage of thrust as height setpoint is a hack made to work until we have the new commander packet, going forward we should go with well formed packets using SI units. If you remove the commander part I can merge the PR and lets talk on #113 on how to go forward with the commander packet. I had grand plan to revamp the code but we can just add a new packet quickly to get the functionality in and clean the implementation later. Basically anything as long as we do not break the outside interface :). |
Huge +1 to not changing the current commander packet!! |
@@ -37,7 +37,7 @@ | |||
#include "debug.h" | |||
#include "ext_position.h" | |||
|
|||
#define MIN_THRUST 1000 | |||
#define MIN_THRUST 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why this was originally 1000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep good question. The brushed motors don't start spinning until ~3000 so I think it was initially intended so that power isn't consumed without any movement. When it spinns it can go lower so that is were 1000 comes from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Is this a change you'd like me to keep @tobbeanton @ataffanel ?
@@ -174,10 +175,6 @@ static void commanderCrtpCB(CRTPPacket* pk) | |||
crtpCache.targetVal[!crtpCache.activeSide] = *((struct CommanderCrtpValues*)pk->data); | |||
crtpCache.activeSide = !crtpCache.activeSide; | |||
crtpCache.timestamp = xTaskGetTickCount(); | |||
|
|||
if (crtpCache.targetVal[crtpCache.activeSide].thrust == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to keep the thrust lock -- it's a good safety feature, especially when using transmitters with a non-spring loaded throttle that might not be at zero on power-on, and with BigQuad builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understandable. I'll remove this along with the other commander changes I've made.
That makes sense. I can remove the non-PID related changes and close the other pull requests. |
Hi, Thanks! Tested and merged. |
Also see PSVL/lps-ros#1 and whoenig/crazyflie_ros#49