-
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
Creating new mixer geometry - documentation required #7382
Comments
Here are two discussion topics that touch on this. The first one is the most useful
|
@bresch Can you comment here and potentially put your tables extension (but not the mixer itself) into a PR? |
In order to compute the mixer table for my asymmetric drone, I created a python script that solves the M, L, N body-axis moments equations (around roll, pitch and yaw) together in order to minimize coupling between the axes and create the required torque around the CG. |
The notebook handles 6dof control (3 axis torque + 3 axis thrust). That is interesting for holonomic platforms, and also for VTOL that can produce thrust in Z and X axis. FYI @dagar. I tested it on a real platform with the geometry "holonomic hexacopter" and it worked great, but that was not with PX4. Regarding the script, IMO the best would be something similar to uORB: a folder that contains one text file per platform. Each file provides the required information on the platform in human-friendly format: name, number of rotors, position and orientation of rotors, lift and moment coefficients, mass, intertia. Then during compilation the script generates a mix class per platform. That way it becomes super easy to add a new platform geometry. edit: I also tested the notebook in PX4 with a drone with geometry "hexacopter in H shape". I hardcoded the weights generated by the notebook. It worked great and removed the yaw/roll coupling I had with the hexa_x mixer. |
We should consider getting it into PX4 incrementally, with the more approachable folder structure. |
@jlecoeur @dagar @LorenzMeier : Can you please enlist the steps required to add a new airframe in PX4?
Are there any additional steps which I may be missing? |
Hi @vmishra9 as far as I know (others can probably give you more info) the steps are: Right now for step 1 you have to: What is in the notebook is not available yet. If #8063 is accepted, then step 1 will be just: Add geometry file in the folder src/lib/mixer/geom. |
@vmishra9 Try to follow this documentation page and let me know if that answers your question: For step 2, it says to add one config file in |
Separately, #8063 covers only multicopters. It lets you add a multicopter geometry, which you use in the mixer file with the syntax |
@jlecoeur I am interested in the multicopter mixer. All the multicopter mixers I found in ROMFS/px4fmu_common/mixers/ have the same numbers except the geometry tab. ie R: 10000 10000 10000 0 I read the following the description in the link https://dev.px4.io/en/concept/mixing.html#syntax : |
The multirotor mixer (R:) first applies these scaling factors on roll pitch yaw commands, then converts the scaled roll pitch yaw thrust commands to motor commands according to the geometry. |
@jlecoeur That helps. Thanks! |
While working on bringing up a new airframe, I realized that there is absolutely no documentation on how to create a custom mix for a new geometry in the
multi_tables.py
script. https://github.com/PX4/Firmware/blob/master/src/modules/systemlib/mixer/multi_tables.pyI would be happy to document this, but I need someone who has worked on it to atleast give me a basic understanding of what each parameter is, how scaling works, how I can calculate the scaling factors given a model of the vehicle, etc. I would then be able to use my case as an example on the Devguide so that it's clear in the future.
Background
I am working on bringing up this asymmetric airframe, and defining a new geometry with exact measurements and angles from the frame would be nice :

Open questions
A mix for an airframe typically looks like this :
The 3 columns seem to be arm angles, rotation direction and scaling factor.
@SimonWilks @LorenzMeier @anton-matosov @kd0aij
The text was updated successfully, but these errors were encountered: