Beispiel #1
0
def start(opsoroapp):
    # Turn servo power off, init servos, update expression
    with Hardware.lock:
        Hardware.servo_disable()
        Hardware.servo_init()
        Hardware.servo_neutral()

    with Expression.lock:
        Expression.set_emotion(valence=0.0, arousal=0.0)
        Expression.update()

    # Start update thread
    global circumplex_t
    circumplex_t = StoppableThread(target=CircumplexLoop)
    circumplex_t.start()
Beispiel #2
0
def start(opsoroapp):
    global dof_positions
    dof_positions = {}

    # Apply overlay function
    for servo in Expression.servos:
        if servo.pin < 0 or servo.pin > 15:
            continue  # Skip invalid pins
        dof_positions[servo.dofname] = 0.0
        if servo.dofname in Expression.dofs:
            Expression.dofs[servo.dofname].overlays.append(overlay_fn)

    # Turn servo power off, init servos, update expression
    with Hardware.lock:
        Hardware.servo_disable()
        Hardware.servo_init()
        Hardware.servo_neutral()

    with Expression.lock:
        Expression.update()
Beispiel #3
0
def start(opsoroapp):
	# Apply overlay function
	for servo in Expression.servos:
		if servo.pin < 0 or servo.pin > 15:
			continue # Skip invalid pins
		dof_positions[servo.dofname] = 0.0

	# Turn servo power off, init servos, update expression
	with Hardware.lock:
		Hardware.servo_disable()
		Hardware.servo_init()
		Hardware.servo_neutral()

	with Expression.lock:
		Expression.set_emotion(valence=0.0, arousal=0.0)
		Expression.update()

	# Start update thread
	global socialscriptloop_t
	socialscriptloop_t = StoppableThread(target=SocialscriptLoop)
	socialscriptloop_t.start();