def __init__(self, creds={}, recipients=[]): """ Default Constructor.""" self.language = 'el' self.askValidation = True self.waitOnAnswer = 5 self.rh = RappRobot() self.ch = RappPlatformAPI() self.emailCreds = {'username': '', 'password': ''} self.__load_email_credentials() if 'username' in creds: self.emailCreds['username'] = creds['username'] if 'password' in creds: self.emailCreds['password'] = creds['password'] print self.emailCreds if self.emailCreds['username'] == '' or self.emailCreds[ 'password'] == '': self.say( u'Δεν βρήκα καταχωρημένα τα στοιχεία λογαριασμού ηλεκτρονικού ταχυδρομίου. Παρακαλώ επικοινώνησε με την τεχνική υπηρεσια.' ) self.rh.humanoid_motion.goToPosture('Sit', 0.5) sys.exit(1) self.emailTitle = "NAO SendMail RApp" self.emailBody = "Hello I am NAO robot :)\n\n" + \ "This is an automated email that the user" + \ " requested to send among with the attachment files!\n\n" + \ "Robots are awesome!! :-)" self.recipients = recipients
def __init__(self): self.rh = RappRobot() # Use naoqi_brdge to move the head self.joint_pub = rospy.Publisher('/joint_angles', JointAnglesWithSpeed, queue_size=1) # NAO stands up self.rh.motion.enableMotors() self.rh.humanoid_motion.goToPosture("Stand", 0.7) self.lost_object_counter = 20 self.lock_motion = False self.hunt_initiated = False # These are the NAO body velocities. They are automatically published # in the self.set_velocities_callback self.x_vel = 0 self.y_vel = 0 self.theta_vel = 0 # Subscription to the TLD tracking alerts self.predator_sub = rospy.Subscriber("/vision/predator_alert", \ Polygon, self.track_bounding_box) # Timer callback to check if tracking has been lost rospy.Timer(rospy.Duration(0.1), self.lost_object_callback) # Callback to set the velocities periodically rospy.Timer(rospy.Duration(0.1), self.set_velocities_callback)
def __init__(self): """ Default Constructor.""" self.language = 'el' self.askValidation = True self.waitOnAnswer = 5 self.rh = RappRobot() self.ch = RappPlatformAPI() self._loc = self.ch.geolocation(Net.ipaddr_connected()) print '[*] Current Location: {0}'.format(self._loc)
def __init__(self, email_username, email_pass, recipients=[]): """ Default Constructor.""" self.language = 'el' self.askValidation = True self.waitOnAnswer = 5 self.rh = RappRobot() self.ch = RappPlatformAPI() self.emailUsername = email_username self.emailPass = email_pass self.emailTitle = "NAO SendMail RApp" self.emailBody = "Hello I am NAO robot :)\n\n" + \ "This is an automated email that the user" + \ " requested to send among with the attachment files!\n\n" + \ "Robots are awesome!! :-)" self.recipients = recipients
def __init__(self, cog_test): """ Constructor """ self.language = cog_test.language self.audioSource = Constants.AUDIO_SOURCE self.tempDir = Constants.TEMP_DIR self.cogTest = cog_test self.recordTime = 5 self.maxReruns = 3 self.askValidation = True self.rh = RappRobot() self.ch = RappPlatformAPI() self.performance = { 'correct_answers': 0, 'wrong_answers': 0, 'final_score': 0 } self.print_info()
#!/usr/bin/env python import time from rapp_robot_api import RappRobot rh = RappRobot() print rh.sensors.getBatteryLevels() print rh.sensors.getSonarsMeasurements() print rh.sensors.getTactileMeasurements(10.00, False)
def setUp(self): self.robot = RappRobot()
def setUp(self): self.robot = RappRobot() self.robot.audio.setVolume(10)
#!/usr/bin/env python import time import sys ################################# PORTABLE #################################### sys.path.append('../pynaoqi-python2.7-2.1.4.13-linux64') sys.path.append('python/abstract_classes') sys.path.append('python/implementations/nao_v4_naoqi2.1.4') from rapp_robot_api import RappRobot rh = RappRobot(ip="192.168.2.250", port="9559") rh.audio.setVolume(50) rh.audio.speak("Hello")