21 #ifndef __SWARM_BOO_PLUGIN_HH__
22 #define __SWARM_BOO_PLUGIN_HH__
27 #include <gazebo/common/Events.hh>
28 #include <gazebo/common/Plugin.hh>
29 #include <gazebo/common/Time.hh>
30 #include <gazebo/common/UpdateInfo.hh>
31 #include <gazebo/physics/PhysicsTypes.hh>
32 #include <ignition/math/Vector3.hh>
35 #include "swarm/SwarmTypes.hh"
66 private:
virtual void OnUpdateEnd();
69 private:
virtual void Load(gazebo::physics::ModelPtr _model,
70 sdf::ElementPtr _sdf);
77 private:
void OnDataReceived(
const std::string &_srcAddress,
78 const std::string &_dstAddress,
79 const uint32_t _dstPort,
80 const std::string &_data);
85 private: ignition::math::Vector3i PosToGrid(ignition::math::Vector3d _pos);
88 private:
bool found =
false;
91 private: gazebo::physics::ModelPtr lostPerson;
100 private: std::map<gazebo::common::Time,
101 ignition::math::Vector3i> lostPersonBuffer;
104 private: ignition::math::Vector3i lastPersonPosInGrid;
107 private: gazebo::event::ConnectionPtr updateEndConnection;
110 private: std::mutex mutex;
116 private:
double cellSize = 1;
120 private: gazebo::common::Time maxDt = 30.0;
Main Swarm API for agent development.
virtual ~BooPlugin()
Class destructor.
Definition: BooPlugin.hh:37
Class that drives the behavior of the base of operations (BOO).
Definition: BooPlugin.hh:57
BooPlugin()
Class constructor.
A Model plugin that is the base class for all agent plugins in a swarm.
Definition: RobotPlugin.hh:106