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

Timeout form waitFormessage

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

abhy gravatar image

Hello,

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?

abhy

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

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

Question Tools

Stats

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

Seen: 2,297 times

Last updated: Apr 06 '11