Print out the contents of a string using ROS_INFO
Hi all,
I have a line such as:
std_msgs::String s;
s.data = c.c_str(); //same data as above.
pthread_mutex_lock(&send_CS);
tum_ardrone_pub.publish(s);
pthread_mutex_unlock(&send_CS);
What I would like to do is look at the contents of s that is passed into the method publish(). I tried something like:
ROS_INFO("(2) (%s) \n",s.c_str());
But that failed at compile time. Thanks!