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>
25#include <gazebo/util/system.hh>
26
27namespace gazebo
28{
29 // Forward declare private data class.
30 class RandomVelocityPluginPrivate;
31
67 class GZ_PLUGIN_VISIBLE RandomVelocityPlugin : public ModelPlugin
68 {
71
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
A plugin with access to physics::Model.
Definition Plugin.hh:304
Plugin that applies a random velocity to a linke periodically.
Definition RandomVelocityPlugin.hh:68
~RandomVelocityPlugin()
Destructor.
virtual void Reset()
Override this method for custom plugin reset behavior.
virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf)
Load function.
RandomVelocityPlugin()
Constructor.
Information for use in an update event.
Definition UpdateInfo.hh:31
boost::shared_ptr< Model > ModelPtr
Definition PhysicsTypes.hh:93
Forward declarations for the common classes.
Definition Animation.hh:27