Ejemplo n.º 1
0
 def _ros(self):
     """ ROS Interface, current options are rosHelper(stable) and rosMulti(incomplete) """
     # Wait to configure/initROS ROS till it's actually needed
     if self._rs == None:
         import rosHelper
         self._rs = rosHelper.ROS()
     return self._rs
Ejemplo n.º 2
0
 def __init__(self):
     self._ros = rosHelper.ROS()
     self._ros.configureROS(packageName='cob_map_pose')
     import tf, rospy
     self._rospy = rospy
     self._tf = tf
     self._ros.initROS()
     self._listener = None
Ejemplo n.º 3
0
 def __init__(self, robot=None):
     super(PoseUpdater, self).__init__()
     if robot == None:
         robot = CareOBot()
     self._robot = robot
     self._ros = rosHelper.ROS()
     self._sensors = Sensors().findSensors()
     self._channels = {}
     self._warned = []
Ejemplo n.º 4
0
    def __init__(self):
        self._ros = rosHelper.ROS()
        self._ros.configureROS(packageName='actionlib_interface')
        import actionlib, cob_script_server.msg
        self._ssMsgs = cob_script_server.msg

        self._ros.initROS()
        self._client = actionlib.SimpleActionClient('/script_server',
                                                    self._ssMsgs.ScriptAction)
        self._client.wait_for_server()
Ejemplo n.º 5
0
    def __init__(self):
        self._ros = rosHelper.ROS()
        self._ros.configureROS(packageName='accompany_user_tests_year2')
        import actionlib, accompany_user_tests_year2.msg
        self._ssMsgs = accompany_user_tests_year2.msg

        self._ros.initROS()
        self._client = actionlib.SimpleActionClient(
            '/unload_tray', self._ssMsgs.UnloadTrayAction)
        print "Waiting for unload_tray"
        self._client.wait_for_server()
        print "Connected to unload_tray"
Ejemplo n.º 6
0
    def __init__(self):
        self._ros = rosHelper.ROS()
        self._ros.configureROS(packageName='accompany_user_tests_year2')
        import actionlib, accompany_user_tests_year2.msg
        self._ssMsgs = accompany_user_tests_year2.msg

        self._ros.initROS()
        self._client = actionlib.SimpleActionClient(
            '/take_object_server', self._ssMsgs.TakeObjectShelfAction)
        print "Waiting for take_object_server"
        self._client.wait_for_server()
        print "Connected to take_object_server"
Ejemplo n.º 7
0
    def __init__(self):
        self._ros = rosHelper.ROS()
        self._ros.configureROS(packageName='actionlib_interface')
        import actionlib, cob_script_server.msg
        self._ssMsgs = cob_script_server.msg

        self._ros.initROS()
        self._doneState = actionlib.SimpleGoalState.DONE
        self._client = actionlib.SimpleActionClient('/script_server',
                                                    self._ssMsgs.ScriptAction)
        print "Waiting for script_server"
        self._client.wait_for_server()
        print "Connected to script_server"
Ejemplo n.º 8
0
    def run(self):
        #everthing inside here is run in a separate process space
        os.environ = rosHelper.ROS.parseRosBash('electric', False)
        rosHelper.ROS.configureROS(version=self._version,
                                   rosMaster=self._rosMaster,
                                   overlayPath=self._overlayPath)
        self._ros = rosHelper.ROS()
        while True:
            try:
                msg = self._pipe.recv()
            except EOFError:
                break

            try:
                func = getattr(self._ros, msg.funcName)
                ret = func(*(), **msg.kwargs)
            except Exception as e:
                ret = e
            self._pipe.send(ret)
Ejemplo n.º 9
0
    def __init__(self):
        import rosHelper
        self._ros = rosHelper.ROS()
        self._ros.configureROS(packageName='sf_controller')
        self._ros.configureROS(packageName='sf_lights')

        import actionlib, sf_controller_msgs.msg, sf_lights_msgs.msg
        self._sfMsgs = sf_controller_msgs.msg
        self._sfLights = sf_lights_msgs.msg

        self._ros.initROS()
        self._sfClient = actionlib.SimpleActionClient(
            '/sf_controller', self._sfMsgs.SunflowerAction)
        print "Waiting for sf_controller..."
        self._sfClient.wait_for_server()
        print "Connected to sf_controller"

        self._sfLight = actionlib.SimpleActionClient(
            '/lights', self._sfLights.LightsAction)
        print "Waiting for sf_lights..."
        self._sfLight.wait_for_server()
        print "Connected to sf_lights"
Ejemplo n.º 10
0
 def _ros(self):
     if self._rs == None:
         # Wait to configure/initROS ROS till it's actually needed
         self._rs = rosHelper.ROS()
     return self._rs
Ejemplo n.º 11
0
 def __init__(self):
     self._ros = rosHelper.ROS()
     self._ros.configureROS(packageName='cob_script_server')
     import simple_script_server
     self._ros.initROS()
     self._ss = simple_script_server.simple_script_server()