Skip to content
Jinho-So edited this page Mar 7, 2018 · 5 revisions

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

새 터미널을 실행시키고 아래 명령을 입력하면 Cessna의 상태를 볼 수 있다.

gz topic -e /gazebo/default/cessna_c172/state

Table of Contents




Clone this wiki locally