Page 1 of 1

Method to MATLAB workspace data

Posted: 06 Jun 2019, 16:07
by Jinhyeok
Hello, everyone. Sorry for asking multiple questions at a time.
For now, I'm trying to control a manipulator by adjusting joint torque/force as my final aim. (ex. computed torque method, time delay control)
To connect with my theoretical model with V-REP manipulator, I have some questions.

1. Is LUA script suitable to calculate some complex matrices?

2. If it is not, it would be better to save some workspace so that I just bring it without complex calculations. Therefore, I have thought of some approaches. 1) bring MATLAB workspace to LUA script, 2) use MATLAB remoteAPI (because I can use MATLAB workspace)
In case of 2), should I connect multiple MATLAB scripts to jointCallback function?
Sorry for an unorganized question since I'm trying to implement my jointCallback function for now.
And also thanks in advance for your help.

Sincerly, Jinhyeok.

Re: Method to MATLAB workspace data

Posted: 06 Jun 2019, 16:30
by fferri
Joint callbacks are called more often than child scripts. You'd be better off with Lua script.

Re: Method to MATLAB workspace data

Posted: 14 Jun 2019, 12:22
by coppelia
As a rule of thumb, do all low-level functionality and what needs to go fast inside V-REP (via Lua scripting, or by writing a V-REP plugin that exports specific C++ functions to be callable from Lua). All high-level functionality and what does not require frequent V-REP function calls, you can do it externally (e.g. in a ROS, remote API, BlueZero or other client).

Cheers