Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

[interface] Base part of wbm_getState is broken and needs tests #47

Closed
traversaro opened this issue Oct 23, 2015 · 6 comments
Closed

[interface] Base part of wbm_getState is broken and needs tests #47

traversaro opened this issue Oct 23, 2015 · 6 comments

Comments

@traversaro
Copy link
Contributor

In particular, the base state was undefined because it was taken from the returned value of a function that was not returning anything (see 0437e08#commitcomment-13937981 ).
I guess the function is always returning the identity transform in practice.
Fixed in 0437e08 , still need to be fixed in master.

@traversaro traversaro changed the title [interface] The base part of wbm_getState is broken [interface] Base part of wbm_getState is broken Oct 23, 2015
@traversaro
Copy link
Contributor Author

cc @naveenoid @gabrielenava

@traversaro
Copy link
Contributor Author

To make sure that everything is properly working, I suggest that we do some consistency tests together with wbm_setWorldFrame,wbm_updateState and wbm_forwardKinematics .

@traversaro traversaro changed the title [interface] Base part of wbm_getState is broken [interface] Base part of wbm_getState is broken and need tests Oct 23, 2015
@traversaro traversaro changed the title [interface] Base part of wbm_getState is broken and need tests [interface] Base part of wbm_getState is broken and needs tests Oct 23, 2015
@traversaro
Copy link
Contributor Author

Anyway the effect of the simulations is limited, as getState was used only to get the initial configuration of the base.

@gabrielenava
Copy link
Contributor

I don't think I have really understand this problem. I mean, in the balancing controller wbm_getState is used only at the beginning and only to obtain the identity since wbm_setWorldLink sets exactly the identity transform. But if I put wbm_getState in forwardDynamics just to see what happens the quaternion returned by getState changes, it's still a valid quaternion and the associated rotation matrix is not the identity so I don't think I understand this problem properly

@traversaro
Copy link
Contributor Author

I'll explain what I found in the code:
wbm_getState calls (with some magic )
ModelGetState::computeFast that itself calls
modelState->getRootWorldRotoTranslation() to get the rototranslation, but this function is not returning anything!

The fact that you mention wbm_setWorldLink (that should not be used in simulation, see #43) make me wonder if perhaps ModelGetState::compute is called, and that function seems is not affected by the bug.

Anyway a general comment: the fact that a computed quantity changes and is not the defuault does not mean that it is correctly computed!

@naveenoid
Copy link
Contributor

Tackled in #52

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants