23 #include "talkerpub_thread.h" 26 #include <std_msgs/String.h> 38 :
Thread(
"ROSTalkerPubThread",
Thread::OPMODE_WAITFORWAKEUP),
53 __pub =
rosnode->advertise<std_msgs::String>(
"/chatter", 10);
70 msg.data = std::string(
"Hello world ") + t.
str();
const char * str(bool utc=false) const
Output function.
virtual ~ROSTalkerPubThread()
Destructor.
ROSTalkerPubThread()
Constructor.
Fawkes library namespace.
virtual void finalize()
Finalize the thread.
virtual void init()
Initialize the thread.
A class for handling time.
virtual void loop()
Code to execute in the thread.
Thread class encapsulation of pthreads.
Thread aspect to use blocked timing.
LockPtr< ros::NodeHandle > rosnode
Central ROS node handle.