Gazebo | Ignition | Community
Ask Your Question
0

HAPTIX limb API crashes MATLAB

asked 2015-09-30 13:11:31 -0500

doctorroboto gravatar image

updated 2015-09-30 15:39:06 -0500

I'm using a non-standard computer configuration - a different box running Gazebo than what was given to the performer teams, able to run Gazebo just fine, and then my laptop running MATLAB and Motive in Windows 7. I can run the C++ API from within Linux just fine, and drive the virtual limb sinusoidally as in the example. However, when I try running the MATLAB version of this from my Win7 machine, MATLAB immediately crashes. It gives some reference to the fact that this happens when MEX files are used.

I'm running Handsim 0.8.3, and Windows SDK 0.7.2. The problem, I suspect, is that the MEX file was built for different computer configurations, and I don't think I have a way to build my own version of the MEX file specific to the Windows compiler / .NET / Visual C++ Redistributable packages I have on my machine.

I should also add that the Octave scripts also work fine in Linux. So something is broken on either the Windows machine, or the means of talking to the Linux machine. I can connect Motive from my Windows box and stream that data over to the Linux box no problem, so I don't think it's the connection between the two that's the issue.

edit retag flag offensive close merge delete

Comments

Can you post the version of Matlab used in both scenarios? Thanks.

hsu gravatar imagehsu ( 2015-10-02 16:06:58 -0500 )edit

I'm using R2015a, but could upgrade to 2015b if you like.

doctorroboto gravatar imagedoctorroboto ( 2015-10-06 13:47:45 -0500 )edit

which version of Visual Studio are you using? Current SDK works only with VS 2013.

hsu gravatar imagehsu ( 2015-10-12 21:27:36 -0500 )edit

VS2015 - whatever the current one is that you can download.

doctorroboto gravatar imagedoctorroboto ( 2015-10-12 21:29:02 -0500 )edit

So I should try to roll back to VS2013, and that will potentially resolve this? What does VS2013 have to do with the MATLAB MEX file? I didn't compile anything, just using the files that OSRF provided. Seems like it's less dependent on VS20xx, and more dependent on Visual C++ Redistributable, or something along those lines.

doctorroboto gravatar imagedoctorroboto ( 2015-10-20 16:06:09 -0500 )edit

Rolled back to VS2013. Not having much luck. Question about the steps in the tutorial that are unclear - am I supposed to set up an IGN_IP and IGN_PARTITION parameters on both my Windows machine and the Linux machine running Gazebo? I assumed I was supposed to do this, but the language on the tutorial page indicates that I'm only supposed to do this on the Windows machine if using that, or the local Linux machine if using that for the API.

doctorroboto gravatar imagedoctorroboto ( 2015-10-21 14:40:57 -0500 )edit

I don't know what the problem was, but it seems to be working all of a sudden. Could be a whole bunch of different things - deleted my entire MATLAB appdata folder, moved to VS2013, checked out the MATLAB license so I'm not running on a license server, reinstalled VC++ redist a few times. So I have no idea what fixed this.

doctorroboto gravatar imagedoctorroboto ( 2015-10-21 15:35:49 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-10-12 19:41:15 -0500

Carlos Agüero gravatar image

The MEX requires MATLAB 2014b or newer. I tried with MATLAB 2015b and managed to run successfully the hx_matlab_controller.

Did you setup the IGN_PARTITION environment variable? Both Linux and Windows should agree on the value of this environment variable.

Do you have the Windows firewall enabled? Our recommendation is to disable it.

edit flag offensive delete link more

Comments

I set up the environment variable, which I know is set up because I can send commands from Motive to the Linux machine. Not sure about the firewall. But John made it sound like I needed a new MEX file.

doctorroboto gravatar imagedoctorroboto ( 2015-10-12 21:29:40 -0500 )edit

I stand corrected, the released MEX files should work with Matlab 2015b as is.

hsu gravatar imagehsu ( 2015-10-21 16:31:33 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-09-30 13:11:31 -0500

Seen: 213 times

Last updated: Oct 12 '15