19 from sr_utilities.hand_finder
import HandFinder
20 from unittest
import TestCase
22 PKG =
"sr_robot_commander" 27 Tests the Hand Commander 31 rospy.init_node(
'test_hand_commander', anonymous=
True)
36 self.assertEqual(hand_commander._strip_prefix(
"rh_ffj3"),
"ffj3", msg=
"Strip failed")
37 self.assertEqual(hand_commander._strip_prefix(
"ffj3"),
"ffj3", msg=
"Strip failed")
40 hand_finder = HandFinder()
41 hand_parameters = hand_finder.get_hand_parameters()
43 hand_serial=hand_parameters.mapping.keys()[0])
44 self.assertGreater(len(hand_commander.get_joints_position()), 0,
"No joints found, init must have failed.")
46 if __name__ ==
"__main__":
48 rostest.rosrun(PKG,
"test_hand_commander", TestSrHandCommander)
def test_strip_prefix(self)
def test_hand_finder_init(self)