PopulationPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 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 
18 #ifndef GAZEBO_POPULATION_PLUGIN_HH_
19 #define GAZEBO_POPULATION_PLUGIN_HH_
20 
21 #include <memory>
22 #include <gazebo/common/Plugin.hh>
23 #include <gazebo/msgs/gz_string.pb.h>
24 #include <gazebo/physics/PhysicsTypes.hh>
25 #include <sdf/sdf.hh>
26 
27 namespace gazebo
28 {
29  // Forward declare private data class
30  class PopulationPluginPrivate;
31 
35 
37 
80 
81  class GAZEBO_VISIBLE PopulationPlugin : public WorldPlugin
82  {
84  public: PopulationPlugin();
85 
87  public: virtual ~PopulationPlugin();
88 
89  // Documentation inherited.
90  public: virtual void Load(physics::WorldPtr _world, sdf::ElementPtr _sdf);
91 
93  public: void Pause();
94 
96  public: void Resume();
97 
99  public: virtual void Restart();
100 
102  protected: void OnUpdate();
103 
109  protected: void OnActivation(ConstGzStringPtr &_msg);
110 
112  protected: bool Enabled() const;
113 
116  private: virtual void Publish() const;
117 
119  private: std::unique_ptr<PopulationPluginPrivate> dataPtr;
120  };
121 }
122 #endif
A plugin that allows models to be spawned at a given location in a specific simulation time...
std::unique_ptr< PopulationPluginPrivate > dataPtr
Private data pointer.


osrf_gear
Author(s):
autogenerated on Wed Sep 7 2016 03:48:12