##

LiftDragPlugin.hh
Go to the documentation of this file.
/*
* Copyright (C) 2014 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_PLUGINS_LIFTDRAGPLUGIN_HH_
#define GAZEBO_PLUGINS_LIFTDRAGPLUGIN_HH_
#include <string>
#include <vector>
#include <ignition/math/Vector3.hh>
#include "gazebo/common/Plugin.hh"
#include "gazebo/physics/physics.hh"
#include "gazebo/transport/TransportTypes.hh"
namespace gazebo
{
class GAZEBO_VISIBLE LiftDragPlugin : public ModelPlugin
{
public: LiftDragPlugin();
public: ~LiftDragPlugin();
// Documentation Inherited.
public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
protected: virtual void OnUpdate();
protected: event::ConnectionPtr updateConnection;
protected: physics::WorldPtr world;
protected: physics::PhysicsEnginePtr physics;
protected: physics::ModelPtr model;
protected: double cla;
protected: double cda;
protected: double cma;
protected: double alphaStall;
protected: double claStall;
protected: double cdaStall;
protected: double cmaStall;
protected: double velocityStall;
protected: double rho;
protected: bool radialSymmetry;
protected: double area;
protected: double sweep;
protected: double alpha0;
protected: double alpha;
protected: ignition::math::Vector3d cp;
protected: ignition::math::Vector3d forward;
protected: ignition::math::Vector3d upward;
protected: ignition::math::Vector3d velSmooth;
protected: physics::LinkPtr link;
protected: physics::JointPtr controlJoint;
protected: double controlJointRadToCL;
protected: sdf::ElementPtr sdf;
};
}
#endif
gazebo::LiftDragPlugin::alpha0
double alpha0
initial angle of attack
Definition: LiftDragPlugin.hh:106
gazebo::LiftDragPlugin::cp
ignition::math::Vector3d cp
center of pressure in link local coordinates
Definition: LiftDragPlugin.hh:112
gazebo::LiftDragPlugin::model
physics::ModelPtr model
Pointer to model containing plugin.
Definition: LiftDragPlugin.hh:56
gazebo::LiftDragPlugin::sweep
double sweep
angle of sweep
Definition: LiftDragPlugin.hh:103
gazebo::LiftDragPlugin::alpha
double alpha
angle of attack
Definition: LiftDragPlugin.hh:109
gazebo::LiftDragPlugin::alphaStall
double alphaStall
angle of attach when airfoil stalls
Definition: LiftDragPlugin.hh:74
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::LiftDragPlugin::cma
double cma
Coefficient of Moment / alpha slope.
Definition: LiftDragPlugin.hh:71
gazebo::physics::ModelPtr
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
gazebo::LiftDragPlugin::sdf
sdf::ElementPtr sdf
SDF for this plugin;.
Definition: LiftDragPlugin.hh:138
gazebo::LiftDragPlugin::velocityStall
double velocityStall
: \TODO: make a stall velocity curve
Definition: LiftDragPlugin.hh:86
gazebo::LiftDragPlugin::claStall
double claStall
Cl-alpha rate after stall.
Definition: LiftDragPlugin.hh:77
TransportTypes.hh
Forward declarations for transport.
gazebo::LiftDragPlugin::updateConnection
event::ConnectionPtr updateConnection
Connection to World Update events.
Definition: LiftDragPlugin.hh:47
gazebo::LiftDragPlugin::world
physics::WorldPtr world
Pointer to world.
Definition: LiftDragPlugin.hh:50
gazebo::LiftDragPlugin::rho
double rho
air density at 25 deg C it's about 1.1839 kg/m^3 At 20 °C and 101.325 kPa, dry air has a density of 1...
Definition: LiftDragPlugin.hh:91
gazebo::LiftDragPlugin::cdaStall
double cdaStall
Cd-alpha rate after stall.
Definition: LiftDragPlugin.hh:80
gazebo::LiftDragPlugin
A plugin that simulates lift and drag.
Definition: LiftDragPlugin.hh:32
gazebo::LiftDragPlugin::forward
ignition::math::Vector3d forward
Normally, this is taken as a direction parallel to the chord of the airfoil in zero angle of attack f...
Definition: LiftDragPlugin.hh:116
gazebo::LiftDragPlugin::area
double area
effective planeform surface area
Definition: LiftDragPlugin.hh:100
gazebo::LiftDragPlugin::controlJointRadToCL
double controlJointRadToCL
how much to change CL per radian of control surface joint value.
Definition: LiftDragPlugin.hh:135
gazebo::LiftDragPlugin::controlJoint
physics::JointPtr controlJoint
Pointer to a joint that actuates a control surface for this lifting body.
Definition: LiftDragPlugin.hh:131
gazebo::event::ConnectionPtr
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
gazebo::physics::LinkPtr
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
gazebo::LiftDragPlugin::cmaStall
double cmaStall
Cm-alpha rate after stall.
Definition: LiftDragPlugin.hh:83
gazebo::physics::JointPtr
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:117
gazebo::physics::PhysicsEnginePtr
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:125
gazebo::LiftDragPlugin::link
physics::LinkPtr link
Pointer to link currently targeted by mud joint.
Definition: LiftDragPlugin.hh:127
gazebo::LiftDragPlugin::cla
double cla
Coefficient of Lift / alpha slope.
Definition: LiftDragPlugin.hh:61
gazebo::LiftDragPlugin::radialSymmetry
bool radialSymmetry
if the shape is aerodynamically radially symmetric about the forward direction.
Definition: LiftDragPlugin.hh:97
gazebo::physics::WorldPtr
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:89
gazebo::ModelPlugin
A plugin with access to physics::Model.
Definition: Plugin.hh:303
Plugin.hh
gazebo::LiftDragPlugin::upward
ignition::math::Vector3d upward
A vector in the lift/drag plane, perpendicular to the forward vector.
Definition: LiftDragPlugin.hh:121
gazebo::LiftDragPlugin::physics
physics::PhysicsEnginePtr physics
Pointer to physics engine.
Definition: LiftDragPlugin.hh:53
gazebo::LiftDragPlugin::cda
double cda
Coefficient of Drag / alpha slope.
Definition: LiftDragPlugin.hh:66
gazebo::LiftDragPlugin::velSmooth
ignition::math::Vector3d velSmooth
Smoothed velocity.
Definition: LiftDragPlugin.hh:124
GAZEBO_VISIBLE
#define GAZEBO_VISIBLE
Definition: system.hh:59