remote API和regular API 的区别

问题:
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).

总而言之,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).

区别:
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 调用默认情况下是异步的。
这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值