RFIDSensor.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 #ifndef _GAZEBO_SENSORS_RFIDSENSOR_HH_
18 #define _GAZEBO_SENSORS_RFIDSENSOR_HH_
19 
20 #include <memory>
21 #include <string>
22 
23 #include "gazebo/sensors/Sensor.hh"
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
30  namespace sensors
31  {
32  class RFIDTag;
33 
34  // Forward declare private data class.
35  class RFIDSensorPrivate;
36 
39 
43  {
45  public: RFIDSensor();
46 
48  public: virtual ~RFIDSensor();
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  public: void AddTag(RFIDTag *_tag);
62 
63  // Documentation inherited.
64  protected: virtual bool UpdateImpl(const bool _force);
65 
66  // Documentation inherited
67  public: virtual void Fini();
68 
71  private: void EvaluateTags();
72 
76  private: bool CheckTagRange(const ignition::math::Pose3d &_pose);
77 
80  private: std::unique_ptr<RFIDSensorPrivate> dataPtr;
81  };
83  }
84 }
85 #endif
RFIDTag to interact with RFIDTagSensors.
Definition: RFIDTag.hh:39
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:42
Base class for sensors.
Definition: Sensor.hh:50
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59