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

Why is nr_of_jnts a double and not unsigned int? #384

Open
guru-florida opened this issue Feb 14, 2022 · 1 comment
Open

Why is nr_of_jnts a double and not unsigned int? #384

guru-florida opened this issue Feb 14, 2022 · 1 comment

Comments

@guru-florida
Copy link

guru-florida commented Feb 14, 2022

The constructor for TreeIkSolverPos_Online takes nr_of_jnts argument but it is a double. Looking at the source code, the argument is only used to construct the JntArray objects and that constructor takes an unsigned int...it seems to me the nr_of_jnts argument should also be an unsigned int. I can't see a use case for having non-integer number of joints. The argument is not used anywhere else but the constructor.

TreeIkSolverPos_Online::TreeIkSolverPos_Online(const double& nr_of_jnts,

I can do a PR if you like.

@MatthijsBurgh
Copy link
Collaborator

@guru-florida thanks for your comment.

I agree with you. Internally an uint is used. So this API doesn't make any sense.

Changing this API, would be a breaking change. Therefore I don't want to change it for now. So I created a milestone for the next breaking release. This could be long way down the road. But I will add this issue to that milestone.

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