ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The easier way to get a single message is this:
msg = rospy.wait_for_message("my_topic", MyType)
This returns the message, and shuts down after receiving one message. You can specify a timeout as the third argument.
2 | No.2 Revision |
The easier An easy way to get a single message is this:
msg = rospy.wait_for_message("my_topic", MyType)
This returns the message, and shuts down after receiving one message. You can specify a timeout as the third argument.argument. It also doesn't require using a global.