All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WirelessTransmitter.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 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 #ifndef _WIRELESS_TRANSMITTER_HH_
19 #define _WIRELESS_TRANSMITTER_HH_
20 
21 #include <string>
22 #include "gazebo/physics/physics.hh"
25 
26 namespace gazebo
27 {
28  namespace sensors
29  {
32 
36  {
39  public: static const double NEmpty;
40 
43  public: static const double NObstacle;
44 
47  public: static const double ModelStdDesv;
48 
50  public: WirelessTransmitter();
51 
53  public: virtual ~WirelessTransmitter();
54 
55  // Documentation inherited
56  protected: virtual void UpdateImpl(bool _force);
57 
58  // Documentation inherited
59  public: virtual void Load(const std::string &_worldName);
60 
61  // Documentation inherited
62  public: virtual void Init();
63 
66  public: std::string GetESSID() const;
67 
70  public: double GetFreq() const;
71 
74  public: double GetSignalStrength(const math::Pose &_receiver,
75  const double rxGain);
76 
78  private: static const double Step;
79 
82  private: static const double MaxRadius;
83 
85  private: std::string essid;
86 
88  protected: double freq;
89 
90  // \brief Ray used to test for collisions when placing entities
91  private: physics::RayShapePtr testRay;
92 
93  // \brief When true it will publish the propagation grid to be used
94  // by the transmitter visual layer
95  private: bool visualize;
96  };
98  }
99 }
100 #endif