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

Question about 'controller_node' line 230 #2

Open
zshayann opened this issue Jul 10, 2024 · 1 comment
Open

Question about 'controller_node' line 230 #2

zshayann opened this issue Jul 10, 2024 · 1 comment

Comments

@zshayann
Copy link

zshayann commented Jul 10, 2024

Hi,

Thank you for providing this repository. I am having trouble understanding the logic behind the matrix defined on line 230. I am trying to design a controller for my own drone with different parameters. Could you please explain how you derived the throttles_to_normalized_torques_and_thrust_ matrix?

Here is the link to the specific line of code:

throttles_to_normalized_torques_and_thrust_ <<

Additionally, I am curious about how you calculated the omega-to-PWM coefficient.

I really appreciate any help you can provide.

@zshayann zshayann changed the title Question about 'controller_node' line 230. Question about 'controller_node' line 230 Jul 10, 2024
@321thijs123
Copy link
Collaborator

321thijs123 commented Jul 12, 2024

@ayhamalharbat could explain the matrix?

To get the omega_to_pwm_coefficient we mounted the motor on a thrust stand from tyto robotics equipped with an tachometer. Using this setup we measured the velocity of the motor with propeller for different PWM inputs. We then fit a polynonominal to these values, you can find how we did that in this script:
https://github.com/SaxionMechatronics/px4_offboard_lowlevel/blob/82f4a24ffda4e8169e6e5bc1dd54238c77302807/scripts/identification.py#L110C1-L115C32

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

No branches or pull requests

2 participants