test_hironx_ik_noinit.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 PKG = 'hironx_ros_bridge'
5 # rosbuild needs load_manifest
6 try:
7  import roslib
8  import hironx_ros_bridge
9 except:
10  import roslib; roslib.load_manifest(PKG)
11  import hironx_ros_bridge
12 
13 from hironx_ros_bridge import hironx_client as hironx
14 
15 import unittest
16 class TestHiroIK(unittest.TestCase):
17 
18  @classmethod
19  def setUpClass(self):
20  self.robot = hironx.HIRONX()
21  self.robot.init()
22 
23  # DO NOT CALL goInital anyware, this is what I want to test
24  def assertTrue_333(self, ret):
25  if self.robot.fk.ref.get_component_profile().version <= '315.3.1':
26  return
27  self.assertTrue(ret)
28  def test_set_target_pose_relative_333(self): # https://github.com/start-jsk/rtmros_hironx/issues/333
29  ret = self.robot.setTargetPoseRelative('larm', 'LARM_JOINT5', dz=0.01, tm=0.5)
30  self.assertTrue_333(ret)
31  ret = self.robot.setTargetPoseRelative('larm', 'LARM_JOINT5', dz=0, tm=0.5)
32  self.assertTrue_333(ret)
33 
34 # for debug
35 # $ python -m unittest test_hironx_ik.TestHiroIK.test_set_target_pose
36 #
37 if __name__ == '__main__':
38  import rostest
39  rostest.rosrun(PKG, 'test_hronx_ik_no_init', TestHiroIK)


hironx_ros_bridge
Author(s): Kei Okada , Isaac I.Y. Saito
autogenerated on Thu May 14 2020 03:52:05