How to subscribe a topic in action_client?
I am currently working on a action server for the turtlebot. The client needs to subscribe a node so that if the node generate a message the server will halt the action regardless the current action. I tried to do Void alarm(const stdmsgs::Float64& messageholder){ Ros::Subscriber alarm n.subscribe("Lidaralarm",1, alarm); } Lidar alarm is my node, and I wanted to subscribe the info to the callback function alarm so that I could call it when lidaralarm receives a number. However i couldn't do so. Anyone has an idea about how to solve this issue? Thank you.
Asked by mxl592 on 2017-02-19 21:02:48 UTC
Comments