37 PKG =
'gazebo_plugins' 42 roslib.load_manifest(PKG)
45 import os, os.path, threading, time
48 from geometry_msgs.msg
import Pose
49 from geometry_msgs.msg
import Twist
50 from geometry_msgs.msg
import Wrench
51 from geometry_msgs.msg
import Vector3
52 from gazebo_msgs.msg
import ContactsState
53 from gazebo_msgs.msg
import ContactState
57 super(BumperTest, self).
__init__(*args)
83 self.
fz_sum += contacts_state.states[0].total_wrench.force.z
89 if abs(self.
fz_avg - 98.1) < 0.01:
90 print "z force ",self.
fz_avg 96 rospy.init_node(NAME, anonymous=
True)
103 rospy.stdinfo(
"Waiting for test to start at time [%s]"% self.
test_start_time)
109 start_t = time.time()
111 while not rospy.is_shutdown()
and not self.
success and time.time() < timeout_t:
116 if __name__ ==
'__main__':
117 print "Waiting for test to start at time " 118 rostest.run(PKG, sys.argv[0], BumperTest, sys.argv)
def bumperStateInput(self, contacts_state)