ElevatorPlugin.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 
18 #ifndef GAZEBO_PLUGINS_ELEVATORPLUGIN_HH_
19 #define GAZEBO_PLUGINS_ELEVATORPLUGIN_HH_
20 
21 #include <memory>
22 #include <string>
23 
24 #include <sdf/sdf.hh>
25 
26 #include <gazebo/msgs/msgs.hh>
28 #include <gazebo/common/Plugin.hh>
29 #include <gazebo/util/system.hh>
30 
31 namespace gazebo
32 {
34  class ElevatorPluginPrivate;
35 
54  {
56  public: ElevatorPlugin();
57 
59  public: ~ElevatorPlugin();
60 
61  // Documentation inherited
62  public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
63 
64  // Documentation inherited
65  public: virtual void Reset();
66 
69  public: void MoveToFloor(const int _floor);
70 
73  private: void Update(const common::UpdateInfo &_info);
74 
77  private: void OnElevator(ConstGzStringPtr &_msg);
78 
80  private: std::unique_ptr<ElevatorPluginPrivate> dataPtr;
81  };
82 }
83 #endif
Information for use in an update event.
Definition: UpdateInfo.hh:30
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
Plugin to control a elevator.
Definition: ElevatorPlugin.hh:53
A plugin with access to physics::Model.
Definition: Plugin.hh:260
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59