test_hironx_ik_noinit.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- coding: utf-8 -*-
00003 
00004 PKG = 'hironx_ros_bridge'
00005 # rosbuild needs load_manifest
00006 try:
00007     import roslib
00008     import hironx_ros_bridge
00009 except:
00010     import roslib; roslib.load_manifest(PKG)
00011     import hironx_ros_bridge
00012 
00013 from hironx_ros_bridge import hironx_client as hironx
00014 
00015 import unittest
00016 class TestHiroIK(unittest.TestCase):
00017 
00018     @classmethod
00019     def setUpClass(self):
00020         self.robot = hironx.HIRONX()
00021         self.robot.init()
00022 
00023     # DO NOT CALL goInital anyware, this is what I want to test
00024     def assertTrue_333(self, ret):
00025         if self.robot.fk.ref.get_component_profile().version <= '315.3.1':
00026             return
00027         self.assertTrue(ret)
00028     def test_set_target_pose_relative_333(self): # https://github.com/start-jsk/rtmros_hironx/issues/333
00029         ret = self.robot.setTargetPoseRelative('larm', 'LARM_JOINT5', dz=0.01, tm=0.5)
00030         self.assertTrue_333(ret)
00031         ret = self.robot.setTargetPoseRelative('larm', 'LARM_JOINT5', dz=0, tm=0.5)
00032         self.assertTrue_333(ret)
00033 
00034 # for debug
00035 # $ python -m unittest test_hironx_ik.TestHiroIK.test_set_target_pose
00036 #
00037 if __name__ == '__main__':
00038     import rostest
00039     rostest.rosrun(PKG, 'test_hronx_ik_no_init', TestHiroIK) 


hironx_ros_bridge
Author(s): Kei Okada
autogenerated on Sun Sep 13 2015 23:21:39