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

UAVCAN ESC: add min and max parameters for ESC raw commands #13372

Closed
wants to merge 1 commit into from

Conversation

bresch
Copy link
Member

@bresch bresch commented Nov 4, 2019

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

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
@dagar
Copy link
Member

dagar commented Nov 4, 2019

This seems fine, although it might conflict with #13254. In this case it might be helpful to rebase on #13254 and get some combined testing.

@stale
Copy link

stale bot commented Feb 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Feb 2, 2020
@dagar
Copy link
Member

dagar commented Feb 2, 2020

Still wanted?

@stale stale bot removed the stale label Feb 2, 2020
@bresch
Copy link
Member Author

bresch commented Feb 2, 2020

@dagar this isn't a priority but I'll still do it now that the refactor is merged.

@RicardoM17
Copy link
Contributor

@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?

@bresch
Copy link
Member Author

bresch commented Apr 20, 2020

Waiting for UAVCAN v1

@bresch bresch closed this Apr 20, 2020
@bresch bresch deleted the pr-uavcan-min-max branch April 20, 2020 12:55
@fabrizioschiano
Copy link

@bresch , are you planning to merge this into master at some point or it has been dropped?

@bresch
Copy link
Member Author

bresch commented Jan 15, 2021

@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.

@fabrizioschiano
Copy link

@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?

@bresch
Copy link
Member Author

bresch commented Jan 15, 2021

Probably #14865

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants