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 #ifndef _GAZEBO_WIRELESS_TRANSMITTER_HH_
18 #define _GAZEBO_WIRELESS_TRANSMITTER_HH_
19 
20 #include <string>
21 #include "gazebo/physics/physics.hh"
24 #include "gazebo/util/system.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 bool 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 
78  public: double GetSignalStrength(const math::Pose &_receiver,
79  const double _rxGain) GAZEBO_DEPRECATED(6.0);
80 
85  public: double SignalStrength(const ignition::math::Pose3d &_receiver,
86  const double _rxGain);
87 
89  private: static const double Step;
90 
93  private: static const double MaxRadius;
94 
96  private: std::string essid;
97 
99  protected: double freq;
100 
101  // \brief Ray used to test for collisions when placing entities
102  private: physics::RayShapePtr testRay;
103 
104  // \brief When true it will publish the propagation grid to be used
105  // by the transmitter visual layer
106  private: bool visualize;
107  };
109  }
110 }
111 #endif
Sensor class for receiving wireless signals.
Definition: WirelessTransceiver.hh:37
Encapsulates a position and rotation in three space.
Definition: Pose.hh:37
Forward declarations for transport.
Transmitter to send wireless signals.
Definition: WirelessTransmitter.hh:35
double freq
Reception frequency (MHz).
Definition: WirelessTransmitter.hh:99
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:47
static const double ModelStdDesv
Std desv of the Gaussian random variable used in the propagation model.
Definition: WirelessTransmitter.hh:47
static const double NEmpty
Constant used in the propagation model when there are no obstacles between transmitter and receiver...
Definition: WirelessTransmitter.hh:39
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:66
boost::shared_ptr< RayShape > RayShapePtr
Definition: PhysicsTypes.hh:120
static const double NObstacle
Constant used in the propagation model when there are obstacles between transmitter and receiver...
Definition: WirelessTransmitter.hh:43