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