test_contact_sensor.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import rospy
4 from std_msgs.msg import Header
5 from jsk_recognition_msgs.msg import ContactSensor, ContactSensorArray
6 from geometry_msgs.msg import Pose
7 
8 if __name__ == '__main__':
9  rospy.init_node('test_contact_sensor')
10  contact_sensor_array_pub = rospy.Publisher('contact_sensors_in', ContactSensorArray, latch=True)
11  r = rospy.Rate(10)
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)
18  r.sleep()
19 


jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Mon May 3 2021 03:03:47