gazebo_ros_elevator.h
Go to the documentation of this file.
1 /*
2  * Copyright 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_ROS_PLUGINS_ELEVATOR_PLUGIN_H_
19 #define _GAZEBO_ROS_PLUGINS_ELEVATOR_PLUGIN_H_
20 
21 #include <sdf/sdf.hh>
22 
23 // Gazebo
24 #include <gazebo/plugins/ElevatorPlugin.hh>
25 
26 // ROS
27 #include <ros/ros.h>
28 #include <std_msgs/String.h>
29 #include <ros/callback_queue.h>
30 #include <ros/advertise_options.h>
31 
32 namespace gazebo
33 {
35  class GazeboRosElevator : public ElevatorPlugin
36  {
38  public: GazeboRosElevator();
39 
41  public: virtual ~GazeboRosElevator();
42 
46  public: void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf);
47 
50  public: void OnElevator(const std_msgs::String::ConstPtr &_msg);
51 
53  private: void QueueThread();
54 
56  private: std::string robotNamespace_;
57 
60 
63 
66 
67  // \brief Custom Callback Queue thread
68  private: boost::thread callbackQueueThread_;
69  };
70 }
71 #endif
virtual ~GazeboRosElevator()
Destructor.
ros::CallbackQueue queue_
Custom Callback Queue.
void OnElevator(const std_msgs::String::ConstPtr &_msg)
Receives messages on the elevator&#39;s topic.
ros::NodeHandle * rosnode_
ros node handle
ros::Subscriber elevatorSub_
Subscribes to a topic that controls the elevator.
ROS implementation of the Elevator plugin.
void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf)
Load the plugin.
std::string robotNamespace_
for setting ROS name space
void QueueThread()
Queu to handle callbacks.


gazebo_plugins
Author(s): John Hsu
autogenerated on Wed Aug 24 2022 02:47:52