ModelPropShop.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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_MODELPROPSHOP_HH_
19 #define GAZEBO_PLUGINS_MODELPROPSHOP_HH_
20 
21 #include <string>
22 #include <ignition/transport/Node.hh>
23 
24 #include "gazebo/common/Plugin.hh"
25 #include "gazebo/rendering/rendering.hh"
26 #include "gazebo/util/system.hh"
27 
28 namespace gazebo
29 {
32  class GZ_PLUGIN_VISIBLE ModelPropShop : public SystemPlugin
33  {
35  public: virtual ~ModelPropShop();
36 
40  public: void Load(int _argc, char **_argv);
41 
43  private: void Init();
44 
46  private: void OnWorldCreated();
47 
49  private: void Update();
50 
52  private: event::ConnectionPtr updateConn;
53 
55  private: event::ConnectionPtr worldCreatedConn;
56 
58  private: transport::NodePtr node;
59 
61  private: transport::PublisherPtr pub;
62 
64  private: transport::PublisherPtr factoryPub;
65 
67  private: rendering::ScenePtr scene;
68 
70  private: rendering::CameraPtr camera;
71 
73  private: rendering::LightPtr light;
74 
76  private: sdf::SDFPtr sdf;
77 
79  private: std::string modelName;
80 
82  private: boost::filesystem::path savePath;
83 
84  // Place ignition::transport objects at the end of this file to
85  // guarantee they are destructed first.
86 
88  private: ignition::transport::Node nodeIgn;
89 
91  private: ignition::transport::Node::Publisher pubIgn;
92 
94  private: ignition::transport::Node::Publisher factoryPubIgn;
95  };
96 }
97 
98 #endif
Forward declarations for the common classes.
Definition: Animation.hh:26
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
A plugin loaded within the gzserver on startup.
Definition: Plugin.hh:361
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:82
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:134
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Light > LightPtr
Definition: RenderTypes.hh:86
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:90
This plugin will generate 5 pictures of a model: perspective, top, front, side, back.
Definition: ModelPropShop.hh:32