How can I get data in a callback function
I have subscriber receive data from a topic. The message type is std_msgs::Bool. How can I access the data. I tried ".data" which didn't give me the content.
Do you want to recieve data in a callback function? Then try bool var = msg->Data;