WirelessTransmitter.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 
18 #ifndef _WIRELESS_TRANSMITTER_HH_
19 #define _WIRELESS_TRANSMITTER_HH_
20 
21 #include <string>
22 #include "gazebo/physics/physics.hh"
25 #include "gazebo/util/system.hh"
26 
27 namespace gazebo
28 {
29  namespace sensors
30  {
33 
37  {
40  public: static const double NEmpty;
41 
44  public: static const double NObstacle;
45 
48  public: static const double ModelStdDesv;
49 
51  public: WirelessTransmitter();
52 
54  public: virtual ~WirelessTransmitter();
55 
56  // Documentation inherited
57  protected: virtual bool UpdateImpl(bool _force);
58 
59  // Documentation inherited
60  public: virtual void Load(const std::string &_worldName);
61 
62  // Documentation inherited
63  public: virtual void Init();
64 
67  public: std::string GetESSID() const;
68 
71  public: double GetFreq() const;
72 
75  public: double GetSignalStrength(const math::Pose &_receiver,
76  const double rxGain);
77 
79  private: static const double Step;
80 
83  private: static const double MaxRadius;
84 
86  private: std::string essid;
87 
89  protected: double freq;
90 
91  // \brief Ray used to test for collisions when placing entities
92  private: physics::RayShapePtr testRay;
93 
94  // \brief When true it will publish the propagation grid to be used
95  // by the transmitter visual layer
96  private: bool visualize;
97  };
99  }
100 }
101 #endif
Sensor class for receiving wireless signals.
Definition: WirelessTransceiver.hh:36
Encapsulates a position and rotation in three space.
Definition: Pose.hh:40
Forward declarations for transport.
Transmitter to send wireless signals.
Definition: WirelessTransmitter.hh:36
double freq
Reception frequency (MHz).
Definition: WirelessTransmitter.hh:89
static const double ModelStdDesv
Std desv of the Gaussian random variable used in the propagation model.
Definition: WirelessTransmitter.hh:48
static const double NEmpty
Constant used in the propagation model when there are no obstacles between transmitter and receiver...
Definition: WirelessTransmitter.hh:40
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
boost::shared_ptr< RayShape > RayShapePtr
Definition: PhysicsTypes.hh:114
static const double NObstacle
Constant used in the propagation model when there are obstacles between transmitter and receiver...
Definition: WirelessTransmitter.hh:44