jrl-umi3218 / RBDyn

RBDyn provides a set of classes and functions to model the dynamics of rigid body systems.
BSD 2-Clause "Simplified" License
163 stars 47 forks source link

Bad behaviour of bodyIndexByName? #64

Closed vsamy closed 5 years ago

vsamy commented 5 years ago

Hi,

So i bump into a problem. I somewhat messed up with an external file that has wrong body names in it. Then, i wanted to get the index by using mb.bodyIndexByName(wrongName). The thing is that the function actually returns a valid bodyIndex (body 0).

Is this the desired behaviour? I would rather prefer the program to throw me an error.

Thanks :)

gergondet commented 5 years ago

That's intended. You should use sBodyIndexByName if you want a throwing version

vsamy commented 5 years ago

Oh ok sorry. I though these functions were made for Python bindings as it is written in the files.