-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
UAVCAN ESC: add min and max parameters for ESC raw commands #13372
Conversation
The parameters are factors of the max raw value message: e.g: setting UAVCAN_ESC_MAX to 0.9 maps full thrust to 90% of the maximum raw value message
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Still wanted? |
@dagar this isn't a priority but I'll still do it now that the refactor is merged. |
@bresch We could test this for you. I had a look to see if I could rebase it myself but it looks like there was quite a big change on the esc.hpp and uavcan_main.cpp files so not sure if it's that simple. Do you have an ETA on this? |
Waiting for UAVCAN v1 |
@bresch , are you planning to merge this into |
@fabrizioschiano It has been dropped because UAVCAN v1 should come out "soon" and will hopefully handle that. If you need it in the mean time, feel free to revive this PR. |
@bresch, thanks for the quick reply! Do you know when this should happen or could you point me towards a link where this will be updated? |
Probably #14865 |
This adds the possibility to define the min and max UAVCAN RAW values the autopilot sends to the ESCs in order to avoid early saturation of the ESCs leading to instability at high and low thrust.
To be intuitive to set, the parameters are factors (between 0 and 1) of the max raw value message:
e.g: setting UAVCAN_ESC_MAX to 0.9 maps full thrust to 90% of the
maximum raw value message
Here is a representation of the scaling where:
s_min =
UAVCAN_ESC_MIN
s_max =
UAVCAN_ESC_MAX
m =
uavcan::equipment::esc::RawCommand::FieldTypes::cmd::RawValueType::max()
https://www.desmos.com/calculator/piocnsvfpb