UnderwaterCurrentPlugin.hh
Go to the documentation of this file.
1 // Copyright (c) 2016 The UUV Simulator Authors.
2 // All rights reserved.
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 
18 
19 #ifndef __UNDERWATER_CURRENT_PLUGIN_HH__
20 #define __UNDERWATER_CURRENT_PLUGIN_HH__
21 
22 #include <map>
23 #include <cmath>
24 #include <string>
25 
26 #include <gazebo/gazebo.hh>
27 #include <gazebo/transport/TransportTypes.hh>
29 #include <sdf/sdf.hh>
30 
31 namespace gazebo
32 {
36  class UnderwaterCurrentPlugin : public WorldPlugin
37  {
39  public: UnderwaterCurrentPlugin();
40 
42  public: virtual ~UnderwaterCurrentPlugin();
43 
44  // Documentation inherited.
45  public: virtual void Load(physics::WorldPtr _world,
46  sdf::ElementPtr _sdf);
47 
48  // Documentation inherited.
49  public: virtual void Init();
50 
53  public: void Update(const common::UpdateInfo &_info);
54 
56  protected: void PublishCurrentVelocity();
57 
59  protected: event::ConnectionPtr updateConnection;
60 
62  protected: physics::WorldPtr world;
63 
65  protected: sdf::ElementPtr sdf;
66 
68  protected: bool hasSurface;
69 
71  protected: transport::NodePtr node;
72 
74  protected: std::map<std::string, transport::PublisherPtr>
76 
78  protected: std::string currentVelocityTopic;
79 
81  protected: std::string ns;
82 
85 
88 
91 
93  protected: common::Time lastUpdate;
94 
96  protected: ignition::math::Vector3d currentVelocity;
97  };
98 }
99 
100 #endif // __UNDERWATER_CURRENT_PLUGIN_HH__
GaussMarkovProcess currentVelModel
Gauss-Markov process instance for the current velocity.
Implementation of a Gauss-Markov process model.
std::string currentVelocityTopic
Current velocity topic.
Implementation of a Gauss-Markov process to model the current velocity and direction according to [1]...
void PublishCurrentVelocity()
Publish current velocity and the pose of its frame.
sdf::ElementPtr sdf
Pointer to sdf.
virtual void Load(physics::WorldPtr _world, sdf::ElementPtr _sdf)
common::Time lastUpdate
Last update time stamp.
std::map< std::string, transport::PublisherPtr > publishers
Map of publishers.
GaussMarkovProcess currentHorzAngleModel
Gauss-Markov process instance for horizontal angle model.
virtual ~UnderwaterCurrentPlugin()
Class destructor.
transport::NodePtr node
Pointer to a node for communication.
event::ConnectionPtr updateConnection
Update event.
GaussMarkovProcess currentVertAngleModel
Gauss-Markov process instance for vertical angle model.
ignition::math::Vector3d currentVelocity
Current linear velocity vector.
bool hasSurface
True if the sea surface is present.
physics::WorldPtr world
Pointer to world.
Class for the underwater current plugin TODO: Add option to make the underwater current also a functi...
void Update(const common::UpdateInfo &_info)
Update the simulation state.
std::string ns
Namespace for topics and services.


uuv_world_plugins
Author(s): Musa Morena Marcusso Manhaes , Sebastian Scherer , Luiz Ricardo Douat
autogenerated on Thu Jun 18 2020 03:28:45