Aerodynamics - modulabs/gazebo-tutorial GitHub Wiki

Overview

์ด ์žฅ์—์„œ๋Š” ๋ฌผ๋ฆฌ์  ํ˜„์ƒ์ธ lift์™€ drag์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ณ  ์–ด๋–ป๊ฒŒ LiftDragPlugin์— ์ ์šฉ๋˜๋Š”์ง€ ์•Œ์•„๋ณธ๋‹ค.

Physics background

Fluid mechanics

์œ ์ฒด์—ญํ•™์€ ๊ฐ€์Šค๋‚˜ ์•ก์ฒด ์•ˆ์—์„œ์˜ ํž˜์— ๋Œ€ํ•œ ํ•™๋ฌธ์ด๋‹ค. ์œ ์ฒด์—ญํ•™์„ ํ‘ธ๋Š”๊ฒƒ์€ ๋งค์šฐ ๋ณต์žกํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ณ„์‚ฐ์„ ํ†ตํ•œ ์‹œ๋ฎฌ๋ ˆ์ด์…˜์ด ๋ถˆ๊ฐ€ํ”ผํ•˜๋‹ค. ๋•Œ๋ฌธ์— ๊ฐ€์ œ๋ณด์—์„œ๋Š” ๋ฌผ์ฒด์— ์ž‘์šฉํ•˜๋Š” ํž˜์„ ์‹œ๋ฎฌ๋ ˆ์ด์…˜ํ•˜๊ณ  ๋งํฌ์— ์ง์ ‘ ์ ์šฉํ•œ๋‹ค. ํŠนํžˆ lift ์™€ drag force๋Š” ์ˆ˜์ค‘ ๋ฐ ๊ณต๊ธฐ์—ญํ•™์— ์œ ์šฉํ•˜๊ฒŒ ์‚ฌ์šฉ ๋  ์ˆ˜ ์žˆ๋‹ค.

Lift

์–‘๋ ฅ. ์œ ์ฒด์˜ ํ๋ฆ„์— ์ˆ˜์ง์ธ ๋ฐฉํ–ฅ์œผ๋กœ ์ž‘์šฉ

Drag

ํ•ญ๋ ฅ. ๋ฌผ์ฒด์˜ ์›€์ง์ž„์— ๋ฐ˜๋Œ€๋ฐฉํ–ฅ์œผ๋กœ ์ž‘์šฉ.

Angle of attack and alpha slope

AOA ๋˜๋Š” alpha. ๊ธฐ์ค€ ํ‰๋ฉด๊ณผ ์›€์ง์ž„ ๋ฐฉํ–ฅ ์‚ฌ์ด์˜ ๊ฐ. ๊ธฐ์ค€ํ‰๋ฉด์€ ์ฃผ๋กœ ์ค‘๋ ฅ์— ์ˆ˜์ง์ธ ํ‰๋ฉด์ด๋‹ค. ใ…ใ… alpha-lift ๊ณก์„ ์€ ์ฃผ๋กœ ์‹คํ—˜์„ ํ†ตํ•ด ๊ตฌํ•ด์ง„๋‹ค. alpha๊ฐ€ ์ผ์ •๊ฐ’์„ ์ง€๋‚˜๊ฒŒ ๋˜๋ฉด ๋น„๋ก€์ƒ์ˆ˜๋Š” ์˜คํžˆ๋ ค ๊ฐ์†Œํ•˜๊ฒŒ ๋˜๋Š”๋ฐ ์ด ๊ตฌ๊ฐ„์„ stall์ด๋ผ๊ณ  ํ•œ๋‹ค.

Using the LiftDragPlugin

LiftDragPlugin์—์„œ๋Š” smooth curve ๋Œ€์‹ ์— stall ์ „๊ณผ ํ›„๋ฅผ ์ง์„ ์œผ๋กœ ๊ฐ€์ •ํ•œ๋‹ค. ใ…ใ… ์—ฌ๊ธฐ ์˜ˆ์ œ์—์„œ๋Š” camber๊ฐ€ 0์ด ์•„๋‹ˆ๊ธฐ ๋•Œ๋ฌธ์— alpha = 0 ์ผ ๋•Œ์—๋„ ์–‘๋ ฅ์ด ์กด์žฌํ•œ๋‹ค. ๋”ฐ๋ผ์„œ alpha๊ฐ€ 0์ผ๋•Œ ์–‘๋ ฅ๋˜ํ•œ 0์œผ๋กœ ๋งž์ถฐ์ฃผ๊ธฐ ์œ„ํ•ด ๊ทธ๋ž˜ํ”„๋ฅผ ์˜ค๋ฅธ์ชฝ์œผ๋กœ ์ด๋™์‹œ์ผœ์•ผ ํ•œ๋‹ค. ๋”ฐ๋ผ์„œ ์›๋ž˜์˜ alpha_0๋ฅผ 5 degrees๋กœ ์ง€์ •ํ•œ๋‹ค. alpha_stall ์€ 19.2 degrees๊ฐ€ ๋œ๋‹ค.

      <plugin name="lifting_surface" filename="libLiftDragPlugin.so">

        <!-- taken from the lift curve figure -->
        <!-- alpha_0 is 5 degrees -->
        <a0>0.08727</a0>
        <!-- alpha_stall is 19.3 degrees -->
        <alpha_stall>0.3368</alpha_stall>
        <!-- slope of the lift curve to the left of the stall angle -->
        <cla>5.418</cla>
        <!-- slope of the lift curve to the right of the stall angle -->
        <cla_stall>-2.1419</cla_stall>

        <!-- below are just random values in this example -->
        <cda>0.0</cda>
        <cda_stall>0.0</cda_stall>
        <cma>0.0</cma>
        <cma_stall>0.0</cma_stall>
        <area>3</area>
        <fluid_density>1.2041</fluid_density>
        <forward>-1 0 0</forward>
        <upward>0 -1 0</upward>
        <cp>0 0 1</cp>
        <link_name>lifting_surface_link</link_name>
        <radial_symmetry>false</radial_symmetry>
      </plugin>

๋น„ํ–‰์ฒด์˜ ์ขŒํ‘œ๊ณ„๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. aaa

Input parameters

๋‹ค์Œ ํŒŒ๋ผ๋ฏธํ„ฐ๋“ค์€ LiftDragPlugin์—์„œ ์‚ฌ์šฉ๋œ๋‹ค.

  • link_name: Name of the link affected by the group of lift/drag properties.
  • air_density: Density of the fluid this model is suspended in.
  • area: Surface area of the link.
  • a0: The initial "alpha" or initial angle of attack. a0 is also the y-intercept of the alpha-lift coefficient curve.
  • cla: The ratio of the coefficient of lift and alpha slope before stall. Slope of the first portion of the alpha-lift coefficient curve.
  • cda: The ratio of the coefficient of drag and alpha slope before stall.
  • cp: Center of pressure. The forces due to lift and drag will be applied here.
  • forward: 3-vector representing the forward direction of motion in the link frame.
  • upward: 3-vector representing the direction of lift or drag.
  • alpha_stall: Angle of attack at stall point; the peak angle of attack.
  • cla_stall: The ratio of coefficient of lift and alpha slope after stall. Slope of the second portion of the alpha-lift coefficient curve.
  • cda_stall: The ratio of coefficient of drag and alpha slope after stall.
gazebo --verbose worlds/cessna_demo.world

ใ…ใ… ์ด ์›”๋“œํŒŒ์ผ์€ Cessna C-172๊ธฐ์˜ ๋ชจ๋ธ๊ณผ ์„ธ๊ฐœ์˜ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํฌํ•จํ•œ๋‹ค. types:

  • CessnaPlugin: ์ด ๋ชจ๋ธ ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ์ถ”๋ ฅ๊ณผ ์กฐ์ข…์ต์„ ์ œ์–ดํ•˜๊ธฐ ์œ„ํ•ด ~/cessna_c172/control ํ† ํ”ฝ์„ ๊ฐ€์ œ๋ณด ๋ฉ”์‹œ์ง€๋ฅผ ํ†ตํ•ด ๋…ธ์ถœ์‹œํ‚จ๋‹ค. ๋˜ํ•œ ๋ชจ๋ธ์˜ ์ƒํƒœ๋ฅผ~/cessna_c172/stateํ† ํ”ฝ์„ ํ†ตํ•ด publish ํ•œ๋‹ค. ํ”Œ๋Ÿฌ๊ทธ์ธ์— ๋Œ€ํ•œ ๋” ์ž์„ธํ•œ ์ •๋ณด์™€ ํ•„์š” ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์•Œ๊ณ ์‹ถ์œผ๋ฉด ํ—ค๋”ํŒŒ์ผ์„ ์ฝ์œผ๋ฉด ๋œ๋‹ค.๋‹ค์Œ์€ cessna_demo.world์— ํฌํ•จ๋œ ํ”Œ๋Ÿฌ๊ทธ์ธ ์ฝ”๋“œ์ด๋‹ค.

    <!-- A plugin for controlling the thrust and control surfaces -->
    <plugin name="cessna_control" filename="libCessnaPlugin.so">
      <propeller>cessna_c172::propeller_joint</propeller>
      <propeller_max_rpm>2500</propeller_max_rpm>
      <left_aileron>cessna_c172::left_aileron_joint</left_aileron>
      <left_flap>cessna_c172::left_flap_joint</left_flap>
      <right_aileron>cessna_c172::right_aileron_joint</right_aileron>
      <right_flap>cessna_c172::right_flap_joint</right_flap>
      <elevators>cessna_c172::elevators_joint</elevators>
      <rudder>cessna_c172::rudder_joint</rudder>
    </plugin>
    
  • CessnaGUIPlugin: ์ด GUI ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ์ถ”๋ ฅ์˜ ํฌ๊ธฐ์™€ ์กฐ์ข…์ต์˜ ๊ฐ๋„๋ฅผ ์ˆ˜์ •ํ•˜๊ธฐ ์œ„ํ•ด Cessna message๋ฅผ ๋ฐœํ–‰ํ•œ๋‹ค. ๋‹ค์Œ์€ ์ปจํŠธ๋กค ํ‚ค์ด๋‹ค.

  w         Increase thrust (+10 %)
  s         Decrease thrust (-10 %)
  d         Increase rudder angle (+1 degree)
  a         Decrease rudder angle (-1 degree)
  Left-Key  Left roll (+1 degree)
  Right-Key Right roll (+1 degree)
  Up-Key    Pitch down (+1 degree)
  Down-Key  Pitch up (+1 degree)
  1         Preset for take-off
  2         Preset for cruise
  3         Preset for landing
  • LiftDragPlugin: ์ด ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ์–‘๋ ฅ๊ณผ ํ•ญ๋ ฅ์„ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ๋œ๋‹ค. ํ”„๋กœํŽ ๋Ÿฌ๋Š” ๊ฐ์†๋„์— ๋น„๋ก€ํ•˜์—ฌ ์ถ”๋ ฅ์„ ์ƒ์„ฑํ•œ๋‹ค. ์กฐ์ข…์ต์€ ๊ฐ๋„์™€ ์†๋ ฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅธ ํž˜์„ ๋งŒ๋“ค์–ด ๋‚ธ๋‹ค. LiftDragPlugin aerodynamic parameters๋Š” jsbsim for Cessna 172P์˜ ๊ฐ’์„ ๊ทผ์‚ฌํ•˜์—ฌ ์‚ฌ์šฉ๋œ๋‹ค.

์ƒˆ ํ„ฐ๋ฏธ๋„์„ ์‹คํ–‰์‹œํ‚ค๊ณ  ์•„๋ž˜ ๋ช…๋ น์„ ์ž…๋ ฅํ•˜๋ฉด Cessna์˜ ์ƒํƒœ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

gz topic -e /gazebo/default/cessna_c172/state
โš ๏ธ **GitHub.com Fallback** โš ๏ธ