23 from control_msgs.msg
import FollowJointTrajectoryAction, FollowJointTrajectoryResult
24 from move_base_msgs.msg
import MoveBaseAction, MoveBaseResult
25 from simple_script_server
import *
31 super(TestMove, self).
__init__(*args)
32 rospy.init_node(
'test_move')
49 if mode ==
None or mode ==
"" or mode ==
"omni":
50 as_name =
"/move_base" 52 as_name =
"/move_base_" + mode
54 self.as_server.start()
56 handle = sss.move(
"base",[0,0,0],mode=mode)
58 self.fail(
'Action Server not called. script server error_code: ' + str(handle.get_error_code()))
62 result = MoveBaseResult()
63 self.as_server.set_succeeded(result)
67 component_name =
"arm" 68 as_name =
"/" + component_name +
"/joint_trajectory_controller/follow_joint_trajectory" 70 self.as_server.start()
72 handle = sss.move(component_name,[[0,0,0,0,0,0,0]])
74 self.fail(
'Action Server not called. script server error_code: ' + str(handle.get_error_code()))
78 result = FollowJointTrajectoryResult()
79 self.as_server.set_succeeded(result)
81 if __name__ ==
'__main__':
83 rostest.rosrun(
'cob_script_server',
'move', TestMove)
def test_move_base_omni(self)
This test checks the correct call to commands from the cob_script_server.
def move_base(self, mode=None)
def test_move_base_diff(self)
Simple script server class.
def test_move_base_linear(self)