Code Monkey home page Code Monkey logo

parametric_modeling's Introduction

The objective is to estimate the ineetial parameters like mass, center of mass & inertia matrx using icub left hand dataset. For more details refer to report of master thesis.

Package includes c++ code for parametric modeling using GURLS package. However first, Install GURLS package with necessary dependencies from https://github.com/LCSL/GURLS. More detail information can be found on GURLS manual. In addition to GURLS you have to install other packages like ICUB, Yarp, kdl_codyco, orocos_kdl, iDynTree. 

iCub & Yarp installation can be found on http://wiki.icub.org/wiki/Linux:Installation_from_sources

kdl_codyco package installation https://github.com/traversaro/kdl_codyco

orocos_kdl package https://github.com/orocos/orocos_kinematics_dynamics/tree/master/orocos_kdl

iDynTree package installation https://github.com/robotology-playground/iDynTree

How to Install Parametric Modeling Package : 

Step 1 : Install all necessary packages & respective dependencies.

Step 2 : root to parametric modeling package version 0.1
	#### cd Parametric_Modeling/Version0.1 ####
Step 3 : make build directory 
	#### mkdir build ####
	#### cd build ####
Step 4 : Cmake
	#### ccmake../ ####
Step 5 : then make it	
	#### make ####
Step 6 : Run the code you want according to your choise for estimating parameters. 

	#### ./iCubParis02_simple_analysis --dataset ../Data_Sets/part1-left.csv --results results.csv #### 

Note : These tests were made on iCub left hand. some tests were made when new package were included for getting regularization parameter. There are certain options to change approach for getting $lambda$. Please go through the code for more details.



This package is simple extension of exisiting work showing the influence of ragularization parameter in estimating inertial parameters. 

Detail explaination of parametric modeling and theory behind this can be found from my thesis which is included in the package. 

Any problems with code or questions can be asked through email [email protected]

parametric_modeling's People

Contributors

chakon avatar

Stargazers

 avatar

Watchers

 avatar

parametric_modeling's Issues

Faulty results saving

After issuing the command:

./iCubParis02_simple_analysis --dataset ../../Data_Sets/part1-left.csv --results results.csv --xtrain ../../Data_Sets/Xtr_2psmall.txt --ytrain ../../Data_Sets/ytr_2psmall.txt 

The program was executed and the results stored in results.csv.

However, the content of results.csv may not be saved properly. This is the file content, which includes several NaNs. How should it be interpreted?

-nan,-nan,-nan,-nan,-nan,-nan,14.3552,-3.7024,-2.86709,0.223453,1.02526,-0.205156,-nan,-nan,-nan,-nan,-nan,-nan,14.3652,-3.66704,-2.86271,0.221296,1.02564,-0.203341,-nan,-nan,-nan,-nan,-nan,-nan,14.3861,-3.58752,-2.85829,0.216157,1.02557,-0.199272,-nan,-nan,-nan,-nan,-nan,-nan,14.4177,-3.48059,-2.83147,0.209381,1.02497,-0.193797,-nan,-nan,-nan,-nan,-nan,-nan,14.4694,-3.2802,-2.80688,0.19641,1.02344,-0.18354,-nan,-nan,-nan,-nan,-nan,-nan,14.4893,-3.21236,-2.78233,0.192061,1.02225,-0.180068,-nan,-nan,-nan,-nan,-nan,-nan,14.5535,-2.96845,-2.71763,0.176628,1.01936,-0.167566,-nan,-nan,-nan,-nan,-nan,-nan,14.5767,-2.87325,-2.69536,0.170671,1.01847,-0.162681,-nan,-nan,-nan,-nan,-nan,-nan,14.6392,-2.62884,-2.60436,0.155183,1.01292,-0.150147,-nan,-nan,-nan,-nan,-nan,-nan,14.705,-2.329,-2.51795,0.136538,1.00776,-0.134744,-nan,-nan,-nan,-nan,-nan,-nan,14.7384,-2.16127,-2.47174,0.126229,1.00503,-0.12612,-nan,-nan,-nan,-nan,-nan,-nan,14.7947,-1.83051,-2.40164,0.106172,1.00125,-0.109095,-nan,-nan,-nan,-nan,-nan,-nan,14.8497,-1.46336,-2.31202,0.0841438,0.996355,-0.0901846,-nan,-nan,-nan,-nan,-nan,-nan,14.8935,-1.11957,-2.22089,0.0636656,0.990688,-0.072467,-nan,-nan,-nan,-nan,-nan,-nan,14.9275,-0.795893,-2.13034,0.0444654,0.983272,-0.0557769,-nan,-nan,-nan,-nan,-nan,-nan,14.6074,-0.605329,-
[FILE IS TOO LONG --> TRUNCATED]

Wrong error measure used in test_for_lambda

hoperf is set to macroavg in test_for_lambda, which is not suitable for regression problems.

See program output:


kammo@kammo-Latitude-E5540:~/ICUB/Parametric_Modelling/Version0.1/build2$ ./test_for_lambda ../../Data_Sets/Xtr_2psmall.txt ../../Data_Sets/ytr_2psmall.txt
=========== Number of rows for training ============

rows of training :1405
============Number of rows displaye d ==============

Specified Task Sequence :
Sequence of size:2

# New task sequence...
[Task 0: split]: ho...  done.
[Task 1: paramsel]: loocvprimal...  done.

Save cycle...
[Task 0: split]: ho... saving
[Task 1: paramsel]: loocvprimal... saving

Saving opt in test_for_lambda.bin
lambda values:
[ 0.000143623 0.000143623 297.176 0.000143623 0.000143623 0.000143623 ]

final lambda value:0.000143623
================= Printing All ================

    [ Name ] = test_for_lambda
    [ calibfile ] = foo
    [ combineclasses ] = Pointer to the function <mean> whose signature is: T (_func)(T_, int)
    [ eig_percentage ] = 5
    [ epochs ] = 4
    _[ hoperf ] = macroavg_
    [ hoproportion ] = 0.2
    [ name ] = test_for_lambda
    [ nholdouts ] = 1
    [ nlambda ] = 20
    [ nsigma ] = 25
    [ paramsel ] = 
~~~~~~~ GurlsOptionList: paramsel
    [ Name ] = paramsel
    [ guesses ] = 
[ 0.000143623 0.000378683 0.000998456 0.00263258 0.0069412 0.0183015 0.0482547 0.127231 0.335463 0.884499 2.33212 6.14897 16.2127 42.7472 112.71 297.176 783.548 2065.94 5447.17 14362.3 ]

```
[ lambdas ] = 
```

[ 0.000143623 0.000143623 297.176 0.000143623 0.000143623 0.000143623 ]

```
[ perf ] = 
```

[ 0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.504274 0 0.992236 0 0 0
  0.495726 0 0.993012 0 0 0
  0.487179 0 0.994565 0 0 0
  0.410256 0 0.995342 0 0 0
  0.34188 0 0.999224 0 0 0
  0.128205 0 1 0 0 0
  0.00854701 0 1 0 0 0
  0 0 1 0 0 0
  0 0 1 0 0 0
  0 0 1 0 0 0 ]

```
    [ perfeval ] = acc
    [ ploteval ] = acc
    [ plotstr ] = test_for_lambda
    [ predbagmethod ] = vote
    [ processes ] = 
~~~~~~~ GurlsOptionList: processes
    [ Name ] = processes
    [ one ] = ( ComputeNsave, ComputeNsave )
```

```
[ randfeats ] = 
```

~~~~~~~ GurlsOptionList: randfeats
    [ D ] = 500
    [ Name ] = randfeats
    [ samplesize ] = 100

```
    [ saveanalysis ] = 1
    [ savefile ] = test_for_lambda.bin
    [ savekernel ] = 1
    [ seq ] = Sequence of size:2
    [ singlelambda ] = Pointer to the function <median> whose signature is: T (*func)(T*, int)
    [ smallnumber ] = 1e-08
    [ split ] = 
~~~~~~~ GurlsOptionList: split
    [ Name ] = split
    [ indices ] = 
gMat2D: (1405 x 1) matrix of type m

    [ lasts ] = 
[ 1124 ]

```

```
[ subsize ] = 50
[ time ] = 
```

~~~~~~~ GurlsOptionList: elapsedtime
    [ Name ] = elapsedtime
    [ one ] = 
[ 0 0.015 ]

```
    [ tmpdir ] = test_for_lambda.bin
    [ todisk ] = 1
    [ verbose ] = 1
    [ version ] = 2.0
~~~~~~~ ================= Printed All ================
```

Wrong error measure used in iCubParis02_simple_analysis

Same problem as in Issue #3. The selected lambda is not reliable.

kammo@kammo-Latitude-E5540:~/ICUB/Parametric_Modelling/Version0.1/build2$ ./iCubParis02_simple_analysis --dataset ../../Data_Sets/part1-left.csv --results results.csv --xtrain ../../Data_Sets/Xtr_2psmall.txt --ytrain ../../Data_Sets/ytr_2psmall.txt
1405

Specified Task Sequence :
Sequence of size:2

# New task sequence...
[Task 0: split]: ho...  done.
[Task 1: paramsel]: hoprimal...  done.

Save cycle...
[Task 0: split]: ho... saving
[Task 1: paramsel]: hoprimal... saving

Saving opt in iCubParis02_simple_analysis.bin
lambda values:
[ 0.00014291 0.00014291 112.15 0.00014291 0.00014291 0.00014291 ]

final lambda value: 0.00014291
================= Printing All ================

    [ Name ] = iCubParis02_simple_analysis
    [ calibfile ] = foo
    [ combineclasses ] = Pointer to the function <mean> whose signature is: T (_func)(T_, int)
    [ eig_percentage ] = 5
    [ epochs ] = 4
    [ hoperf ] = macroavg
    [ hoproportion ] = 0.2
    [ name ] = iCubParis02_simple_analysis
    [ nholdouts ] = 1
    [ nlambda ] = 20
    [ nsigma ] = 25
    [ paramsel ] = 
~~~~~~~ GurlsOptionList: paramsel
    [ Name ] = paramsel
    [ guesses ] = 
[ 0.00014291 0.000376804 0.000993502 0.00261952 0.00690675 0.0182107 0.0480153 0.126599 0.333799 0.88011 2.32054 6.11846 16.1323 42.5351 112.15 295.701 779.66 2055.69 5420.14 14291 ]

```
[ lambdas ] = 
```

[ 0.00014291 0.00014291 112.15 0.00014291 0.00014291 0.00014291 ]

```
[ lambdas_round ] = 
```

[ 0.00014291 0.00014291 112.15 0.00014291 0.00014291 0.00014291 ]

```
[ perf ] = 
```

[ 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.428571 0.357143 0.107143 0.0357143 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.996047 0.996047 0.996047 0.996047 0.996047 0.996047 0.996047 0.996047 0.996047 0.996047 0.996047 0.996047 0.996047 0.996047 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]

```
    [ perfeval ] = acc
    [ ploteval ] = acc
    [ plotstr ] = iCubParis02_simple_analysis
    [ predbagmethod ] = vote
    [ processes ] = 
~~~~~~~ GurlsOptionList: processes
    [ Name ] = processes
    [ one ] = ( ComputeNsave, ComputeNsave )
```

```
[ randfeats ] = 
```

~~~~~~~ GurlsOptionList: randfeats
    [ D ] = 500
    [ Name ] = randfeats
    [ samplesize ] = 100

```
    [ saveanalysis ] = 1
    [ savefile ] = iCubParis02_simple_analysis.bin
    [ savekernel ] = 1
    [ seq ] = Sequence of size:2
    [ singlelambda ] = Pointer to the function <median> whose signature is: T (*func)(T*, int)
    [ smallnumber ] = 1e-08
    [ split ] = 
~~~~~~~ GurlsOptionList: split
    [ Name ] = split
    [ indices ] = 
gMat2D: (1405 x 1) matrix of type m

    [ lasts ] = 
[ 1124 ]

```

```
[ subsize ] = 50
[ time ] = 
```

~~~~~~~ GurlsOptionList: elapsedtime
    [ Name ] = elapsedtime
    [ one ] = 
[ 0 0.001 ]

```
    [ tmpdir ] = iCubParis02_simple_analysis.bin
    [ todisk ] = 1
    [ verbose ] = 1
    [ version ] = 2.0
~~~~~~~ ================= Printed All ================
```

Linking issue

-- Found YCM: /home/kammo/Repos/codyco-superbuild/build/install/share/YCM (found version "0.2.0~20141017+gita2285614")
Looking for KDL in: /home/kammo/Repos/codyco-superbuild/build/install
-- Using iCub from install
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kammo/ICUB/Parametric_Modelling/Version0.1/build2
[ 11%] Building CXX object CMakeFiles/Data_Model_trail.dir/Data_Model_trail.cpp.o
/home/kammo/Repos/Parametric_Modeling/Version0.1/Data_Model_trail.cpp:1:0: warning: "NDEBUG" redefined [enabled by default]
#define NDEBUG
^
:0:0: note: this is the location of the previous definition
Linking CXX executable Data_Model_trail
/usr/bin/ld: cannot find -lkdl_codyco
/usr/bin/ld: cannot find -lkdl_format_io
/usr/bin/ld: cannot find -liDynTree
collect2: error: ld returned 1 exit status
make[2]: *** [Data_Model_trail] Error 1
make[1]: *** [CMakeFiles/Data_Model_trail.dir/all] Error 2
make: *** [all] Error 2
*** Failure: Exit code 2 ***

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.