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

Add influence of wind to rotor drag #461

Merged
merged 1 commit into from Apr 22, 2020
Merged

Add influence of wind to rotor drag #461

merged 1 commit into from Apr 22, 2020

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Apr 18, 2020

This PR adds the influence of the wind to the motor model, by considering wind as part of the calculation of rotor drag. This is important since the majority of the drag is usually generated from the rotors in case of multirotors, and is influenced by wind. Thrust variations are not considered.

Also, @MaEtUgR have brought up examples where some issues only appear under the influence of wind. This PR would make it easier to see wind influence of multirotor models.

Testing
Below shows the model taking off and being influenced under the wind of 5m/s

ezgif com-video-to-gif(7)

Additional Context
This is a follow up PR of #375 , which added wind influence to the lift drag model

@Jaeyoung-Lim Jaeyoung-Lim changed the title Add influence of wind to motor model Add influence of wind to rotor drag Apr 18, 2020
@LorenzMeier
Copy link
Member

@MaEtUgR Could you please review and approve? We need to get faster in closing things out.

@MaEtUgR
Copy link
Member

MaEtUgR commented Apr 21, 2020

@LorenzMeier I really try to follow up as quickly as possible but I was out for the last 3 days over the weekend and my day off and looking into it now.

@MaEtUgR
Copy link
Member

MaEtUgR commented Apr 21, 2020

It flies somehow strange compared to the pure force wind against the base_link. I have to do some more testing tomorrow.

@MaEtUgR
Copy link
Member

MaEtUgR commented Apr 22, 2020

I did some more testing and it's a matter of magnitude of the disturbance. I think applying the wind velocity like this is correct and the "strange" flying occurs e.g. at 5m/s because the wind is definitely to strong for the actuation of the simulated drone. Especially the yaw authority is very weak and if the drone hits one or multiple motor output thrust limits the results can look quite wonky because there's no more margin to actuate with but it doesn't crash. A wind speed of ~3.5m/s allows for a bit of margin in terms of navigation without getting too far off the navigation goals and 1.5m/s wind is more of a full yaw authority during hover scenario:
image
The wind simulation definitely helps to test disturbance rejection and most importantly also corner case handling like when running into the limits.

I was testing with make px4_sitl gazebo_if750a and this snippet added to the if750a.sdf:

<plugin name='wind_plugin' filename='libgazebo_wind_plugin.so'>
      <frameId>base_link</frameId>
      <linkName>base_link</linkName>
      <robotNamespace/>
      <xyzOffset>0 0 0</xyzOffset>
      <windDirection>0 1 0</windDirection>
      <windVelocityMean>1.5</windVelocityMean>
      <windGustDirection>0 0 0</windGustDirection>
      <windGustDuration>0</windGustDuration>
      <windGustStart>0</windGustStart>
      <windGustForceMean>0</windGustForceMean>
    </plugin>

It would be really awsome if the Wind linear_velocity parameter that is already exposed in the UI could change the wind dynamically because then the sdf would not need to be edited and it would allow testing step disturbance reactions in certain scenarios mid flight.

Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

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

Thank you @Jaeyoung-Lim! That really helps to find corner cases 👍

@Jaeyoung-Lim
Copy link
Member Author

Thanks, @MaEtUgR !

@Jaeyoung-Lim Jaeyoung-Lim merged commit 8f0230b into master Apr 22, 2020
@Jaeyoung-Lim Jaeyoung-Lim deleted the pr-wind-world branch April 22, 2020 09:30
RyosukeMatsushima pushed a commit to RyosukeMatsushima/PX4-SITL_gazebo that referenced this pull request Jun 21, 2022
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.

None yet

3 participants