David Xiong
unread,May 1, 2013, 11:30:23 PM5/1/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ros-by-...@googlegroups.com
Hi all,
I downloaded the face_recognition demo and pi_tracker demo, and I want to combine the two which means that I want the turtlebot recognized me at first and move as I wish. However, it means that I must publish MSG to contract with pi_tracker after being recognized, so in the face_rec_client.cpp, I added the code: if(strcmp(feedback->names[0].c_str(),"David")==0)
{
ros::NodeHandle n1;
ros::Publisher chatter_pub = n1.advertise<std_msgs::String>("chatter1", 1000);
std_msgs::String msg;
std::stringstream ss;
ss << "You are Master!";'t
msg.data = ss.str();
ROS_INFO("%s", msg.data.c_str());
chatter_pub.publish(msg);
}, which means that if the turtlebot recognized me(David), it should publish a msg on topic "chatter1" as well as ROS_INFO the msg. NOW, THE QUESTION IS: it does print "You are Master" on screen, but I can't get it on topic "chatter1". so I think maybe I didn't publish the msg in the right way. anybody could help me? Thanks?