ROSAriacKitTrayPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 /*
18  * Desc: Kit tray plugin
19  * Author: Deanna Hood
20  */
21 #ifndef _GAZEBO_KIT_TRAY_PLUGIN_HH_
22 #define _GAZEBO_KIT_TRAY_PLUGIN_HH_
23 
24 #include <string>
25 
26 #include <ros/ros.h>
27 
28 #include <gazebo/common/Plugin.hh>
29 #include <gazebo/msgs/msgs.hh>
30 #include <gazebo/sensors/sensors.hh>
31 #include <gazebo/util/system.hh>
32 #include <osrf_gear/ARIAC.hh>
33 #include "SideContactPlugin.hh"
34 
35 namespace gazebo
36 {
38  class GAZEBO_VISIBLE KitTrayPlugin : public SideContactPlugin
39  {
41  public: KitTrayPlugin();
42 
44  public: virtual ~KitTrayPlugin();
45 
49  public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
50 
52  protected: void OnUpdate(const common::UpdateInfo &_info);
53 
55  protected: void ProcessContactingModels();
56 
58  public: std::string DetermineModelType(const std::string &modelName);
59 
61  protected: void PublishKitMsg();
62 
64  protected: ariac::Kit currentKit;
65 
67  protected: std::string trayID;
68 
70  protected: ros::NodeHandle *rosNode;
71 
74  };
75 }
76 #endif
77 
A plugin for a contact sensor on a kit tray.
ros::Publisher currentKitPub
Publisher for the kit state.
A plugin for a model with a contact sensor that only monitors collisions on one of its sides...
std::string trayID
ID of tray.
TrayID_t DetermineModelType(const std::string &modelName)
Determine the type of a gazebo model from its name.
Definition: ARIAC.hh:222
ros::NodeHandle * rosNode
ROS node handle.
Class to store information about a kit.
Definition: ARIAC.hh:266
ariac::Kit currentKit
Kit which is currently on the tray.


osrf_gear
Author(s):
autogenerated on Wed Sep 7 2016 03:48:12