RFIDSensor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 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 #ifndef _GAZEBO_RFIDSENSOR_HH_
18 #define _GAZEBO_RFIDSENSOR_HH_
19 
20 #include <vector>
21 #include <string>
22 
24 
26 
27 #include "gazebo/math/Pose.hh"
28 
29 #include "gazebo/sensors/Sensor.hh"
30 #include "gazebo/util/system.hh"
31 
32 namespace gazebo
33 {
36  namespace sensors
37  {
38  class RFIDTag;
39 
42 
46  {
48  public: RFIDSensor();
49 
51  public: virtual ~RFIDSensor();
52 
53  // Documentation inherited
54  public: virtual void Load(const std::string &_worldName,
55  sdf::ElementPtr _sdf);
56 
57  // Documentation inherited
58  public: virtual void Load(const std::string &_worldName);
59 
60  // Documentation inherited
61  public: virtual void Init();
62 
63  // Documentation inherited
64  public: void AddTag(RFIDTag *_tag);
65 
66  // Documentation inherited.
67  protected: virtual bool UpdateImpl(bool _force);
68 
69  // Documentation inherited
70  public: virtual void Fini();
71 
74  private: void EvaluateTags();
75 
81  private: bool CheckTagRange(const math::Pose &_pose)
82  GAZEBO_DEPRECATED(6.0);
83 
87  private: bool CheckTagRange(const ignition::math::Pose3d &_pose);
88 
90  private: physics::EntityPtr entity;
91 
93  private: transport::PublisherPtr scanPub;
94 
96  private: std::vector<RFIDTag*> tags;
97  };
99  }
100 }
101 #endif
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
Forward declarations for transport.
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:47
RFIDTag to interact with RFIDTagSensors.
Definition: RFIDTag.hh:40
default namespace for gazebo
boost::shared_ptr< Entity > EntityPtr
Definition: PhysicsTypes.hh:76
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Sensor class for RFID type of sensor.
Definition: RFIDSensor.hh:45
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Base class for sensors.
Definition: Sensor.hh:69
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66