All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFIDTag.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2012 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 /* Desc: RFID Tag
18  * Author: Jonas Mellin & Zakiruz Zaman
19  * Date: 6th December 2011
20  */
21 
22 #ifndef _RFIDTAG_HH_
23 #define _RFIDTAG_HH_
24 
25 #include <vector>
26 #include <string>
27 
29 #include "gazebo/sensors/Sensor.hh"
30 #include "gazebo/math/gzmath.hh"
31 #include "gazebo/physics/physics.hh"
32 
33 namespace gazebo
34 {
35  namespace sensors
36  {
39 
42  class RFIDTag: public Sensor
43  {
45  public: RFIDTag();
46 
48  public: virtual ~RFIDTag();
49 
50  // Documentation inherited
51  public: virtual void Load(const std::string & _worldName,
52  sdf::ElementPtr &_sdf);
53 
54  // Documentation inherited
55  public: virtual void Load(const std::string & _worldName);
56 
57  // Documentation inherited
58  public: virtual void Init();
59 
60  // Documentation inherited
61  protected: virtual void UpdateImpl(bool _force);
62 
63  // Documentation inherited
64  public: virtual void Fini();
65 
68  public: math::Pose GetTagPose() const
69  {return entity->GetWorldPose();}
70 
72  private: physics::EntityPtr entity;
73 
75  private: transport::PublisherPtr scanPub;
76  };
78  }
79 }
80 #endif