SMORES Robot Platform Simulation
Modlab at Penn, ASL at Cornell
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
ConfigEditor.hh
1 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 // Author: Edward Yunkai Cui
3 // Description:
4 // This is the world plugin that used by configuration
5 // generator. It basically inherit all the functions from
6 // world plugin template. However there are several main
7 // differences, 1. This world plugin will not load
8 // initial configuration, but will have a subscriber that
9 // subscribe configuration information; 2. This world plugin
10 // will publish configuration information to gui plugin that
11 // will force graphic updates happening
12 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15 #ifndef _GAZEBO_CONFIG_EDITOR_HH_
16 #define _GAZEBO_CONFIG_EDITOR_HH_
17 
18 #include "WorldServer.hh"
19 #include "config_message.pb.h"
21 
22 typedef const boost::shared_ptr
23  <const config_message::msgs::ConfigMessage> ConfigMessagePtr;
25 namespace gazebo{
27 class ConfigEditor : public WorldServer
28 {
29  public:
31  ConfigEditor();
33  ~ConfigEditor();
35 
40  virtual void InsertModel(string name, math::Pose position, string joint_angles);
42 
48  virtual void InsertModel(string name, math::Pose position, string joint_angles,
49  string model_path);
51 
55  virtual void ExtraInitializationInLoad(physics::WorldPtr _parent,
56  sdf::ElementPtr _sdf);
58 
63  void ExtraWorkWhenModelInserted(CommandMessagePtr &msg);
64  private:
66 
69  void ConfigMessageDecoding(ConfigMessagePtr &msg);
70  private:
72  transport::SubscriberPtr configSub;
74  transport::PublisherPtr configPub;
76  vector<string> ModuleWaitForDelete;
77 };
78 } // namespace gazebo
79 #endif
ConfigEditor()
Constructor.
Definition: ConfigEditor.cc:4
gazebo name space
Definition: system_gui.cc:41
void ExtraWorkWhenModelInserted(CommandMessagePtr &msg)
Need to be set to empty so the world plugin will not read in gaits.
Definition: ConfigEditor.cc:69
Definition: WorldServer.hh:80
~ConfigEditor()
Deconstructor.
Definition: ConfigEditor.cc:7
virtual void InsertModel(string name, math::Pose position, string joint_angles)
Insert a default muscle module.
Definition: ConfigEditor.cc:8
virtual void ExtraInitializationInLoad(physics::WorldPtr _parent, sdf::ElementPtr _sdf)
The function that perform extra initialization.
Definition: ConfigEditor.cc:56
Configuration Editor customized worldplugin.
Definition: ConfigEditor.hh:27