Ask Your Question
0

Suspend execution of node until a message is received [closed]

asked 2017-05-22 11:55:23 -0500

jony gravatar image

Hi! As the title says I want to suspend the execution of my node (written in c++) until a message is received on a topic. There is some function in ros that do this? Thanks a lot

edit retag flag offensive reopen merge delete

Closed for the following reason Question does not follow our guidelines for questions. Please see: http://wiki.ros.org/Support for more details. by tfoote
close date 2018-07-09 13:56:10.568418

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-05-22 12:49:11 -0500

NEngelhard gravatar image

Could you be a bit more specific? This is rather the default behaviour of a ROS-node. You set up your subscribers (or action-servers) and call ros::spin(); This will let the node idle around until something is received.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-05-22 11:55:23 -0500

Seen: 264 times

Last updated: May 22 '17