One thing I can't see to do offhand is open a scene into V-REP. Here's script I guessed at:
Code: Select all
from pyrep import VRep
from pyrep.vrep.vrep import simxLoadScene
from pyrep.vrep import vrep as v
from pyrep.common import ReturnCommandError
class sceneloader:
def __init__(self, api: VRep):
self._api = api
self._def_op_mode = v.simx_opmode_oneshot_wait
self.id = api._id
def loadScene(self,path):
clientID=self.id
res = simxLoadScene(clientID, path, 0xFF, self._def_op_mode)
print(res)
if res != v.simx_return_ok:
raise ReturnCommandError(res)
scene='/vagrant/scenes/Pioneer.ttt'
with VRep.connect("127.0.0.1", 19997) as api:
r=sceneloader(api)
r.loadScene(scene)