3 from __future__
import division
9 from sensor_msgs.msg
import JointState
10 from std_msgs.msg
import Bool
16 super(self.__class__, self).
__init__()
23 '~check_collision', CheckCollision)
24 self.
pub = rospy.Publisher(
'~output', Bool, queue_size=1)
25 self.
sub = rospy.Subscriber(
26 '~joint_states', JointState, self.
_joint_cb, queue_size=1)
28 rate = rospy.get_param(
'~request_rate', 1.0)
29 rospy.Timer(rospy.Duration(1 / rate), self.
_timer_cb)
39 req = CheckCollisionRequest()
43 self.
pub.publish(data=res.result)
46 if __name__ ==
'__main__':
47 rospy.init_node(
'sample_collision_detector_client')