import math, time, random import pepper_interface IP = "192.168.0.147" PORT = 9559 simulation = False with pepper_interface.get(IP, PORT, simulation) as pepper: left_joints = pepper.arms.get_joints(True) right_joints = pepper.arms.get_joints(False) left_posture = {joint: 0.0 for joint in left_joints} right_posture = {joint: 0.0 for joint in right_joints} pepper.arms.set(True, left_posture, velocity=0.4) pepper.arms.set(False, right_posture, velocity=0.4) # waiting while left arm active while pepper.arms.running(True): time.sleep(0.01) # waiting while right arm active while pepper.arms.running(False): time.sleep(0.01)
import math, time, random import pepper_interface IP = "192.168.0.147" PORT = 9559 simulation = False publish = True with pepper_interface.get(IP, PORT, simulation, publish=publish) as pepper: time.sleep(60)
import math, time, random import pepper_interface IP = "192.168.0.147" PORT = 9559 simulation = False posture = { 'RShoulderRoll': -0.33133983612060547, 'RWristYaw': 0.8620660305023193, 'RElbowRoll': 0.9035146236419678, 'RElbowYaw': 0.5077476501464844, 'RShoulderPitch': 0.38042736053466797 } with pepper_interface.get(IP, PORT, simulation, stop=False) as pepper: target_time = time.time() + 5.0 pepper.arms.set(False, posture, target_time=target_time) time.sleep(6.0)
import math,time,random import pepper_interface import sys IP = "192.168.0.147" PORT = 9559 simulation = False # this will make sure camera ir is published camera_calibration=True publish = True with pepper_interface.get(IP,PORT, simulation, publish=publish, camera_calibration=camera_calibration) as pepper: running = True while running: try : time.sleep(0.1) except KeyboardInterrupt : running=False