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

esc_calibration: document latest functionality #2599

Merged
merged 12 commits into from
Jul 10, 2023
Merged

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Jun 27, 2023

For the 1.14 release because we already changed the actuator configuration and users will need to go through their setups I also corrected the PWM calibration and the default PWM values.

See PX4/PX4-Autopilot#21711 and PX4/PX4-Autopilot#21513

This is the documentation change with it. And needs to be referenced by the release notes.

:::
1. Disconnect the battery and connect the flight controller via USB (only).
1. Map the ESCs you're calibrating as Motors in the vehicle's [Actuator Configuration](../config/actuators.md). Only mapped actuators get an output and hence only ESCs mapped as motors get calibrated.
1. Unpower the ESCs by unplugging the battery but keep the flight controller powered and connected to the ground station best by plugging it via USB (only).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
1. Unpower the ESCs by unplugging the battery but keep the flight controller powered and connected to the ground station best by plugging it via USB (only).
1. Unpower the ESCs by unplugging the battery.
The flight controller should ideally still be powered via USB, and remain connected to the ground station.

Copy link
Member Author

Choose a reason for hiding this comment

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

flight controller should ideally still be powered

Maybe that's already covered but the flight controller must stay powered. That's easiest (= ideal?) achieved with the classic pixhawk boards because they stay powered with USB only.

For e.g. Skynode USB alone is not enough, you need to keep the power module connected and so it's more tricky. I'm not sure but wouldn't be surprised if there are other setups that work this way. Hence it's also mentioned in the troubleshooting. Hopefully, I can improve the workflow for these cases.

Copy link
Collaborator

@hamishwillee hamishwillee Jun 29, 2023

Choose a reason for hiding this comment

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

I've updated this particular case to directly reference Pixhawk and note that other systems might need another approach: a385119

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jun 28, 2023

@hamishwillee You are absolutely genius! Thanks for looking over it so promptly. The feedback is spot-on and very helpful. I'll fix some things 🙏

@hamishwillee
Copy link
Collaborator

No worries - great to see this being tidied up. It makes a lot more sense now. I've done what I can so hands off until you tell me that you need something else, or the PR goes in and we can update the actuators images for the new defaults.

MaEtUgR and others added 5 commits July 5, 2023 14:49
For the 1.14 release because we already changed the actuator
configuration and users will need to go through their setups I also
corrected the PWM calibration and the default PWM values.

See PX4/PX4-Autopilot#21711
and PX4/PX4-Autopilot#21513

This is the documentation change with it. And needs to be
referenced by the release notes.
@MaEtUgR MaEtUgR force-pushed the maetugr/esc-calibration branch from eeb29c8 to 00bca3e Compare July 5, 2023 20:24
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 5, 2023

@hamishwillee I rebased and went through everything again adding my suggestions and small corrections.
The only thing missing now is merging the two to some degree redundant motor configuration parts. If it's ok for you I'd do that in the next iteration such that we have at least a working up-to-date PWM guide to point to when merging PX4/PX4-Autopilot#21513


[DShot](../peripherals/dshot.md) and [DroneCAN](../dronecan/escs.md)/Cyphal ESCs do not require this configuration.
[DShot](../peripherals/dshot.md) ESCs do not require configuration of the command limits but only rotation direction.
Copy link
Collaborator

@hamishwillee hamishwillee Jul 6, 2023

Choose a reason for hiding this comment

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

@MaEtUgR So we still need to configure max/min/disarmed etc for CAN ESCs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, because in the cases I've seen a rather generalized motor command message is used and each ESC model/configuration can map it differently. That's also why the option to configure the limit commands exists e.g. for DroneCAN: https://github.com/PX4/PX4-Autopilot/blob/39e04d971229f3ca0d1e080d55bf7ac2f7894562/src/drivers/uavcan/module.yaml#L15-L25

@hamishwillee
Copy link
Collaborator

@hamishwillee I rebased and went through everything again adding my suggestions and small corrections.
The only thing missing now is merging the two to some degree redundant motor configuration parts. If it's ok for you I'd do that in the next iteration such that we have at least a working up-to-date PWM guide to point to when merging PX4/PX4-Autopilot#21513

@MaEtUgR Thanks for sorting the details out. Merging redundant motor configuration parts can certainly wait, perhaps forever.

Do you have any ETA on PX4/PX4-Autopilot#21513 being merged?

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 6, 2023

@hamishwillee Thank you so much for your help!

Merging redundant motor configuration parts can certainly wait, perhaps forever.

Not forever but not be blocking. The reason for my strategy of the 7th step is that if I was the reader the existing motor configuration is in the middle of a very long page. And I might miss it not knowing how important that step is. This can and should for sure be solved with a reference and merging the two motor configuration guides. PWM is the main example for the entire procedure anyways.

Do you have any ETA on PX4/PX4-Autopilot#21513 being merged?

I would have merged it already but wanted to notify users about the change and make sure we can reference the updated documentation page on how to do things correctly now. So if this page is understandable I would move on, merge the change both in main and 1.14 and notify the people we reach with the documentation reference.

@hamishwillee
Copy link
Collaborator

Not forever but not be blocking.

The reason I say forever is the way I want to fix this in actuators page is to split it up for the various frames - it is just too big and intimidating, and what you need to know for MCs is a lot less than all of that. But doing so is a big job, so I am waiting to get courage.

I don't mind the duplication at this level in the ESC page. But yes, better long term to have one source of instructions.

le I would move on, merge the change both in main and 1.14 and notify the people we reach with the documentation reference.

I think the page is understandable. I count myself as the "average uninformed user", so unless you want someone else to take a look, I am OK for it to be merged.

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 10, 2023

it is just too big and intimidating, and what you need to know for MCs is a lot less than all of that

I thought exactly that but wasn't sure about a good solution to that problem. What you suggest makes sense 👍

unless you want someone else to take a look, I am OK for it to be merged

You are the best tech doc writer and reviewer I know. I think we can merge then.

@MaEtUgR MaEtUgR merged commit dc4d4d5 into main Jul 10, 2023
@MaEtUgR MaEtUgR deleted the maetugr/esc-calibration branch July 10, 2023 16:55
@hamishwillee
Copy link
Collaborator

You are the best tech doc writer and reviewer I know. I think we can merge then.

Am I the only tech writer you know? :-)

Thanks for merging, and for making this whole area much more robust "out of the box".

@github-actions
Copy link

No flaws found

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

Successfully merging this pull request may close these issues.

2 participants