4 from std_msgs.msg
import Header
8 if __name__ ==
'__main__':
9 rospy.init_node(
'test_contact_sensor')
10 contact_sensor_array_pub = rospy.Publisher(
'contact_sensors_in', ContactSensorArray, latch=
True)
12 while not rospy.is_shutdown():
13 msg = ContactSensorArray()
14 msg.header = Header(frame_id=
"/gazebo_world", stamp=rospy.Time.now())
15 nil_link_sensor = ContactSensor(header=Header(frame_id=
"/gazebo_world", stamp=rospy.Time.now()), contact=
False, link_name=
'nil_link')
16 msg.datas = [nil_link_sensor]
17 contact_sensor_array_pub.publish(msg)