Public Member Functions | Private Member Functions | Private Attributes
gazebo::GimbalControllerPlugin Class Reference

#include <gazebo_gimbal_controller_plugin.h>

List of all members.

Public Member Functions

 GimbalControllerPlugin ()
 Constructor.
virtual void Init ()
virtual void Load (physics::ModelPtr _model, sdf::ElementPtr _sdf)

Private Member Functions

double NormalizeAbout (double _angle, double _reference)
 returns _angle1 normalized about (_reference - M_PI, _reference + M_PI]
void OnPitchStringMsg (ConstAnyPtr &_msg)
void OnRollStringMsg (ConstAnyPtr &_msg)
void OnUpdate ()
void OnYawStringMsg (ConstAnyPtr &_msg)
ignition::ignition::math::Vector3d QtoZXY (const ignition::math::Quaterniond &_q)
double ShortestAngularDistance (double _from, double _to)
 returns shortest angular distance from _from to _to
ignition::ignition::math::Vector3d ThreeAxisRot (double r11, double r12, double r21, double r31, double r32)

Private Attributes

std::vector< event::ConnectionPtrconnections
sensors::ImuSensorPtr imuSensor
common::Time lastUpdateTime
physics::ModelPtr model
transport::NodePtr node
double pitchCommand
physics::JointPtr pitchJoint
 camera pitch joint
common::PID pitchPid
transport::PublisherPtr pitchPub
transport::SubscriberPtr pitchSub
double rollCommand
physics::JointPtr rollJoint
 camera roll joint
common::PID rollPid
transport::PublisherPtr rollPub
transport::SubscriberPtr rollSub
sdf::ElementPtr sdf
std::string status
double yawCommand
physics::JointPtr yawJoint
 yaw camera
common::PID yawPid
transport::PublisherPtr yawPub
transport::SubscriberPtr yawSub

Detailed Description

Definition at line 36 of file gazebo_gimbal_controller_plugin.h.


Constructor & Destructor Documentation

Constructor.

TODO: make these gains part of sdf xml

Definition at line 28 of file gazebo_gimbal_controller_plugin.cpp.


Member Function Documentation

void GimbalControllerPlugin::Init ( ) [virtual]

Definition at line 138 of file gazebo_gimbal_controller_plugin.cpp.

void GimbalControllerPlugin::Load ( physics::ModelPtr  _model,
sdf::ElementPtr  _sdf 
) [virtual]

Definition at line 41 of file gazebo_gimbal_controller_plugin.cpp.

double GimbalControllerPlugin::NormalizeAbout ( double  _angle,
double  _reference 
) [private]

returns _angle1 normalized about (_reference - M_PI, _reference + M_PI]

something to move into Angle class

Parameters:
[in]_angle1input angle
[in]_referencereference input angle for normalization
Returns:
normalized _angle1 about _reference

Definition at line 387 of file gazebo_gimbal_controller_plugin.cpp.

void GimbalControllerPlugin::OnPitchStringMsg ( ConstAnyPtr &  _msg) [private]

Definition at line 185 of file gazebo_gimbal_controller_plugin.cpp.

void GimbalControllerPlugin::OnRollStringMsg ( ConstAnyPtr &  _msg) [private]

Definition at line 192 of file gazebo_gimbal_controller_plugin.cpp.

Get current joint angles (in sensor frame):

currentAngleYPRVariable is defined in roll-pitch-yaw-fixed-axis and gimbal is constructed using yaw-roll-pitch-variable-axis

get joint limits (in sensor frame) TODO: move to Load() if limits do not change

Definition at line 232 of file gazebo_gimbal_controller_plugin.cpp.

void GimbalControllerPlugin::OnYawStringMsg ( ConstAnyPtr &  _msg) [private]

Definition at line 199 of file gazebo_gimbal_controller_plugin.cpp.

ignition::ignition::math::Vector3d GimbalControllerPlugin::QtoZXY ( const ignition::math::Quaterniond &  _q) [private]

Definition at line 216 of file gazebo_gimbal_controller_plugin.cpp.

double GimbalControllerPlugin::ShortestAngularDistance ( double  _from,
double  _to 
) [private]

returns shortest angular distance from _from to _to

something to move into Angle class

Parameters:
[in]_fromstarting anglular position
[in]_toend angular position
Returns:
distance traveled from starting to end angular positions

Definition at line 403 of file gazebo_gimbal_controller_plugin.cpp.

ignition::ignition::math::Vector3d GimbalControllerPlugin::ThreeAxisRot ( double  r11,
double  r12,
double  r21,
double  r31,
double  r32 
) [private]

Definition at line 206 of file gazebo_gimbal_controller_plugin.cpp.


Member Data Documentation

Definition at line 68 of file gazebo_gimbal_controller_plugin.h.

sensors::ImuSensorPtr gazebo::GimbalControllerPlugin::imuSensor [private]

Definition at line 89 of file gazebo_gimbal_controller_plugin.h.

Definition at line 102 of file gazebo_gimbal_controller_plugin.h.

physics::ModelPtr gazebo::GimbalControllerPlugin::model [private]

Definition at line 78 of file gazebo_gimbal_controller_plugin.h.

transport::NodePtr gazebo::GimbalControllerPlugin::node [private]

Definition at line 97 of file gazebo_gimbal_controller_plugin.h.

Definition at line 93 of file gazebo_gimbal_controller_plugin.h.

physics::JointPtr gazebo::GimbalControllerPlugin::pitchJoint [private]

camera pitch joint

Definition at line 87 of file gazebo_gimbal_controller_plugin.h.

Definition at line 99 of file gazebo_gimbal_controller_plugin.h.

transport::PublisherPtr gazebo::GimbalControllerPlugin::pitchPub [private]

Definition at line 74 of file gazebo_gimbal_controller_plugin.h.

transport::SubscriberPtr gazebo::GimbalControllerPlugin::pitchSub [private]

Definition at line 70 of file gazebo_gimbal_controller_plugin.h.

Definition at line 95 of file gazebo_gimbal_controller_plugin.h.

physics::JointPtr gazebo::GimbalControllerPlugin::rollJoint [private]

camera roll joint

Definition at line 84 of file gazebo_gimbal_controller_plugin.h.

Definition at line 100 of file gazebo_gimbal_controller_plugin.h.

transport::PublisherPtr gazebo::GimbalControllerPlugin::rollPub [private]

Definition at line 75 of file gazebo_gimbal_controller_plugin.h.

transport::SubscriberPtr gazebo::GimbalControllerPlugin::rollSub [private]

Definition at line 71 of file gazebo_gimbal_controller_plugin.h.

sdf::ElementPtr gazebo::GimbalControllerPlugin::sdf [private]

Definition at line 66 of file gazebo_gimbal_controller_plugin.h.

Definition at line 91 of file gazebo_gimbal_controller_plugin.h.

Definition at line 94 of file gazebo_gimbal_controller_plugin.h.

physics::JointPtr gazebo::GimbalControllerPlugin::yawJoint [private]

yaw camera

Definition at line 81 of file gazebo_gimbal_controller_plugin.h.

Definition at line 101 of file gazebo_gimbal_controller_plugin.h.

transport::PublisherPtr gazebo::GimbalControllerPlugin::yawPub [private]

Definition at line 76 of file gazebo_gimbal_controller_plugin.h.

transport::SubscriberPtr gazebo::GimbalControllerPlugin::yawSub [private]

Definition at line 72 of file gazebo_gimbal_controller_plugin.h.


The documentation for this class was generated from the following files:


rotors_gazebo_plugins
Author(s): Fadri Furrer, Michael Burri, Mina Kamel, Janosch Nikolic, Markus Achtelik
autogenerated on Thu Apr 18 2019 02:43:43