CoppeliaSim <<
Previous Next >> Google + Domain API
Remote API
CoppeliaSim 下的 Remote API 設定
Python 用戶使用 CoppeliaSim 下的 Remote API 需先檢查以下內容:
To use the remote API functionality in your Python script, you will need following 3 items:
要在你的 Python script 中使用 remote API 功能,你將需要以下三項:
- sim.py
- simConst.py
- remoteApi.dll, remoteApi.dylib or remoteApi.so (depending on your target platform)
Above files are located in CoppeliaSim's installation directory, under programming/remoteApiBindings/python. You might have to build the remoteApi shared library yourself (using remoteApiSharedLib.vcproj or makefile) if not already built. In that case, make sure you have defined NON_MATLAB_PARSING and MAX_EXT_API_CONNECTIONS=255 (and optionally DO_NOT_USE_SHARED_MEMORY) as a preprocessor definition.
上面的文件位於CoppeliaSim的安裝目錄下,位於programming / remoteApiBindings / python下。如果尚未構建remoteApi共享庫,則可能必須自己構建(使用remoteApiSharedLib.vcproj或makefile)。在這種情況下,請確保已將NON_MATLAB_PARSING和MAX_EXT_API_CONNECTIONS = 255(以及可選的DO_NOT_USE_SHARED_MEMORY)定義為預處理器定義。
Once you have above elements in a directory known to Python, call import sim to load the library. To enable the remote API on the client side (i.e. your application), call sim.simxStart. See the simpleTest.py script in the programming/remoteApiBindings/python directory for an example. This page lists and describes all supported Python remote API functions. CoppeliaSim remote API functions can easily be recognized from their "simx"-prefix.
將以上元素放在Python已知的目錄中後,請調用import sim加載庫。要在客戶端(即您的應用程序)上啟用遠程API,請調用sim.simxStart。有關示例,請參見programming / remoteApiBindings / python目錄中的simpleTest.py腳本。本頁列出並描述了所有受支持的Python遠程API函數。CoppeliaSim遠程API函數可以從其“ simx”前綴輕鬆識別。
CoppeliaSim <<
Previous Next >> Google + Domain API