00001
00002
00003
00004 from test_hironx import *
00005
00006 class TestHiroController(TestHiro):
00007
00008
00009 def test_impedance_controller(self):
00010 if not self.robot.ic or self.robot.ic.ref.get_component_profile().version < '315.3.0':
00011 self.assertTrue(True)
00012 return True
00013
00014 self.robot.goInitial(tm=1)
00015 ret = self.robot.startImpedance('rarm')
00016
00017 ret = self.robot.seq_svc.setWrenches([0,0,0,0,0,0,
00018 10,0,0,0,0,0,], 2.0);
00019
00020 self.robot.seq_svc.waitInterpolation();
00021 ret = self.robot.seq_svc.setWrenches([0,0,0,0,0,0,
00022 0,0,0,0,0,0,], 2.0);
00023
00024 self.robot.seq_svc.waitInterpolation();
00025 ret = self.robot.seq_svc.setWrenches([0,0,0,0,0,0,
00026 0,10,0,0,0,0,], 2.0);
00027
00028 self.robot.seq_svc.waitInterpolation();
00029 ret = self.robot.seq_svc.setWrenches([0,0,0,0,0,0,
00030 0,0,0,0,0,0,], 2.0);
00031
00032 self.robot.seq_svc.waitInterpolation();
00033 ret = self.robot.seq_svc.setWrenches([0,0,0,0,0,0,
00034 0,0,10,0,0,0,], 2.0);
00035
00036 self.robot.seq_svc.waitInterpolation();
00037
00038 ret = self.robot.stopImpedance('rarm')
00039
00040 self.assertTrue(True)
00041
00042
00043 if __name__ == '__main__':
00044 import rostest
00045 rostest.rosrun(PKG, 'test_hronx_controller', TestHiroController)