ikpy
ikpy copied to clipboard
How to create chain of links from DH table, I got an error while trying to do that.
l0 = ikpy.link.OriginLink() l1 = ikpy.link.DHLink('l1', d=3, a=0, bounds=None, use_symbolic_matrix=True) l2 = ikpy.link.DHLink('l2', d=0, a=5.75, bounds=None, use_symbolic_matrix=True) l3 = ikpy.link.DHLink('l3', d=0, a=7.375, bounds=None, use_symbolic_matrix=True) l4 = ikpy.link.DHLink('l4', d=0, a=0, bounds=None, use_symbolic_matrix=True) l5 = ikpy.link.DHLink('l5', d=4.125, a=0, bounds=None, use_symbolic_matrix=True) my_chain = ikpy.chain.Chain([l0,l1,l2,l3,l4,l5])
I got this error
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~/.local/lib/python3.5/site-packages/ikpy/chain.py in init(self, links, active_links_mask, name, profile, **kwargs) 21 self.name = name 22 self.links = links ---> 23 self._length = sum([link._length for link in links]) 24 # Avoid length of zero in a link 25 for (index, link) in enumerate(self.links):
~/.local/lib/python3.5/site-packages/ikpy/chain.py in
AttributeError: 'DHLink' object has no attribute '_length'`
Also I got this error when trying to import from ikpy import plot_utils
from ikpy import plot_utils
error
`---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
~/.local/lib/python3.5/site-packages/ikpy/plot_utils.py in
/usr/lib/python3/dist-packages/mpl_toolkits/mplot3d/init.py in
ImportError: No module named 'matplotlib.externals'`
Thank you.
Hello, may I know have you solved the problem?
Hey,
This seems to be a bug in the DH links.
Actually the DH implementation is preliminary and lacks uses-cases: is the code you presented coming from a real robot? In this case, could you provide the complete set of DH parameters and the robot metadata so I can use it as a base for the test cases to develop further the DH parameters?
Additionally, the second issue you got (with matplotlib) is an ubuntu issue.
Take a look at this, this may help you: https://stackoverflow.com/questions/45103248/importerror-no-module-named-matplotlib-externals
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I've written some code to resolve the problem of creating a chain link from DH parameters table, see https://github.com/Phylliade/ikpy/pull/143