4 from actionlib
import SimpleActionServer, SimpleActionClient
6 from nodelet.srv
import NodeletLoad, NodeletUnload
7 from stdr_msgs.msg
import SpawnRobotAction, SpawnRobotResult
8 from stdr_msgs.msg
import RegisterRobotAction, RegisterRobotGoal
9 from stdr_msgs.srv
import MoveRobot, MoveRobotResponse
24 self.register_robot_client.wait_for_server()
29 rospy.loginfo(
'Requested new robot')
31 req_thread = threading.Thread(target=self.
register_robot, args=(request.name,))
36 rospy.loginfo(
'Request to delete "%s"' % request.name)
37 self.move_service.shutdown()
42 rospy.loginfo(
'Register "%s" to server' % name)
43 register_goal = RegisterRobotGoal()
44 register_goal.name = name
45 self.register_robot_client.send_goal(register_goal)
52 rospy.loginfo(
'Request to move %s' % self.
name)
53 return MoveRobotResponse()
55 if __name__ ==
'__main__':
56 rospy.init_node(
'mock_robot', anonymous=
True)
def register_robot(self, name)
def move_robot(self, req)
def load_nodelet_cb(self, request)
def unload_nodelet_cb(self, request)