Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import time
import numpy as np
from poppy.creatures import PoppyTorso
poppy = PoppyTorso(simulator='vrep')
delay_time = 1
target_delta = np.array([-0.15, 0, 0])
# Initialize the robot
for m in poppy.motors:
m.goto_position(0, 2)
# Left arm is compliant, right arm is active
for m in poppy.l_arm:
m.compliant = False
for m in poppy.r_arm:
m.compliant = False
# The torso itself must not be compliant
## Get the torso.
from poppy.creatures import PoppyTorso
from threading import Thread
from pypot.server.httpserver import HTTPRobotServer
torso = PoppyTorso()
server = HTTPRobotServer(torso, host='193.50.110.242', port=8080)
Thread(target=lambda: server.run(quiet=True, server='wsgiref')).start()
## Get the torso.
from poppy.creatures import PoppyTorso
from threading import Thread
from pypot.server.httpserver import HTTPRobotServer
torso = PoppyTorso()
server = HTTPRobotServer(torso, host='193.50.110.242', port=8080)
Thread(target=lambda: server.run(quiet=True, server='wsgiref')).start()