使用vrep-api-pythonPython包装器来处理V-REP robot simulator时,我正在尝试(但失败了)使用包装的^{
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)
但它只是抛出一个服务器错误?在
目前没有回答
相关问题 更多 >
编程相关推荐