Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setUp(self):
self.jr = PoppyErgoJr(simulator='poppy-simu')
def setUp(self):
self.jr = PoppyErgoJr(simulator='poppy-simu', use_snap=True)
self.base_url = 'http://127.0.0.1:6969'
def test_lowerlimit_correctly_setup(self):
self.jr = PoppyErgoJr(simulator='poppy-simu')
self.jr.close()
# TODO: We should also make a unit test with a real/vrep robot.
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()