test_contact_sensor.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import rospy
00004 from std_msgs.msg import Header
00005 from jsk_recognition_msgs.msg import ContactSensor, ContactSensorArray
00006 from geometry_msgs.msg import Pose
00007 
00008 if __name__ == '__main__':
00009     rospy.init_node('test_contact_sensor')
00010     contact_sensor_array_pub = rospy.Publisher('contact_sensors_in', ContactSensorArray, latch=True)
00011     r = rospy.Rate(10)
00012     while not rospy.is_shutdown():
00013         msg = ContactSensorArray()
00014         msg.header = Header(frame_id="/gazebo_world", stamp=rospy.Time.now())
00015         nil_link_sensor = ContactSensor(header=Header(frame_id="/gazebo_world", stamp=rospy.Time.now()), contact=False, link_name='nil_link')
00016         msg.datas = [nil_link_sensor]
00017         contact_sensor_array_pub.publish(msg)
00018         r.sleep()
00019 


jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Sun Oct 8 2017 02:43:50