scikit-robot icon indicating copy to clipboard operation
scikit-robot copied to clipboard

Code quality advise

Open pigeonsoar opened this issue 4 years ago • 6 comments

Hi, I found a potential problem may be caused in the future (It's worked now.) In model.py, line 957, function calc_inverse_kinematics_nspace_from_link_list, you set a default value (None) for paramter weight. Then, it will be passed to function calc_nspace_from_joint_limit defined in line 943. And it will cause bug in line 950 if weight is None.

pigeonsoar avatar Dec 07 '20 08:12 pigeonsoar

Thank you for your advise! How did you find this problem?

iory avatar Dec 07 '20 09:12 iory

Thank you for your advise! How did you find this problem?

I wrote a small tool to check it. Thank you for your response.

pigeonsoar avatar Dec 07 '20 09:12 pigeonsoar

I wrote a small tool to check it.

That's interesting. If it's open source, please let me know!

I'll fix the problem.

iory avatar Dec 07 '20 09:12 iory

I wrote a small tool to check it.

That's interesting. If it's open source, please let me know!

I'll fix the problem.

I'm Sorry. It is not open source now. But I will tell you when it is open.

pigeonsoar avatar Dec 07 '20 09:12 pigeonsoar

And it has the same problem in line 1356.

pigeonsoar avatar Dec 07 '20 09:12 pigeonsoar

I'm Sorry. It is not open source now. But I will tell you when it is open.

I'm looking forward using it. I created PRs to fix this issue.

iory avatar Dec 07 '20 10:12 iory