ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Timeout form waitFormessage

asked 2011-04-06 01:31:40 -0600

abhy gravatar image


I have a logic like below to read topic

ar_pose::ARMarkersConstPtr msg_mark = ros::topic::waitForMessage<ar_pose::armarkers>("ar_pose_marker");

Is there any way to time out waiting period if topic is not being published for a longer time?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-04-06 03:43:30 -0600

KoenBuys gravatar image

You can find this on the API, you can specify a time-out as follow:

 waitForMessage (const std::string &topic, ros::Duration timeout)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-04-06 01:31:40 -0600

Seen: 2,173 times

Last updated: Apr 06 '11