ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Timeout form waitFormessage

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

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 -0500

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

Question Tools


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

Seen: 2,262 times

Last updated: Apr 06 '11