Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _GAZEBO_CONVEYOR_BELT_PLUGIN_HH_
00022 #define _GAZEBO_CONVEYOR_BELT_PLUGIN_HH_
00023
00024 #include <string>
00025
00026 #include "SideContactPlugin.hh"
00027 #include <gazebo/msgs/msgs.hh>
00028 #include <gazebo/sensors/sensors.hh>
00029 #include <gazebo/util/system.hh>
00030 #include <ignition/math/Vector3.hh>
00031
00032 namespace gazebo
00033 {
00035 class GAZEBO_VISIBLE ConveyorBeltPlugin : public SideContactPlugin
00036 {
00038 public: ConveyorBeltPlugin();
00039
00041 public: virtual ~ConveyorBeltPlugin();
00042
00046 public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
00047
00049 protected: void OnUpdate(const common::UpdateInfo &_info);
00050
00052 protected: transport::NodePtr node;
00053
00055 protected: transport::SubscriberPtr controlCommandSub;
00056
00058 protected: void OnControlCommand(ConstHeaderPtr& _msg);
00059
00061 protected: ignition::math::Vector3d velocityAxis;
00062
00064 protected: double beltVelocity;
00065
00067 protected: std::mutex mutex;
00068
00070 public: void SetVelocity(double velocity);
00071
00074 protected: std::string Topic(std::string topicName) const;
00075
00077 protected: void ActOnContactingLinks(double velocity);
00078 };
00079 }
00080 #endif
00081