7 #include "ros_lib/std_msgs/String.h" 12 str_msg.data = msgdata;
24 std_msgs::String str_msg;
32 char* msg = (
char*) malloc(20 *
sizeof(
char));
36 sprintf(msg,
"[%d] Hello there!!", (
int) pros::c::millis());
37 loop(nh, chatter, str_msg, msg);
void publish(const boost::shared_ptr< M > &message) const
void loop(ros::NodeHandle &nh, ros::Publisher &p, std_msgs::String &str_msg, char *msgdata)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)