robotology-legacy / mex-wholebodymodel

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

correction of Rf.m #50

Closed gabrielenava closed 9 years ago

gabrielenava commented 9 years ago

modified conversion from quaternions to rotation matrix in Rf.m

gabrielenava commented 9 years ago

what do you mean with "automatically display"? If I type "help Rf" I can already see the documentation. if you mean adding an explanation of the function's structure and not only its description I can do it once for all the mex_wholebodymodel_balancing functions, but I need some more time

traversaro commented 9 years ago

@gabrielenava ah, apparently then matlab is able to deal with slightly malformed docstrings... however I thinks it is better to comply with matlab guidelines with consistency and readability, the same that you get when you create a new matlab function:

function [ output_args ] = untitled( input_args )
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here

end

In this case this would be:

function R = Rf(u)
%RF Summary of this function goes here
%   Detailed explanation goes here

end
traversaro commented 9 years ago

@gabrielenava no need to redo all the documentation for all the functions in the repo... let's just start by what we can improve immediately .

gabrielenava commented 9 years ago

so the wrong part of the description is "from a given quaternion", because it has been already converted before and what is passed to the function is just scalar+vector, am I right?

gabrielenava commented 9 years ago

I don't really understand what is wrong, to write the description I went on this page https://en.wikipedia.org/wiki/Euler%E2%80%93Rodrigues_formula I verify that it's the same formula used in Rf.m than I added a small description based on what is written on this page

traversaro commented 9 years ago

@gabrielenava Euler-Rogrigues formula is different from Rodrigues Formula . The first is mapping euler parameters (that are in coordinates identical to quaternions) to rotation matrices, while the second is mapping a rotation expressed in axis angle to rotation matrices.

traversaro commented 9 years ago

:+1:

gabrielenava commented 9 years ago

I understand and I definitely eliminate the term "Rodriguez formula" to avoid ambiguity

DanielePucci commented 9 years ago

Hallelujah!

naveenoid commented 9 years ago

:+1: