23 #include "node_thread.h" 26 #include <gazebo/gazebo_config.h> 27 #include <google/protobuf/message.h> 29 #include <gazebo/msgs/msgs.hh> 30 #include <gazebo/transport/Node.hh> 31 #include <gazebo/transport/TransportIface.hh> 32 #include <gazebo/transport/TransportTypes.hh> 46 :
Thread(
"GazeboNodeThread",
Thread::OPMODE_WAITFORWAKEUP),
66 if (gazebo::transport::is_stopped()) {
67 gazebo::transport::init();
68 gazebo::transport::run();
75 gazebo::transport::NodePtr node(
new gazebo::transport::Node());
78 gazebonode_->Init(robot_channel.c_str());
82 gazebo_world_node_ = gazebo::transport::NodePtr(
new gazebo::transport::Node());
83 gazebo_world_node_->Init(world_name.c_str());
93 gazebo_world_node_->Fini();
94 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.