首页 > 解决方案 > google colab 连接 VREP 远程 api 失败

问题描述

我想使用 google colab 中的 python 远程 api 连接到 VREP。我尝试在 jupyter notebook 中运行下面的示例代码,它正在运行。但是,当我更改为 google colab 时,即使代码相同,远程 api 也无法连接到 VREP。

import vrep 

vrep.simxFinish(-1)
clientID = vrep.simxStart('127.0.0.1', 19997, True, True, 500, 5) 

if clientID != -1: # if we connected successfully
    print ('Connected to remote API server')
else:
    print('Fail to connect')

标签: google-colaboratory

解决方案


推荐阅读