Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign error in get_id_from_name in robot-utils #80

Open
gabrielebndn opened this issue Mar 5, 2019 · 1 comment
Open

Sign error in get_id_from_name in robot-utils #80

gabrielebndn opened this issue Mar 5, 2019 · 1 comment

Comments

@gabrielebndn
Copy link
Contributor

Classes RobotUtil and ForceUtil have a get_id_from_name method which returns an id number given a name string. If the name is not found, -1 is returned.
However, the return type is Eigen::VectorXd::Index, which is a typedef for unsigned int.
Code using this methods checks that the result is less than zero, which will never work.

This is obviously a mistake. The return type should be int.

By the way, I do not really understand the need of these methods. We could directly work with Pinocchio models and use its methods.

@olivier-stasse
Copy link
Member

They are historical and comes from a time where pinocchio was not around.
They are currently being revaluated.

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

No branches or pull requests

2 participants