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_ELEVATOR_PLUGIN_HH_
19 #define _GAZEBO_ELEVATOR_PLUGIN_HH_
20 
21 #include <string>
22 
23 #include <sdf/sdf.hh>
24 
25 #include <gazebo/msgs/msgs.hh>
27 #include <gazebo/common/Plugin.hh>
28 #include <gazebo/util/system.hh>
29 
30 namespace gazebo
31 {
33  class ElevatorPluginPrivate;
34 
53  {
55  public: ElevatorPlugin();
56 
58  public: ~ElevatorPlugin();
59 
60  // Documentation inherited
61  public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
62 
63  // Documentation inherited
64  public: virtual void Reset();
65 
68  public: void MoveToFloor(const int _floor);
69 
72  private: void Update(const common::UpdateInfo &_info);
73 
76  private: void OnElevator(ConstGzStringPtr &_msg);
77 
79  private: ElevatorPluginPrivate *dataPtr;
80  };
81 }
82 #endif
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:84
Information for use in an update event.
Definition: UpdateInfo.hh:30
Plugin to control a elevator.
Definition: ElevatorPlugin.hh:52
Definition: ElevatorPluginPrivate.hh:37
A plugin with access to physics::Model.
Definition: Plugin.hh:245
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66