-
Notifications
You must be signed in to change notification settings - Fork 83
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
If I used symbol represent D-H parameter, “NameError: name 'a2' is not defined” appeared when executed "rbt.calc_base_parms()". #23
Comments
Strange, that should have worked out of the box as 'a2' is correctly quoted. Maybe that's some issue related to newer Python/SymPy versions, I've long stopped developing/using the package. UPDATE: See my last comment |
Excuse me, what version of sympy did you develop? Thank you. |
I heavily used SymPyback in 2013, but I'm pretty sure SymPyBotics worked with SymPy versions from 2014 and 2015. |
I have find the same problem。 |
well i have the same issue. if someone works on dynamic identification, he has to use either SYMORO or sympybotics. sympybotics is really better except this issue... i wonder if you have developed other lib these years to replace sympybotics |
import sympy rbtdef=sympybotics.RobotDef('kuka1', Traceback (most recent call last): python==2.7.15 |
Well, @shaoxingmao, @dbdxnuliba and @Artourdaboi, now that I'm looking to this once again, I get what the issue is. It has, in fact, a very simple explanation, I'm terribly sorry I didn't get it at first: The dynamics part is not supposed to work with symbols, you have to replace those 'a1', 'a2', ... by the actual numeric values! When doing geometric computations, using symbolic DH parameters may work, as it is seen here https://github.com/cdsousa/SymPyBotics/blob/master/sympybotics/tests/test_results.py#L14-L25 . However, for computations of dynamics, only numeric DH parameters are accepted, for instance https://github.com/cdsousa/SymPyBotics/blob/master/sympybotics/tests/test_results.py#L63-L74 . |
rbtdef = sympybotics.RobotDef('UR5', # robot name
[(0, 0, 'd1','q'), # list of tuples with Denavit-Hartenberg parameters
('pi/2', 0,0, 'q'),
( 0, 'a2',0, 'q'),
( 0, 'a3','d4', 'q'),
( 'pi/2', 0,'d5', 'q'),
('-pi/2', 0,'d6', 'q'),], # (alpha, a, d, theta)
dh_convention='modified' # either 'standard' or 'modified'
)
......
rbt.calc_base_parms()
It will appear "NameError: name 'a2' is not defined", what can I do to repair it?
Thank you very much!
The text was updated successfully, but these errors were encountered: