send_message.py
Go to the documentation of this file.
1 import rospy
2 from sensor_msgs.msg import Range
3 
4 rospy.init_node('sender')
5 r = Range()
6 
7 r.header.frame_id = '/base_laser_link'
8 r.field_of_view = 25*3.14/180
9 r.max_range = 100
10 r.range = 1
11 
12 pub = rospy.Publisher('/sonar', Range)
13 
14 while not rospy.is_shutdown():
15  r.header.stamp = rospy.Time.now()
16  pub.publish(r)
17 
18  rospy.sleep(5)


range_sensor_layer
Author(s): David!!
autogenerated on Thu Mar 4 2021 04:02:55