Comments (14)
@manumerous https://github.com/PX4/PX4-SITL_gazebo/blob/05e2cd9c03ffa77f0c0d5bd3e788d33e06480b25/src/gazebo_motor_model.cpp#L278
where the reference is set from https://github.com/PX4/PX4-SITL_gazebo/blob/05e2cd9c03ffa77f0c0d5bd3e788d33e06480b25/src/gazebo_motor_model.cpp#L188
from data-driven-dynamics.
Okay thanks, so the first link just seems to set the link to the computed down-scaled velocity to retrieve it in the next function call.
The second link I am not to sure. I find this a bit confusing. Is it just taking the minimum between the current rotor velocity and the max rotor velocity?
I guess the real magic is happening in this updateFilter here. However I could not find where this FirstOrderFilter object used to generate the pointer in the header file is defined.
from data-driven-dynamics.
@manumerous The second link is storing the command values from PX4. This comes from https://github.com/PX4/PX4-SITL_gazebo/blob/05e2cd9c03ffa77f0c0d5bd3e788d33e06480b25/src/gazebo_mavlink_interface.cpp#L452
I guess the real magic is happening in this updateFilter here. However I could not find where this FirstOrderFilter object used to generate the pointer in the header file is defined.
It doesn't matter - it is just smoothing the commands out incase there are jumps to simulate the PID controller of the ESCs. It is defined here: https://github.com/PX4/PX4-SITL_gazebo/blob/97c167d17564a34d1f0985409b153c91de3cca45/include/common.h#L122
If you are using vscode, you can search the repo with ctrl+shift+f
to find if certain methods are defined
from data-driven-dynamics.
Thank you for your answer. Good to know that the filter is really just a filter. sorry for the confusion.
So could it be that ref_motor_rot_vel_ denotes directly the actuator output between 0 and 1 instead of the angular velocity?
from data-driven-dynamics.
Not necessarily, There are scalings that are done in the plugin.(defined in the sdf)
If you are curious, you can print out the values while running the sim
from data-driven-dynamics.
Thanks, that is good to know. I always thought it was angular velocity.
from data-driven-dynamics.
@manumerous It kind of is right? just not [0, 1] or [min_pwm, max_pwm]
from data-driven-dynamics.
Yes up to a scale factor. Interesting that they do not use an offset and linear therm.
As real brushless dc + esc combination usually do not turn until a ceretain pwm value but then immediatly start at around 200 rpm and not at 0.
from data-driven-dynamics.
@manumerous That is simulated on the firnware side. If you are disarmed it is just sending 0
from data-driven-dynamics.
Okay, I guess they omit that effect then. Because it actually happens independently of whether the aircraft is armed or not. This can be seen by just using motors and ESCs without px4.
I guess people just dont care because the motors are usually used at much higher pwm values. I therefore now compared the values around 0.5 input.
But I think my model for the vertical rotors somehow produces no meaningful results. The one for the forward rotor seems much better here.
If I calculated the gazebo force correctly, the forward rotor should produce around 65N while my model produced around 60 N. So that seems close enough.
I will investigate why the vertical forces do not work that well.
from data-driven-dynamics.
@manumerous Right, but it doesnt happen if you have your ESCs calibrated no? These are all simulation specific, so things that doesnt need to be tested are likely missing
from data-driven-dynamics.
No it has nothing to do with ESC calibration according to my understanding. Most ESCs control the bushless DC motors by estimating the rotors position using the third motor phase, which is not powered at the moment, to measure zero crossing of the back-emf (voltage induced by the permanent magnets on rotors). This is then used to time the voltage switches of the three phases. For this a sufficiently large angular velocity is needed to get a good signal to noise ratio.
But anyways, this is usually much lower than the normal operation point of the motor and i think it is therefore mostly irrelevant.
from data-driven-dynamics.
I would guess that the difference looks something like this if the ESC is well calibrated.
from data-driven-dynamics.
@manumerous Ahah, now I see what you mean. So we need a min thrust check https://github.com/PX4/PX4-SITL_gazebo/blob/05e2cd9c03ffa77f0c0d5bd3e788d33e06480b25/src/gazebo_motor_model.cpp#L204
AFAIK, this is something also not considered in your rotor model though, right?
from data-driven-dynamics.
Related Issues (20)
- Adapt QP Optimizer for unconstraint parameters HOT 3
- Generate real flight log data with lissajous trajectories HOT 1
- Plots appear broken HOT 2
- QP Estimator results in infeasible primal
- Pipeline Validation: Estimating parameters of custom gazebo model HOT 2
- RotorModel fails to calculate relevant features if position and axis vector are collinear HOT 5
- Evaluation with identified model HOT 10
- [FeatureRequest] Non-dynamic parameter estimation HOT 2
- Compute features before dataselection HOT 4
- Failure on using quadrotor model with plot enabled
- Pipeline fails with data selection HOT 1
- Online Sys ID HOT 6
- Pipeline fails with default models HOT 2
- Plotting broken(again)
- Moment prediction doesn't seem to be correct with QP HOT 2
- Multi instance topic logs break the pipeline
- Simulation and testing problem (inconsistent behavior) HOT 27
- Unified formatter for python code HOT 3
- Model estimation broken for upstream PX4 HOT 6
- ID data gathering FW/VTOL HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-driven-dynamics.