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

How to create chain of links from DH table, I got an error while trying to do that. #35

Open
Abhi001vj opened this issue Aug 11, 2017 · 5 comments

Comments

@Abhi001vj
Copy link

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)
in ()
----> 1 my_chain = ikpy.chain.Chain([l0,l1,l2,l3,l4,l5])

~/.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 (.0)
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):

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)
in ()
1 import ikpy
2 import numpy as np
----> 3 from ikpy import plot_utils

~/.local/lib/python3.5/site-packages/ikpy/plot_utils.py in ()
4 from . import geometry_utils
5 import matplotlib.animation
----> 6 from mpl_toolkits.mplot3d import Axes3D
7
8

/usr/lib/python3/dist-packages/mpl_toolkits/mplot3d/init.py in ()
2 unicode_literals)
3
----> 4 from matplotlib.externals import six
5
6 from .axes3d import Axes3D

ImportError: No module named 'matplotlib.externals'`

Thank you.

@Phylliade Phylliade added the DH label Jun 9, 2019
@ChunJyeBehBeh
Copy link

Hello, may I know have you solved the problem?

@Phylliade
Copy link
Owner

Phylliade commented Oct 11, 2019

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?

@Phylliade
Copy link
Owner

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

@stale
Copy link

stale bot commented May 3, 2020

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.

@stale stale bot added the wontfix label May 3, 2020
@Phylliade Phylliade added pinned and removed wontfix labels May 3, 2020
@Tanneguydv
Copy link

Tanneguydv commented Jul 4, 2023

I've written some code to resolve the problem of creating a chain link from DH parameters table, see #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants