import os
import json
import poppytools
configfile = os.path.join(os.path.dirname(poppytools.__file__),
'configuration', 'poppy_config.json')
with open(configfile) as f:
poppy_config = json.load(f)
from pypot.vrep import from_vrep
scene_path = 'poppy-sitting.ttt'
poppy = from_vrep(poppy_config, '127.0.0.1', 19997, scene_path)
poppy.start_sync()
from poppytools.primitive.walking import WalkingGaitFromMat
cpg_filename = os.path.join(os.path.dirname(poppytools.__file__), 'behavior', 'IROS_Normal_Gait.mat')
walk = WalkingGaitFromMat(poppy, cpg_filename)
walk.start()
walk.stop()
poppy.reset_simulation()