Building remoteApi bindings for Octave 4.0

Report crashes, strange behaviour, or apparent bugs
maacruz
Posts: 2
Joined: 01 Nov 2015, 16:54

Building remoteApi bindings for Octave 4.0

Postby maacruz » 02 Nov 2015, 10:33

Hi,
I'm trying to build the remote Api bindings with Octave 4.0.0, but the compilation fails with errors:

remApi.cc: In function ‘octave_value_list FsimxCopyPasteObjects(const octave_value_list&, int)’:
remApi.cc:442:41: error: no matching function for call to ‘intNDArray<octave_int<int> >::resize(simxInt&)’
newHandles.resize(newObjectCount);
^
...

coppelia
Site Admin
Posts: 5728
Joined: 14 Dec 2012, 00:25

Re: Building remoteApi bindings for Octave 4.0

Postby coppelia » 02 Nov 2015, 10:37

Hello,

what version of V-REP are you using?

Cheers

maacruz
Posts: 2
Joined: 01 Nov 2015, 16:54

Re: Building remoteApi bindings for Octave 4.0

Postby maacruz » 02 Nov 2015, 11:24

coppelia wrote:Hello,

what version of V-REP are you using?

Cheers

The latest available, V-REP PRO EDU 3.2.2

Regards.

coppelia
Site Admin
Posts: 5728
Joined: 14 Dec 2012, 00:25

Re: Building remoteApi bindings for Octave 4.0

Postby coppelia » 03 Nov 2015, 10:57

Hello,

we are still with version 3.6.4, and wanna keep it still a while like that. So it seems that some compatibility broke.
Maybe we can find a workaround that also works with current and future versions of Octave.

The first thing that is strange is that int32NDArray::resize is used at other locations with the same arguments, but those weren't reported as errors. Can you try to comment out the incriminating line and see if it compiles fine? If it compiles fine, that function will however crash, but this is just a quick test.

Cheers

Max O'Lydian
Posts: 5
Joined: 09 Feb 2016, 13:19

Re: Building remoteApi bindings for Octave 4.0

Postby Max O'Lydian » 09 Feb 2016, 16:44

I also have Octave 4.0.0 and V-REP PRO EDU 3.2.3 (rev 4), and I am trying to get the remote API functions working. Have you made any progress on this?

I'm trying to rebuild because trying to run simpleTest.m results in the following error:

Code: Select all

error: simpleTest: could not find library or dependents: C:\remApi.oct
error: called from
    simpleTest at line 31 column 2


remApi.oct is located in C:\. I put it there because I wasn't sure if I had problems finding it, but it must be ok because I get different errors if I remove it from C:\.

If I check dependencies on remApi.oct, I get the following:

Code: Select all

Dump of file c:\remapi.oct

File Type: DLL

  Image has the following dependents:

    WINMM.dll
    WS2_32.dll
    vc100-liboctinterp-1.dll
    vc100-liboctave-1.dll
    MSVCR100.dll
    MSVCP100.dll
    KERNEL32.dll


I have not been able to find vc100-liboctinterp-1.dll nor vc100-liboctave-1.dll (neither on my system nor via Google), and thought perhaps rebuilding might generate them- but I'm thinking I might need to recompile Octave, not just remApi.oct.

Also, while trying to buildWin.m, there are a *lot* of other errors besides

Code: Select all

remApi.cc:442:41: error: no matching function for call to ‘intNDArray<octave_int<int> >::resize(simxInt&)’

Among them are a slew of deprecated function calls:

Code: Select all

remApi.cc:164:35: warning: 'octave_value::octave_value(const charNDArray&, bool, char)' is deprecated (declared at
D:\Octave\Octave-4.0.0\include\octave-4.0.0\octave\../octave/ov.h:248) [-Wdeprecated-declarations]
  ret = octave_value(test,true,'\'');


I'll post more if I uncover anything else- in the meantime, maybe these clues will help others move forward...

Max O'Lydian
Posts: 5
Joined: 09 Feb 2016, 13:19

Re: Building remoteApi bindings for Octave 4.0

Postby Max O'Lydian » 09 Feb 2016, 17:42

A little more progress...

I found liboctave-3.dll and liboctinterp-3.dll in my Octave-4.0.0 directory. I'm assuming these are the 4.0 versions of the dependencies baked into remApi.oct.

Knowing it was doomed to fail, I nonetheless copied and renamed these files to vc100-XXX-1.dll to match the remApi.dll dependencies. Sure enough, it failed, but this time not complaining about "could not find library or dependents". This time I got "library open failed: C:\remApi.oct".

So I'm on the right track at least- and I guess I've got a two options:
    1) Install Octave 3.6.4, which presumably has the correct DLLs.
    2) Continue to attempt rebuilding remApi.oct, to get it to use the Octave 4.0.0 DLLs.
At the moment, I just want to get V-REP talking to Octave, so I'm going to install Oct3.4.6. When I get some free time, I'll try getting remApi.oct built against the Oct4.0.0. If anybody else succeeds with 4.0.0, please share!

coppelia
Site Admin
Posts: 5728
Joined: 14 Dec 2012, 00:25

Re: Building remoteApi bindings for Octave 4.0

Postby coppelia » 10 Feb 2016, 08:21

Hello Max,

thanks for the input. We have checked the issue with Octave 4.0, and it seems one function(ality) is not supported anymore. We could however fix things for compilation. You can find the updated file here, which should be part of the next release of V-REP (beta out in 1-2 days).
Let me know if that work, or if there are other issues.

Cheers

Max O'Lydian
Posts: 5
Joined: 09 Feb 2016, 13:19

Re: Building remoteApi bindings for Octave 4.0

Postby Max O'Lydian » 10 Feb 2016, 14:52

That's good news! I'd prefer to use Oct 4.0.0 if possible, so I'll check it out and report my results.

I wound up installing Octave 3.4.6 (make sure it's the Visual Studio version [octave-3.6.4-vs2010-setup.exe]!) and had V-REP and Octave talking within 10 minutes. The only hitch was making sure they were both talking on the same port, but that wasn't hard to find.

Thanks for the help!

By the way- I learned of V-REP through the EdX.org course from ETH on Autonomous Robots. V-REP is incredible, I am thoroughly impressed! Keep up the good work!

Max O'Lydian
Posts: 5
Joined: 09 Feb 2016, 13:19

Re: Building remoteApi bindings for Octave 4.0

Postby Max O'Lydian » 14 Feb 2016, 21:08

Hello coppelia!

I made great progress with Octave 3.6.4 and V-REP, but now I'm working on an exercise that requires the "image" package for Octave, and that is only available for Octave 4.0 and greater- so I'm back to my original problem of getting remApi.oct rebuilt for Octave 4.0.

With the new remApi.cc file you linked to, I was able to build a new remApi.oct that worked for Octave 4.0, thank you! There were a few bumps in the road, but I got it done. The most troublesome was a compile error saying simxCallScriptFunction wasn't declared in scope. Apparently a new function introduced in the new remApi.cc file, it wasn't declared/defined in extApi as all the other functions were- I wound up commenting it out, and voila- remApi.oct gets built!

So, long story short- I've got V-REP communicating to Octave V4.0- thank you very much for your help!

You did also mention a new beta of V-REP was to be released- I haven't seen it yet. Actually, I looked for that before digging around in the compiler errors I mentioned above... has it been released? I looked on the main Coppelia site, but only saw regular releases- do you make betas available to the general public, or is it by invitation only?

Once again, a million thanks for what you've produced and made available to the educational community!

Max

coppelia
Site Admin
Posts: 5728
Joined: 14 Dec 2012, 00:25

Re: Building remoteApi bindings for Octave 4.0

Postby coppelia » 15 Feb 2016, 10:32

Hello Max,

you are right, you also had to modify the file remApiSetup.m.
The beta versions are usually advertised to all forum users, but you can also find a download page here.

Cheers


Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 7 guests