23 #ifndef ROTORS_GAZEBO_PLUGINS_GAZEBO_ODOMETRY_PLUGIN_H 24 #define ROTORS_GAZEBO_PLUGINS_GAZEBO_ODOMETRY_PLUGIN_H 31 #include <boost/array.hpp> 32 #include <boost/bind.hpp> 33 #include <gazebo/common/common.hh> 34 #include <gazebo/common/Plugin.hh> 35 #include <gazebo/gazebo.hh> 36 #include <gazebo/physics/physics.hh> 37 #include <opencv2/core/core.hpp> 44 #include "Odometry.pb.h" 65 typedef std::deque<std::pair<int, gz_geometry_msgs::Odometry> >
OdometryQueue;
95 void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
96 void OnUpdate(
const common::UpdateInfo& );
173 #endif // ROTORS_GAZEBO_PLUGINS_GAZEBO_ODOMETRY_PLUGIN_H physics::EntityPtr parent_link_
static const std::string kDefaultLinkName
double covariance_image_scale_
UniformDistribution angular_velocity_u_[3]
NormalDistribution attitude_n_[3]
gazebo::transport::PublisherPtr position_stamped_pub_
gazebo::transport::PublisherPtr transform_stamped_pub_
gazebo::transport::PublisherPtr odometry_pub_
UniformDistribution position_u_[3]
std::string transform_stamped_pub_topic_
gazebo::transport::PublisherPtr pose_pub_
UniformDistribution linear_velocity_u_[3]
static constexpr double kDefaultUnknownDelay
static constexpr int kDefaultGazeboSequence
std::string pose_with_covariance_stamped_pub_topic_
bool pubs_and_subs_created_
Flag that is set to true once CreatePubsAndSubs() is called, used to prevent CreatePubsAndSubs() from...
static const std::string kDefaultChildFrameId
std::string pose_pub_topic_
NormalDistribution linear_velocity_n_[3]
NormalDistribution position_n_[3]
event::ConnectionPtr updateConnection_
Pointer to the update event connection.
static constexpr double kDefaultCovarianceImageScale
std::deque< std::pair< int, gz_geometry_msgs::Odometry > > OdometryQueue
static constexpr int kDefaultMeasurementDivisor
cv::Mat covariance_image_
std::random_device random_device_
static constexpr int kDefaultMeasurementDelay
std::string parent_frame_id_
std::string position_stamped_pub_topic_
boost::thread callback_queue_thread_
std::string child_frame_id_
CovarianceMatrix twist_covariance_matrix_
OdometryQueue odometry_queue_
gazebo::transport::PublisherPtr pose_with_covariance_stamped_pub_
void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf)
NormalDistribution angular_velocity_n_[3]
void CreatePubsAndSubs()
Creates all required publishers and subscribers, incl. routing of messages to/from ROS if required...
UniformDistribution attitude_u_[3]
std::normal_distribution NormalDistribution
static constexpr int kDefaultOdometrySequence
CovarianceMatrix pose_covariance_matrix_
std::mt19937 random_generator_
boost::array< double, 36 > CovarianceMatrix
void OnUpdate(const common::UpdateInfo &)
gazebo::transport::NodePtr node_handle_
std::string odometry_pub_topic_
static const std::string kDefaultParentFrameId
std::uniform_real_distribution UniformDistribution
gazebo::transport::PublisherPtr broadcast_transform_pub_
Special-case publisher to publish stamped transforms with frame IDs. The ROS interface plugin (if pre...