Main Page
Namespaces
Files
File List
File Members
mockups
testpkg_broken_install
script
sample_talker.py
Go to the documentation of this file.
1
# Taken from http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers
2
import
rospy
3
from
std_msgs.msg
import
String
4
5
pub = rospy.Publisher(
'spokenwords'
, String, queue_size=10)
6
rospy.init_node(
'node_name'
)
7
r = rospy.Rate(10)
# 10hz
8
while
not
rospy.is_shutdown():
9
pub.publish(
"hello world"
)
10
r.sleep()
industrial_ci
Author(s): Isaac I. Y. Saito, Mathias Lüdtke
autogenerated on Fri May 14 2021 02:55:15