18#ifndef GAZEBO_PLUGINS_REGIONEVENTBOXPLUGIN_HH_
19#define GAZEBO_PLUGINS_REGIONEVENTBOXPLUGIN_HH_
24#include <gazebo/physics/physics.hh>
64 private:
bool PointInRegion(
const ignition::math::Vector3d &_point,
65 const ignition::math::Box &_box,
const ignition::math::Pose3d &_pose)
71 private:
void UpdateRegion(
const ignition::math::Vector3d &_size,
72 const ignition::math::Pose3d &_pose);
92 private: std::string modelName;
101 private: ignition::math::Vector3d boxSize;
104 private: ignition::math::Vector3d boxScale;
107 private: ignition::math::Pose3d boxPose;
110 private: ignition::math::Box box;
116 private:
bool hasStaleSizeAndPose;
120 private: std::map<std::string, common::Time> insiders;
A plugin with access to physics::Model.
Definition Plugin.hh:304
A plugin that fires an event when another model enters the region defined by the size of this model's...
Definition RegionEventBoxPlugin.hh:44
std::mutex receiveMutex
Mutex to protect incoming messages.
Definition RegionEventBoxPlugin.hh:98
void OnUpdate(const common::UpdateInfo &_info)
Updates the box event plugin at every physics iteration.
transport::NodePtr node
Transport node pointer.
Definition RegionEventBoxPlugin.hh:95
void OnModelMsg(ConstModelPtr &_msg)
Callback when a model message is received.
void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf)
Load function.
RegionEventBoxPlugin()
Constructor.
Information for use in an update event.
Definition UpdateInfo.hh:31
boost::shared_ptr< Connection > ConnectionPtr
Definition CommonTypes.hh:134
boost::shared_ptr< World > WorldPtr
Definition PhysicsTypes.hh:89
boost::shared_ptr< Model > ModelPtr
Definition PhysicsTypes.hh:93
boost::shared_ptr< Subscriber > SubscriberPtr
Definition TransportTypes.hh:53
boost::shared_ptr< Publisher > PublisherPtr
Definition TransportTypes.hh:49
boost::shared_ptr< Node > NodePtr
Definition TransportTypes.hh:57
Forward declarations for the common classes.
Definition Animation.hh:27
std::shared_ptr< EventSource > EventSourcePtr
Definition EventSource.hh:81