38 from naoqi
import (ALBroker, ALProxy, ALModule)
40 from std_srvs.srv import( Empty, EmptyResponse )
44 NODE_NAME =
"nao_alife" 49 NaoqiNode.__init__( self, self.
NODE_NAME )
50 if self.
get_version() < distutils.version.LooseVersion(
'2.0'):
51 rospy.logwarn(
"{} is only available on NaoQi version 2.0 or higher, your version is {}".format(self.
NODE_NAME, self.
get_version()))
65 self.proxy.setState( state )
66 except Exception
as e:
67 rospy.logwarn(
"Could not transit from " + self.proxy.getState() +
" to " + state)
69 return EmptyResponse()
80 if __name__ ==
'__main__':
82 rospy.loginfo( node.NODE_NAME +
" running..." )
84 rospy.loginfo( node.NODE_NAME +
" stopped." )
def disabled(self, request=None)
def solitary(self, request=None)
def safeguard(self, request=None)
def setstate(self, state)
def interactive(self, request=None)
def get_proxy(self, name, warn=True)