robotology-legacy / mex-wholebodymodel

Matlab MEX interface to the iWholeBodyModel interface.
11 stars 9 forks source link

WBM-Class is ready for merging into the master #61

Closed Ganimed closed 7 years ago

Ganimed commented 8 years ago

Hi all,

I want to announce that the new WBM-Class branch is ready for merging into the master. This new wrapper-structure can be considered as the next generation for the mex-WBM.

What is new there:

What is still missing:

(Both will be done after Christmas.)

To check:

One open bug:

There is still one bug during the initialization process, which I'm not able to remove in Linux. This error happens also in the Matlab-files of Naveen. Im using Linux Mint 17.3 Rosa and I tested it under Matlab R2014b and R2015b. I get the same error in both versions. I don't know if the error is also under MacOS and MS-Windows. We have to check it. The error happens when wbm_modelInitialise(); is called in the optimized mode. If no name is set then the function should normally read the default robot name from environment variable YARP_ROBOT_NAME. But it doesn't do it under Linux and I get the following error message:

...
[ERROR]yarpWholeBodyModel: robot option not found 
WBI unable to initialise (usually means unable to connect to chosen robot)
...

I have also checked my configuration and the environment variables under ~/.profile. I have everything set what was given in the install instruction. Do I still miss something?

Here is the excerpt of my configuration in .profile:

# Environment variables for the CoDyCo-Superbuild project:
export CODYCO_SUPERBUILD_ROOT=/home/ganymed/Library/codyco-superbuild
export PATH=$PATH:$CODYCO_SUPERBUILD_ROOT/build/install/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CODYCO_SUPERBUILD_ROOT/build/install/lib
export YARP_DATA_DIRS=$YARP_DATA_DIRS:$CODYCO_SUPERBUILD_ROOT/build/install/share/codyco
# environmental variable for the WBI-Toolbox:
export YARP_ROBOT_NAME="icubGazeboSim"

In my repository I have made a temporary file under matlab-src/tests, called _timeTest2.m, to reproduce the error without changing other files. There I have deactivated the normal method wbm_modelInitialise('icubGazeboSim'); and replaced it with wbm_modelInitialise();. Please feel free to test it also under your OS, to see if you are getting the same error as me. Thanks.

P.S. By the way, if we don't see us, I wish you a merry Christmas and a Happy New Year!

Ganimed commented 8 years ago

Before I forget, I have two files adapted to the new structure. One as an example and the other for time-benchmarking. They are stored under +WBM/test and +WBM/examples. The speed of the classes depends on the CPU of the computer and from the used Matlab-version. I optimized what I could. But since Matlab is a script-language, I want to note, that the parser needs always a bit more time for interpreting a class-structure than a single function file. So for time-critical computations it is better to use the methods of Naveen.

To see how the new WBM-package is structured, there is a folder called UML. There you will find a PDF-file with an UML diagram.

naveenoid commented 8 years ago

I think this whole issue needs to be tracked from here : https://github.com/robotology/mex-wholebodymodel/pull/62

Ganimed commented 8 years ago

:+1: