Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
gazebo::GazeboMotorModel Class Reference

#include <gazebo_motor_model.h>

Inheritance diagram for gazebo::GazeboMotorModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GazeboMotorModel ()
virtual void InitializeParams ()
virtual void Publish ()
virtual ~GazeboMotorModel ()

Protected Member Functions

virtual void Load (physics::ModelPtr _model, sdf::ElementPtr _sdf)
virtual void OnUpdate (const common::UpdateInfo &)
virtual void UpdateForcesAndMoments ()

Private Member Functions

void ControlCommandCallback (GzCommandMotorInputMsgPtr &command_motor_input_msg)
void CreatePubsAndSubs ()
 Creates all required publishers and subscribers, incl. routing of messages to/from ROS if required.
double NormalizeAngle (double input)
 Ensures any input angle is element of [0..2pi)
void QueueThread ()
void WindSpeedCallback (GzWindSpeedMsgPtr &wind_speed_msg)

Private Attributes

boost::thread callback_queue_thread_
gazebo::transport::SubscriberPtr command_sub_
std::string command_sub_topic_
gz_std_msgs::Float32 force_msg_
physics::JointPtr joint_
std::string joint_name_
physics::LinkPtr link_
std::string link_name_
double max_force_
double max_rot_velocity_
physics::ModelPtr model_
double moment_constant_
double motor_constant_
gazebo::transport::PublisherPtr motor_force_pub_
std::string motor_force_pub_topic_
int motor_number_
gazebo::transport::PublisherPtr motor_position_pub_
std::string motor_position_pub_topic_
std::string motor_speed_pub_topic_
MotorType motor_type_
gazebo::transport::PublisherPtr motor_velocity_pub_
std::string namespace_
gazebo::transport::NodePtr node_handle_
common::PID pids_
gz_std_msgs::Float32 position_msg_
bool publish_force_
bool publish_position_
bool publish_speed_
bool pubs_and_subs_created_
 Flag that is set to true once CreatePubsAndSubs() is called, used to prevent CreatePubsAndSubs() from be called on every OnUpdate().
double ref_motor_input_
double rolling_moment_coefficient_
double rotor_drag_coefficient_
double rotor_velocity_slowdown_sim_
double time_constant_down_
double time_constant_up_
int turning_direction_
gz_std_msgs::Float32 turning_velocity_msg_
event::ConnectionPtr updateConnection_
 Pointer to the update event connection.
gazebo::transport::SubscriberPtr wind_speed_sub_
std::string wind_speed_sub_topic_

Detailed Description

Definition at line 72 of file gazebo_motor_model.h.


Constructor & Destructor Documentation

Definition at line 75 of file gazebo_motor_model.h.

Definition at line 29 of file gazebo_motor_model.cpp.


Member Function Documentation

void gazebo::GazeboMotorModel::ControlCommandCallback ( GzCommandMotorInputMsgPtr &  command_motor_input_msg) [private]

Definition at line 332 of file gazebo_motor_model.cpp.

Creates all required publishers and subscribers, incl. routing of messages to/from ROS if required.

Call this once the first time OnUpdate() is called (can't be called from Load() because there is no guarantee GazeboRosInterfacePlugin has has loaded and listening to ConnectGazeboToRosTopic and ConnectRosToGazeboTopic messages).

TODO(gbmhunter): Do we need this? There is a separate Gazebo wind plugin.

Definition at line 228 of file gazebo_motor_model.cpp.

Implements MotorModel.

Definition at line 32 of file gazebo_motor_model.cpp.

void gazebo::GazeboMotorModel::Load ( physics::ModelPtr  _model,
sdf::ElementPtr  _sdf 
) [protected, virtual]

Definition at line 49 of file gazebo_motor_model.cpp.

double gazebo::GazeboMotorModel::NormalizeAngle ( double  input) [private]

Ensures any input angle is element of [0..2pi)

Definition at line 371 of file gazebo_motor_model.cpp.

void gazebo::GazeboMotorModel::OnUpdate ( const common::UpdateInfo &  _info) [protected, virtual]

Definition at line 212 of file gazebo_motor_model.cpp.

Implements MotorModel.

Definition at line 34 of file gazebo_motor_model.cpp.

void gazebo::GazeboMotorModel::UpdateForcesAndMoments ( ) [protected, virtual]

Implements MotorModel.

Definition at line 390 of file gazebo_motor_model.cpp.

void gazebo::GazeboMotorModel::WindSpeedCallback ( GzWindSpeedMsgPtr &  wind_speed_msg) [private]

Definition at line 359 of file gazebo_motor_model.cpp.


Member Data Documentation

Definition at line 176 of file gazebo_motor_model.h.

gazebo::transport::SubscriberPtr gazebo::GazeboMotorModel::command_sub_ [private]

Definition at line 165 of file gazebo_motor_model.h.

Definition at line 127 of file gazebo_motor_model.h.

gz_std_msgs::Float32 gazebo::GazeboMotorModel::force_msg_ [private]

Definition at line 182 of file gazebo_motor_model.h.

physics::JointPtr gazebo::GazeboMotorModel::joint_ [private]

Definition at line 170 of file gazebo_motor_model.h.

Definition at line 129 of file gazebo_motor_model.h.

physics::LinkPtr gazebo::GazeboMotorModel::link_ [private]

Definition at line 171 of file gazebo_motor_model.h.

Definition at line 130 of file gazebo_motor_model.h.

Definition at line 144 of file gazebo_motor_model.h.

Definition at line 145 of file gazebo_motor_model.h.

physics::ModelPtr gazebo::GazeboMotorModel::model_ [private]

Definition at line 169 of file gazebo_motor_model.h.

Definition at line 146 of file gazebo_motor_model.h.

Definition at line 147 of file gazebo_motor_model.h.

gazebo::transport::PublisherPtr gazebo::GazeboMotorModel::motor_force_pub_ [private]

Definition at line 163 of file gazebo_motor_model.h.

Definition at line 133 of file gazebo_motor_model.h.

Definition at line 140 of file gazebo_motor_model.h.

gazebo::transport::PublisherPtr gazebo::GazeboMotorModel::motor_position_pub_ [private]

Definition at line 161 of file gazebo_motor_model.h.

Definition at line 132 of file gazebo_motor_model.h.

Definition at line 131 of file gazebo_motor_model.h.

Definition at line 142 of file gazebo_motor_model.h.

gazebo::transport::PublisherPtr gazebo::GazeboMotorModel::motor_velocity_pub_ [private]

Definition at line 159 of file gazebo_motor_model.h.

Definition at line 134 of file gazebo_motor_model.h.

gazebo::transport::NodePtr gazebo::GazeboMotorModel::node_handle_ [private]

Definition at line 157 of file gazebo_motor_model.h.

common::PID gazebo::GazeboMotorModel::pids_ [private]

Definition at line 155 of file gazebo_motor_model.h.

gz_std_msgs::Float32 gazebo::GazeboMotorModel::position_msg_ [private]

Definition at line 181 of file gazebo_motor_model.h.

Definition at line 138 of file gazebo_motor_model.h.

Definition at line 137 of file gazebo_motor_model.h.

Definition at line 136 of file gazebo_motor_model.h.

Flag that is set to true once CreatePubsAndSubs() is called, used to prevent CreatePubsAndSubs() from be called on every OnUpdate().

Definition at line 116 of file gazebo_motor_model.h.

Definition at line 148 of file gazebo_motor_model.h.

Definition at line 149 of file gazebo_motor_model.h.

Definition at line 150 of file gazebo_motor_model.h.

Definition at line 151 of file gazebo_motor_model.h.

Definition at line 152 of file gazebo_motor_model.h.

Definition at line 153 of file gazebo_motor_model.h.

Definition at line 141 of file gazebo_motor_model.h.

gz_std_msgs::Float32 gazebo::GazeboMotorModel::turning_velocity_msg_ [private]

Definition at line 180 of file gazebo_motor_model.h.

Pointer to the update event connection.

Definition at line 174 of file gazebo_motor_model.h.

gazebo::transport::SubscriberPtr gazebo::GazeboMotorModel::wind_speed_sub_ [private]

Definition at line 167 of file gazebo_motor_model.h.

Definition at line 128 of file gazebo_motor_model.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