ROSAGVPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2016 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 ROS_AGV_PLUGIN_HH_
18 #define ROS_AGV_PLUGIN_HH_
19 
20 #include <sdf/sdf.hh>
21 #include <gazebo/physics/physics.hh>
22 #include <gazebo/common/Plugin.hh>
23 
24 // ROS
25 #include <ros/ros.h>
26 #include <osrf_gear/AGVControl.h>
27 
28 namespace gazebo
29 {
31  class ROSAGVPlugin : public ModelPlugin
32  {
34  public: ROSAGVPlugin();
35 
37  public: virtual ~ROSAGVPlugin();
38 
42  public: void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf);
43 
47  public: bool OnCommand(
48  osrf_gear::AGVControl::Request &_req,
49  osrf_gear::AGVControl::Response &_res);
50 
52  private: std::string agvName;
53 
55  private: std::string robotNamespace;
56 
59 
62 
65 
67  private: gazebo::common::PoseAnimationPtr anim;
68 
70  private: gazebo::physics::ModelPtr model;
71  };
72 }
73 #endif
ros::ServiceServer rosService
Receives service calls for controlling the AGV.
Definition: ROSAGVPlugin.hh:61
void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf)
Load the plugin.
Definition: ROSAGVPlugin.cc:40
gazebo::common::PoseAnimationPtr anim
Robot animation.
Definition: ROSAGVPlugin.hh:67
bool OnCommand(osrf_gear::AGVControl::Request &_req, osrf_gear::AGVControl::Response &_res)
Receives requests on the conveyor belt&#39;s topic.
ROS implementation of the ConveyorBeltPlugin plugin.
Definition: ROSAGVPlugin.hh:31
virtual ~ROSAGVPlugin()
Destructor.
Definition: ROSAGVPlugin.cc:34
ros::ServiceClient rosSubmitTrayClient
Client for submitting trays for inspection.
Definition: ROSAGVPlugin.hh:64
std::string agvName
Name of the AGV.
Definition: ROSAGVPlugin.hh:52
ROSAGVPlugin()
Constructor.
Definition: ROSAGVPlugin.cc:29
ros::NodeHandle * rosnode
ros node handle
Definition: ROSAGVPlugin.hh:58
gazebo::physics::ModelPtr model
Pointer to the model.
Definition: ROSAGVPlugin.hh:70
std::string robotNamespace
for setting ROS name space
Definition: ROSAGVPlugin.hh:55


osrf_gear
Author(s):
autogenerated on Wed Sep 7 2016 03:48:12