-
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
Bolt + BQdeck persistent parameters #931
Conversation
actually we should have mass outside of the Mellinger controller as a more global assessable parameters. |
So currently tuning values in both PID and Mellinger, as noise values in the EKF are persistent in this PR. Anything else missing? |
Perhaps the nonstandard IMU orientation values? But then these need to be converted to a parameters as well. @matejkarasek what do you think? |
Just going to start a list here of what I think could be persistent based on the parameter list.
EDIT:
|
Yes, good idea to do that. If we consider some motors can be servos, two more ideas (that will require code changes):
These would certainly deserve a new PR, though... can help... |
And two more ideas (with code changes needed):
|
For lighthouse, it could certainly be the position of the markers on the airframe... |
Very good input @matejkarasek, thanks! For the controller gains, currently I made the attitude rate parameters persistent and planning now to do attitude paramters. Theoretically, or rather in an ideal world, the position and velocity gains should not have to be changed... but ofcourse reality is different. |
About your comments about motors.c and the initialized thrust, Isn't the param group powerdist about that? |
Could be a suitable param group indeed. Now it contains only idle power for brushless motors. |
Yes, we do... #reality :) |
This will be a bit difficult for the yaw estimation due to a strong assumption that the deck needs to be flat and on top of the platform. But it's a good one thought! I have put it in the list so it least it is written down. |
@matejkarasek with the thrust mapping and 1s voltage you mean the values that are hardcoded in these lines? crazyflie-firmware/src/drivers/src/motors.c Line 163 in b0c72f2
crazyflie-firmware/src/drivers/src/motors.c Lines 168 to 169 in b0c72f2
|
Yes indeed, for the thrust mapping those two lines. For the battery voltage, there might be a few more places in the code... Like detection of low voltage and indication with the LEDs... |
Yeah, true... Well it could be xyz position of the deck on the airframe at least (now in the code you do that per receiver I think). Just an idea anyway for possible future updates :) |
For now there are 90 parameters set as persistent. |
So I've just flashed this on a crazyflie, set every persistent parameter in eeprom that is possible, restarted the crazyflie and...... no crash! So it seems to be doing pretty good :) |
I think the list is a really good start. For those properties that do not have a parameter yet I think we should add them in separate pull requests such as board alignment, battery levels etc. As we have also decided to shrink the platform concept a bit, due to different default values, and introduce kbuild to make selection easy. Thus the CF2.1, Bolt and possibly Flapper would be its's own platform with own binary (own compile time flags). One parameter I'm thinking about the the forceArm which is tagged now. The whole idea of that parameter is for something external to have to set it to be able to arm the motors. If this could be set permanently the purpose might be gone. On the other side, it would be easy to set it to different default value for different platform. E.g CF2.1 will not require forceArm but Bolt could. I think I changed my mind, let's keep it as persistent. We should keep in mind also that the 8Kbyte EEPROM can store somewhere between 200-300 parameters in total. |
Nice start indeed! Already helps to minimize the amount of changes needed in our fork compared to master.. I agree it might be even better to split the current CF2 platform into more specific ones (CF2.1, Bolt, Flapper, ...) as it would simplify the very first setup, no need to change to the platform-specific default values after the first flashing... |
a PR to start making parameters persistent that are necessary when making a bigger drone with the BQ deck or Bolt.