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
gazebo
ros.h
gazebo::GazeboRosElevator::callbackQueueThread_
boost::thread callbackQueueThread_
Definition: gazebo_ros_elevator.h:68
gazebo::GazeboRosElevator::rosnode_
ros::NodeHandle * rosnode_
ros node handle
Definition: gazebo_ros_elevator.h:59
gazebo::GazeboRosElevator::queue_
ros::CallbackQueue queue_
Custom Callback Queue.
Definition: gazebo_ros_elevator.h:65
gazebo::GazeboRosElevator::elevatorSub_
ros::Subscriber elevatorSub_
Subscribes to a topic that controls the elevator.
Definition: gazebo_ros_elevator.h:62
gazebo::GazeboRosElevator::OnElevator
void OnElevator(const std_msgs::String::ConstPtr &_msg)
Receives messages on the elevator's topic.
Definition: gazebo_ros_elevator.cpp:80
gazebo::GazeboRosElevator::QueueThread
void QueueThread()
Queu to handle callbacks.
Definition: gazebo_ros_elevator.cpp:86
ros::CallbackQueue
gazebo::GazeboRosElevator
ROS implementation of the Elevator plugin.
Definition: gazebo_ros_elevator.h:35
gazebo::GazeboRosElevator::Load
void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf)
Load the plugin.
Definition: gazebo_ros_elevator.cpp:40
callback_queue.h
gazebo::GazeboRosElevator::~GazeboRosElevator
virtual ~GazeboRosElevator()
Destructor.
Definition: gazebo_ros_elevator.cpp:29
gazebo::GazeboRosElevator::robotNamespace_
std::string robotNamespace_
for setting ROS name space
Definition: gazebo_ros_elevator.h:56
advertise_options.h
gazebo::GazeboRosElevator::GazeboRosElevator
GazeboRosElevator()
Constructor.
Definition: gazebo_ros_elevator.cpp:24
ros::NodeHandle
ros::Subscriber


gazebo_plugins
Author(s): John Hsu
autogenerated on Thu Sep 5 2024 02:49:55