Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
gazebo::GazeboMavlinkInterface Class Reference

#include <gazebo_mavlink_interface.h>

List of all members.

Public Member Functions

 elevator_joint_ (nullptr)
 GazeboMavlinkInterface ()
 gimbal_pitch_joint_ (nullptr)
 gimbal_roll_joint_ (nullptr)
 gimbal_yaw_joint_ (nullptr)
 lat_rad_ (0.0)
 left_elevon_joint_ (nullptr)
 lon_rad_ (0.0)
 mavlink_udp_port_ (kDefaultMavlinkUdpPort)
 propeller_joint_ (nullptr)
void Publish ()
 right_elevon_joint_ (nullptr)
 world_ (nullptr)
 ~GazeboMavlinkInterface ()

Protected Member Functions

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

Private Member Functions

void handle_control (double _dt)
void handle_message (mavlink_message_t *msg)
void ImuCallback (ImuPtr &imu_msg)
void LidarCallback (LidarPtr &lidar_msg)
void OpticalFlowCallback (OpticalFlowPtr &opticalFlow_msg)
void pollForMAVLinkMessages (double _dt, uint32_t _timeoutMs)
void QueueThread ()
void send_mavlink_message (const uint8_t msgid, const void *msg, uint8_t component_ID)

Private Attributes

socklen_t addrlen_
unsigned char buf_ [65535]
boost::thread callback_queue_thread_
physics::JointPtr elevator_joint_
common::PID elevator_pid_
int fd_
struct pollfd fds_ [1]
physics::JointPtr gimbal_pitch_joint_
physics::JointPtr gimbal_roll_joint_
physics::JointPtr gimbal_yaw_joint_
transport::PublisherPtr gps_pub_
double gps_update_interval_
ignition::math::Vector3d gravity_W_
std::string gztopic_ [kNOutMax]
transport::SubscriberPtr imu_sub_
std::string imu_sub_topic_
int input_index_ [kNOutMax]
double input_offset_ [kNOutMax]
Eigen::VectorXd input_reference_
double input_scaling_ [kNOutMax]
transport::PublisherPtr joint_control_pub_ [kNOutMax]
std::string joint_control_type_ [kNOutMax]
std::vector< physics::JointPtr > joints_
common::Time last_actuator_time_
common::Time last_gps_time_
common::Time last_time_
double lat_rad_
physics::JointPtr left_elevon_joint_
common::PID left_elevon_pid_
transport::SubscriberPtr lidar_sub_
std::string lidar_sub_topic_
std::string link_name_
double lon_rad_
ignition::math::Vector3d mag_d_
transport::SubscriberPtr mav_control_sub_
in_addr_t mavlink_addr_
std::string mavlink_control_sub_topic_
int mavlink_udp_port_
physics::ModelPtr model_
transport::PublisherPtr motor_velocity_reference_pub_
std::string motor_velocity_reference_pub_topic_
struct sockaddr_in myaddr_
 The locally bound address.
std::string namespace_
transport::NodePtr node_handle_
double optflow_distance_
double optflow_xgyro_
double optflow_ygyro_
double optflow_zgyro_
transport::SubscriberPtr opticalFlow_sub_
std::string opticalFlow_sub_topic_
std::vector< common::PID > pids_
physics::JointPtr propeller_joint_
common::PID propeller_pid_
std::default_random_engine random_generator_
bool received_first_reference_
physics::JointPtr right_elevon_joint_
common::PID right_elevon_pid_
unsigned rotor_count_
struct sockaddr_in srcaddr_
 SITL instance.
struct sockaddr_in srcaddr_2_
 MAVROS.
std::normal_distribution< float > standard_normal_distribution_
event::ConnectionPtr updateConnection_
 Pointer to the update event connection.
bool use_elevator_pid_
bool use_left_elevon_pid_
bool use_propeller_pid_
bool use_right_elevon_pid_
ignition::math::Vector3d velocity_prev_W_
physics::WorldPtr world_
double zero_position_armed_ [kNOutMax]
double zero_position_disarmed_ [kNOutMax]

Static Private Attributes

static const unsigned kNOutMax = 16

Detailed Description

Definition at line 72 of file gazebo_mavlink_interface.h.


Constructor & Destructor Documentation

Definition at line 74 of file gazebo_mavlink_interface.h.

Definition at line 48 of file gazebo_mavlink_interface.cpp.


Member Function Documentation

void gazebo::GazeboMavlinkInterface::handle_control ( double  _dt) [private]

really not ideal if your drone is moving at all, mixing kinematic updates with dynamics calculation is non-physical.

Definition at line 978 of file gazebo_mavlink_interface.cpp.

Definition at line 939 of file gazebo_mavlink_interface.cpp.

void gazebo::GazeboMavlinkInterface::ImuCallback ( ImuPtr &  imu_msg) [private]

Definition at line 643 of file gazebo_mavlink_interface.cpp.

void gazebo::GazeboMavlinkInterface::LidarCallback ( LidarPtr &  lidar_msg) [private]

Definition at line 850 of file gazebo_mavlink_interface.cpp.

void gazebo::GazeboMavlinkInterface::Load ( physics::ModelPtr  _model,
sdf::ElementPtr  _sdf 
) [protected]
Todo:
Should this be an absolute topic!?!

Definition at line 51 of file gazebo_mavlink_interface.cpp.

Definition at line 99 of file gazebo_mavlink_interface.h.

void gazebo::GazeboMavlinkInterface::OnUpdate ( const common::UpdateInfo &  ) [protected]

Definition at line 499 of file gazebo_mavlink_interface.cpp.

void gazebo::GazeboMavlinkInterface::OpticalFlowCallback ( OpticalFlowPtr &  opticalFlow_msg) [private]

Definition at line 872 of file gazebo_mavlink_interface.cpp.

void gazebo::GazeboMavlinkInterface::pollForMAVLinkMessages ( double  _dt,
uint32_t  _timeoutMs 
) [private]

Definition at line 912 of file gazebo_mavlink_interface.cpp.

void gazebo::GazeboMavlinkInterface::send_mavlink_message ( const uint8_t  msgid,
const void *  msg,
uint8_t  component_ID 
) [private]

Definition at line 605 of file gazebo_mavlink_interface.cpp.


Member Data Documentation

Definition at line 195 of file gazebo_mavlink_interface.h.

unsigned char gazebo::GazeboMavlinkInterface::buf_[65535] [private]

Definition at line 196 of file gazebo_mavlink_interface.h.

Definition at line 147 of file gazebo_mavlink_interface.h.

Definition at line 127 of file gazebo_mavlink_interface.h.

Definition at line 133 of file gazebo_mavlink_interface.h.

Definition at line 192 of file gazebo_mavlink_interface.h.

struct pollfd gazebo::GazeboMavlinkInterface::fds_[1] [private]

Definition at line 197 of file gazebo_mavlink_interface.h.

Definition at line 130 of file gazebo_mavlink_interface.h.

Definition at line 131 of file gazebo_mavlink_interface.h.

Definition at line 129 of file gazebo_mavlink_interface.h.

transport::PublisherPtr gazebo::GazeboMavlinkInterface::gps_pub_ [private]

Definition at line 172 of file gazebo_mavlink_interface.h.

Definition at line 180 of file gazebo_mavlink_interface.h.

ignition::math::Vector3d gazebo::GazeboMavlinkInterface::gravity_W_ [private]

Definition at line 185 of file gazebo_mavlink_interface.h.

Definition at line 163 of file gazebo_mavlink_interface.h.

transport::SubscriberPtr gazebo::GazeboMavlinkInterface::imu_sub_ [private]

Definition at line 169 of file gazebo_mavlink_interface.h.

Definition at line 173 of file gazebo_mavlink_interface.h.

Definition at line 166 of file gazebo_mavlink_interface.h.

Definition at line 160 of file gazebo_mavlink_interface.h.

Definition at line 112 of file gazebo_mavlink_interface.h.

Definition at line 161 of file gazebo_mavlink_interface.h.

Definition at line 167 of file gazebo_mavlink_interface.h.

Definition at line 162 of file gazebo_mavlink_interface.h.

std::vector<physics::JointPtr> gazebo::GazeboMavlinkInterface::joints_ [private]

Definition at line 141 of file gazebo_mavlink_interface.h.

const unsigned gazebo::GazeboMavlinkInterface::kNOutMax = 16 [static, private]

Definition at line 156 of file gazebo_mavlink_interface.h.

Definition at line 179 of file gazebo_mavlink_interface.h.

Definition at line 178 of file gazebo_mavlink_interface.h.

Definition at line 177 of file gazebo_mavlink_interface.h.

Definition at line 181 of file gazebo_mavlink_interface.h.

Definition at line 125 of file gazebo_mavlink_interface.h.

Definition at line 134 of file gazebo_mavlink_interface.h.

transport::SubscriberPtr gazebo::GazeboMavlinkInterface::lidar_sub_ [private]

Definition at line 170 of file gazebo_mavlink_interface.h.

Definition at line 174 of file gazebo_mavlink_interface.h.

Definition at line 117 of file gazebo_mavlink_interface.h.

Definition at line 182 of file gazebo_mavlink_interface.h.

ignition::math::Vector3d gazebo::GazeboMavlinkInterface::mag_d_ [private]

Definition at line 187 of file gazebo_mavlink_interface.h.

transport::SubscriberPtr gazebo::GazeboMavlinkInterface::mav_control_sub_ [private]

Definition at line 121 of file gazebo_mavlink_interface.h.

Definition at line 207 of file gazebo_mavlink_interface.h.

Definition at line 116 of file gazebo_mavlink_interface.h.

Definition at line 208 of file gazebo_mavlink_interface.h.

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

Definition at line 123 of file gazebo_mavlink_interface.h.

Definition at line 120 of file gazebo_mavlink_interface.h.

Definition at line 115 of file gazebo_mavlink_interface.h.

struct sockaddr_in gazebo::GazeboMavlinkInterface::myaddr_ [private]

The locally bound address.

Definition at line 193 of file gazebo_mavlink_interface.h.

Definition at line 114 of file gazebo_mavlink_interface.h.

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

Definition at line 119 of file gazebo_mavlink_interface.h.

Definition at line 205 of file gazebo_mavlink_interface.h.

Definition at line 202 of file gazebo_mavlink_interface.h.

Definition at line 203 of file gazebo_mavlink_interface.h.

Definition at line 204 of file gazebo_mavlink_interface.h.

transport::SubscriberPtr gazebo::GazeboMavlinkInterface::opticalFlow_sub_ [private]

Definition at line 171 of file gazebo_mavlink_interface.h.

Definition at line 175 of file gazebo_mavlink_interface.h.

std::vector<common::PID> gazebo::GazeboMavlinkInterface::pids_ [private]

Definition at line 142 of file gazebo_mavlink_interface.h.

Definition at line 128 of file gazebo_mavlink_interface.h.

Definition at line 132 of file gazebo_mavlink_interface.h.

std::default_random_engine gazebo::GazeboMavlinkInterface::random_generator_ [private]

Definition at line 189 of file gazebo_mavlink_interface.h.

Definition at line 111 of file gazebo_mavlink_interface.h.

Definition at line 126 of file gazebo_mavlink_interface.h.

Definition at line 135 of file gazebo_mavlink_interface.h.

Definition at line 158 of file gazebo_mavlink_interface.h.

struct sockaddr_in gazebo::GazeboMavlinkInterface::srcaddr_ [private]

SITL instance.

Definition at line 194 of file gazebo_mavlink_interface.h.

struct sockaddr_in gazebo::GazeboMavlinkInterface::srcaddr_2_ [private]

MAVROS.

Definition at line 199 of file gazebo_mavlink_interface.h.

std::normal_distribution<float> gazebo::GazeboMavlinkInterface::standard_normal_distribution_ [private]

Definition at line 190 of file gazebo_mavlink_interface.h.

Pointer to the update event connection.

Definition at line 145 of file gazebo_mavlink_interface.h.

Definition at line 137 of file gazebo_mavlink_interface.h.

Definition at line 138 of file gazebo_mavlink_interface.h.

Definition at line 136 of file gazebo_mavlink_interface.h.

Definition at line 139 of file gazebo_mavlink_interface.h.

ignition::math::Vector3d gazebo::GazeboMavlinkInterface::velocity_prev_W_ [private]

Definition at line 186 of file gazebo_mavlink_interface.h.

physics::WorldPtr gazebo::GazeboMavlinkInterface::world_ [private]

Definition at line 124 of file gazebo_mavlink_interface.h.

Definition at line 165 of file gazebo_mavlink_interface.h.

Definition at line 164 of file gazebo_mavlink_interface.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