remote API和regular API 的区别

 2023-09-18 阅读 14 评论 0

摘要:问题: socket 阻塞 非阻塞 同步 异步 verp remote API和regular API 的区别 remote API 什么是remote API: V-REP offers a remote API allowing to control a simulation (or the simulator itself) from an external application or a remote hardware (e.g.

问题:
socket 阻塞 非阻塞 同步 异步 verp

remote API和regular API 的区别

remote API

什么是remote API:
V-REP offers a remote API allowing to control a simulation (or the simulator itself) from an external
application or a remote hardware (e.g. real robot, remote computer, etc.). The V-REP remote API is
composed by approximately one hundred specific functions and one generic function, that can be called
from a C/C++ application, a Python script, a Java application, a Matlab/Octave program, or a Lua script.
The remote API functions are interacting with V-REP via socket communication (or, optionally, via shared
memory) in a way that reduces lag and network load to a great extent. All this happens in a hidden fashion
to the user. The remote API can let one or several external applications interact with V-REP in a
synchronous* or asynchronous* way (asynchronous by default), and even remote control of the simulator
is supported (e.g. remotely loading a scene, starting, pausing or stopping a simulation for instance).

regular线和life线区别。总而言之,remote API 可以通过socket来控制仿真,控制verp里的机器人。

作为客户端:
the client side (i.e. your application): the remote API on the client side is available for many
different programming languages. Currently following languages are supported: C/C++, Python, Java,
Matlab, Octave and Lua. Bindings for other languages can easily be created by yourself. Instructions on
how to enable the remote API on the client side are given here(例子).
作为服务器端:
the server side (i.e. V-REP): the remote API on the server side is implemented via a V-REP
plugin that should be loaded by V-REP by default: v_repExtRemoteApi.dll, libv_repExtRemoteApi.dylib
or libv_repExtRemoteApi.so. The plugin project files are located here. Instructions on how to enabled
the remote API on the server side are given here(例子).

regular API

The regular API is composed by several hundreds of functions that can be called from a C/C++ application
(plugin or main client application), or an embedded script. V-REP functions and constants can easily be
recognized from their “sim”- or “_sim”-prefix (e.g. sim.handleCollision).

api json、区别:
1.regular API命名规则
- Lua写的 前缀是 sim.,后面的命名要小写例如sim.getReferencedHandles (Lua)
- c/c++写的前缀是 sim,后面的命名要大写例如simGetReferencedHandles(c/c++)
这里写图片描述
2.remote API命名规则
前缀是simx,后面的命名要大写例如simxGetObjectQuaternion,编写语言支持c、c++,python,lua,matlab,java

Remote API modus operandi

remote API的操作模式具体还是要看文档。主要由于它是socket。所以它涉及了阻塞,费阻塞,同步,异步等内容。
Remote API function 调用默认情况下是异步的。
这里写图片描述

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/3/75822.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息