Links that run along the Z-axis aren't shown in the visualizer
satej1210 opened this issue · 2 comments
satej1210 commented
Hello!
First off, this project is awesome! The fact that is it so simple and the code is easy to understand is great.
The problem I have is that when some links are drawn along the Z-axis, the cylinders aren't displayed in the visualizer.
Here's the configuration I'm working with:
tinyik.Actuator(['z', [0, 0, 180.7], 'y', [-612.7, 0, 0], 'y', [-571.55, 0, 0], 'y', [0, -174.15, 0], 'z', [0, 0, -119.85], 'y', [0, -116.55, 0]])
Here's a screenshot from the visualizer:
(FYI, I'm using a radius of 10)
Do you know of a workaround for this problem?
Thanks!
satej1210 commented
I forgot to include that there is also a RuntimeWarning
that is printed when opening the visualizer:
<environment_dir>\lib\site-packages\tinyik\visualizer.py:85: RuntimeWarning: invalid value encountered in true_divide
axis = cross / np.linalg.norm(cross)
lanius commented
Thanks for the nice pull request! I've merged it as a bug fix.