42 from nextage_ros_bridge
import nextage_client
44 _GOINITIAL_TIME_MIDSPEED = 3
45 _PKG =
'nextage_ros_bridge' 50 Test NextageClient with rostest. This does NOT test hardware (i.e. if DIO 51 is connected and functioning); instead, this only verifies if the 52 software works as to the given hardware spec. 54 For tests involving hardware, follow 55 https://github.com/start-jsk/rtmros_hironx/issues/272. 60 cls.
_robot = nextage_client.NextageClient()
62 cls._robot.goInitial(_GOINITIAL_TIME_MIDSPEED)
66 cls._robot_04.set_hand_version(version=cls._robot_04.HAND_VER_0_4_2)
68 cls._robot_04.goInitial(_GOINITIAL_TIME_MIDSPEED)
71 result = self._robot._hands.gripper_l_close()
72 result = self._robot_04.gripper_l_close()
and result
73 self.assertTrue(result)
76 result = self._robot._hands.gripper_r_close()
77 result = self._robot_04.gripper_r_close()
and result
78 self.assertTrue(result)
81 result = self._robot._hands.gripper_l_open()
82 result = self._robot_04.gripper_l_open()
and result
83 self.assertTrue(result)
86 result = self._robot._hands.gripper_r_open()
87 result = self._robot_04.gripper_r_open()
and result
88 self.assertTrue(result)
90 if __name__ ==
'__main__':
91 rostest.rosrun(_PKG,
'test_nxo_gripper', TestNxoGripper)
def test_gripper_l_close(self)
def test_gripper_r_open(self)
def test_gripper_l_open(self)
def test_gripper_r_close(self)