robotology-legacy / mex-wholebodymodel

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

controllers general update #57

Closed gabrielenava closed 8 years ago

gabrielenava commented 8 years ago

both the original and joint space controllers have been updated to the last version. they both passed the balancing tests. README files updated

Ganimed commented 8 years ago

The backslash-operator is better and faster than the ^{-1} operation. Use it as often if it is possible!! Because this operator can be very well parallelized and also supports gpuArray which runs on GPU! You solve there a linear equation with -Ax = B, s.t. x = -A \ B and then you divide x with A.

There exists a really good book for Matalb-Hacks: Yair Altman, Accelerating MATLAB ® Performance, ISBN: 978-1-4822-1130-6 (eBook - PDF)

See also:

traversaro commented 8 years ago

@Ganimed I agree, but is not exactly readable for not matlab experts, for that I was suggesting to add a comment to explain what was going on.

Ganimed commented 8 years ago

I do not know the complete code there. I'm not 100%ly sure but does this line describe a similarity transformation?

traversaro commented 8 years ago

@Ganimed no, it is implementing the computation of the derivative of a inverse matrix, as in https://en.wikipedia.org/wiki/Invertible_matrix#Derivative_of_the_matrix_inverse .

Ganimed commented 8 years ago

Ok, I understand now. Thanks for the info.

Ganimed commented 8 years ago

I would suggest that you explain in your comment exactly that what you have explained to me (incl. the link to wikipedia).

DanielePucci commented 8 years ago

@gabrielenava please revisit notation of transformations. For instance, if a transformation T expresses a vector v_a in a coordinate system A into the coordinate system B, denote it with

b_T_a
Ganimed commented 8 years ago

Maybe it is better to use an other notation instead of b_T_a. We all know what this means and also how it is expressed in the books. But not everybody knows that. And also on the screen the human is intuitively used to read from left to right (except in the arabic world). Maybe the notation, T_a2b, is better for that and easier to read instead of b_T_a.

traversaro commented 8 years ago

@Ganimed the nice thing about having the orientation of the right and the reference orientation on the left is that than is to check that the composition of rotation make sense, by simply comparing nearby symbols , compare:

a_T_d = a_T_b * b_T_c * c_T_d 

with

T_d2a = T_b2a * T_c2b * T_d2c 

I can easily say that if the first one is right or wrong, while is difficult to do this kind of visual check on the second expression.

naveenoid commented 8 years ago

I vote for the notation of a_T_b. It is a lot lot easier to debug.

On Mon, Nov 9, 2015 at 12:54 PM, Silvio Traversaro <notifications@github.com

wrote:

@Ganimed https://github.com/Ganimed the nice thing about having the orientation of the right and the reference orientation on the left is that than is to check that the composition of rotation make sense, by simply comparing nearby symbols , compare:

a_T_d = a_T_b * b_T_c * c_T_d

with

T_d2a = T_b2a * T_c2b * T_d2c

I can easily say that if the first one is right or wrong, while is difficult to do this kind of visual check on the second expression.

— Reply to this email directly or view it on GitHub https://github.com/robotology/mex-wholebodymodel/pull/57#issuecomment-155044181 .

Ganimed commented 8 years ago

Ok, I understand, I got your points.

traversaro commented 8 years ago

:+1:

naveenoid commented 8 years ago

Last commit addresses https://github.com/robotology/mex-wholebodymodel/issues/56

traversaro commented 8 years ago

I think we can merge then.

Ganimed commented 8 years ago

By the way, from now on I will use this notation-style also for my code.

DanielePucci commented 8 years ago

:+1:

traversaro commented 8 years ago

@gabrielenava @naveenoid are you ok with merging?

naveenoid commented 8 years ago

:+1: