All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFIDSensor.hh
Go to the documentation of this file.
1 /* Copyright (C) 2012
2  * Jonas Mellin & Zakiruz Zaman
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 /* Desc: Gazebo RFID Sensor
16  * Author: Jonas Mellin & Zakiruz Zaman
17  * Date: 6th December 2011
18  */
19 
20 #ifndef _RFIDSENSOR_HH_
21 #define _RFIDSENSOR_HH_
22 
23 #include <vector>
24 #include <string>
25 
27 
28 #include "math/Angle.hh"
29 #include "math/Pose.hh"
30 
31 #include "sensors/Sensor.hh"
33 
34 namespace gazebo
35 {
38  namespace sensors
39  {
42 
45  class RFIDSensor: public Sensor
46  {
48  public: RFIDSensor();
49 
51  public: virtual ~RFIDSensor();
52 
56  public: virtual void Load(const std::string &_worldName,
57  sdf::ElementPtr _sdf);
58 
61  public: virtual void Load(const std::string &_worldName);
62 
64  public: virtual void Init();
65 
66  protected: virtual void UpdateImpl(bool _force);
67 
69  public: virtual void Fini();
70 
73  private: void EvaluateTags();
74 
77  private: bool CheckTagRange(const math::Pose &_pose);
78 
82  private: bool CheckRayIntersection(const math::Pose &_pose);
83 
84  private: physics::EntityPtr entity;
85 
86  private: physics::CollisionPtr laserCollision;
87  private: physics::RayShapePtr laserShape;
88 
89  private: transport::PublisherPtr scanPub;
90 
91  private: RFIDTagManager *rtm;
92  };
94  }
95 }
96 #endif