Why Publisher publish a message but Subscriber callback recieves a pointer of message?
I wonder why publisher publish a message. EX:
chatter_pub.publish(msg)
But the Subscriber CallBack function has a argument of pointer of msg. EX:
void chatterCallback(const std_msgs::String::ConstPtr& msg)
Link of above code: http://wiki.ros.org/roscpp_tutorials/...
I've changed
mess
tomessage
, as "a mess" is something completely different and rather confusing.When I first read your question title I assumed you had a problem with data corruption.
oh sorry for my bad english.Message is really the word i want to say. Thank you.
No problem.