28 from std_msgs.msg
import Bool
29 from geometry_msgs.msg
import Twist
31 from rate_publishers
import RatePublishers, TimeoutManager
35 Returns a Twist for the given linear and rotation speed. 87 return rospy.wait_for_message(
'cmd_vel_out', Twist,
93 self.fail(
'twist_mux should not be publishing without any input')
94 except rospy.ROSException:
99 self.
_vel1.pub(t, rate=5)
100 self.assertEqual(t, self.
_vel_cmd())
107 self.
_vel1.pub(t1, rate=5)
108 self.assertEqual(t1, self.
_vel_cmd())
112 self.
_vel3.pub(t2, rate=10)
113 self.assertEqual(t2, self.
_vel_cmd())
119 self.assertEqual(t1, self.
_vel_cmd())
123 if __name__ ==
'__main__':
125 PKG_NAME =
'twist_mux' 126 TEST_NAME =
'%s_system_blackbox_test' % PKG_NAME
127 rospy.init_node(TEST_NAME)
128 rostest.rosrun(PKG_NAME, TEST_NAME, TestTwistMux)
def test_basic_with_priorities(self)