20 #include <osrf_gear/KitTray.h>    50     ROS_FATAL_STREAM(
"A ROS node for Gazebo has not been initialized, unable to load plugin. "    51       << 
"Load the Gazebo system plugin 'libgazebo_ros_api_plugin.so' in the gazebo_ros package)");
    57     "/ariac/trays", 1000);
    71     gzdbg << this->
parentLink->GetScopedName() << 
": number of contacting models: " \
    82   auto trayPose = this->
parentLink->GetWorldPose().Ign();
    91       math::Pose objectPose = 
model->GetWorldPose();
    92       ignition::math::Matrix4d transMat(trayPose);
    93       ignition::math::Matrix4d objectPoseMat(objectPose.Ign());
    94       object.pose = (transMat.Inverse() * objectPoseMat).
Pose();
   105   osrf_gear::KitTray kitTrayMsg;
   106   kitTrayMsg.tray.data = this->
trayID;
   109     osrf_gear::KitObject msgObj;
   110     msgObj.type = obj.type;
   111     msgObj.pose.position.x = obj.pose.pos.x;
   112     msgObj.pose.position.y = obj.pose.pos.y;
   113     msgObj.pose.position.z = obj.pose.pos.z;
   114     msgObj.pose.orientation.x = obj.pose.rot.x;
   115     msgObj.pose.orientation.y = obj.pose.rot.y;
   116     msgObj.pose.orientation.z = obj.pose.rot.z;
   117     msgObj.pose.orientation.w = obj.pose.rot.w;
   120     kitTrayMsg.kit.objects.push_back(msgObj);
 std::vector< KitObject > objects
A kit is composed of multiple objects. 
void publish(const boost::shared_ptr< M > &message) const 
A plugin for a contact sensor on a kit tray. 
ROSCPP_DECL bool isInitialized()
ros::Publisher currentKitPub
Publisher for the kit state. 
std::string type
Object type. 
void PublishKitMsg()
Publish the Kit ROS message. 
virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf)
Load the model plugin. 
Class to store information about each object contained in a kit. 
void OnUpdate(const common::UpdateInfo &_info)
Callback that receives the world update event. 
#define ROS_FATAL_STREAM(args)
virtual ~KitTrayPlugin()
Destructor. 
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
std::string trayID
ID of tray. 
TrayID_t DetermineModelType(const std::string &modelName)
Determine the type of a gazebo model from its name. 
ros::NodeHandle * rosNode
ROS node handle. 
GZ_REGISTER_MODEL_PLUGIN(GazeboRosP3D)
void ProcessContactingModels()
Update the kit based on which models are in contact. 
ariac::Kit currentKit
Kit which is currently on the tray.