What does `rospy.wait_for_message('/scan', LaserScan)` mean? [closed]
Hello, I'm new in ROS melodic of Ubuntu 18.04.
I'm planning to use rospy.wait_for_message
instead of callback function of rospy.Subscriber
.
As far as I know, either could get a topic message, so I have a feeling that I can make something functional codes like I've used callback function.
But I've ever gotten advice that adopting rospy.wait_for_message
is not so much efficient idea.
Although, I also asked why already, I don't have gotten the appropriate answer so far.
Just so you know, I'll declare 2 different rospy.wait_for_message
and once I get them.
If anyone can explain to me why choosing rospy.wait_for_message
is not desirable, would you please give me advice?
Thanks in advance. :)
Duplicate of #q345674. If your previous question hasn't been fully answer please edit it to provide more information and precise what you are still missing.