RandomVelocityPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 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_PLUGINS_RANDOMVELOCITYPLUGIN_HH_
18 #define GAZEBO_PLUGINS_RANDOMVELOCITYPLUGIN_HH_
19 
20 #include <memory>
21 
22 #include <sdf/sdf.hh>
24 #include <gazebo/common/Plugin.hh>
25 #include <gazebo/util/system.hh>
26 
27 namespace gazebo
28 {
29  // Forward declare private data class.
30  class RandomVelocityPluginPrivate;
31 
67  class GZ_PLUGIN_VISIBLE RandomVelocityPlugin : public ModelPlugin
68  {
70  public: RandomVelocityPlugin();
71 
73  public: ~RandomVelocityPlugin();
74 
75  // Documentation inherited
76  public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
77 
78  // Documentation inherited
79  public: virtual void Reset();
80 
83  private: void Update(const common::UpdateInfo &_info);
84 
87  private: std::unique_ptr<RandomVelocityPluginPrivate> dataPtr;
88  };
89 }
90 #endif
Forward declarations for the common classes.
Definition: Animation.hh:26
Plugin that applies a random velocity to a linke periodically.
Definition: RandomVelocityPlugin.hh:67
Information for use in an update event.
Definition: UpdateInfo.hh:30
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:94
A plugin with access to physics::Model.
Definition: Plugin.hh:303