23 #include "node_thread.h" 26 #include <gazebo/transport/TransportIface.hh> 27 #include <gazebo/transport/TransportTypes.hh> 28 #include <gazebo/transport/Node.hh> 29 #include <gazebo/gazebo_config.h> 30 #include <google/protobuf/message.h> 31 #include <gazebo/msgs/msgs.hh> 46 :
Thread(
"GazeboNodeThread",
Thread::OPMODE_WAITFORWAKEUP),
68 if(gazebo::transport::is_stopped()) {
69 gazebo::transport::init();
70 gazebo::transport::run();
78 gazebo::transport::NodePtr node(
new gazebo::transport::Node());
81 __gazebonode->Init(robot_channel.c_str());
85 __gazebo_world_node = gazebo::transport::NodePtr(
new gazebo::transport::Node());
86 __gazebo_world_node->Init(world_name.c_str());
97 __gazebo_world_node->Fini();
98 __gazebo_world_node.reset();
Fawkes library namespace.
Thread class encapsulation of pthreads.
Logger * logger
This is the Logger member used to access the logger.
Thread aspect to use blocked timing.
virtual void init()
Initialize the thread.
const char * name() const
Get name of thread.
virtual void log_warn(const char *component, const char *format,...)=0
Log warning message.
virtual void loop()
Code to execute in the thread.
Thread aspect provide a new aspect.
GazeboNodeThread()
Constructor.
virtual ~GazeboNodeThread()
Destructor.
void set_gazebonode(gazebo::transport::NodePtr gazebonode)
Set the Gazebo node handle to use for aspect initialization.
virtual void finalize()
Finalize the thread.
void set_gazebo_world_node(gazebo::transport::NodePtr gazebo_world_node)
Set the Gazebo node handle to use for aspect initialization.
Configuration * config
This is the Configuration member used to access the configuration.
virtual std::string get_string(const char *path)=0
Get value from configuration which is of type string.