Tutorial would be nice
Hi! Great work. Unfortunately I do not understand all details. A tutorial would be nice, where you (graphically) describe, what are the parameters to set up a robot and work with your functions. E.g. you wrote 'q+pi/2' and so on: What is q?
Thanks. You are completely right. I hope to have some time in future to do it, but I don't expect it to be soon.
q is used to represent the joint position. This symbol is commonly used for that, along the theta symbol.
Meanwhile you can take a look at the test file: https://github.com/cdsousa/SymPyBotics/blob/master/sympybotics/tests/test_results.py
I implemented the basic DH formalism for my own, just to learn and understand it: https://github.com/balzer82/Robot-Kinematic
Would be nice if you could at least show a way to achieve this with SymPyBotics! Thanks
Well, its just a matter of mapping your Th, d, r, al parameters to the alpha, a, d, theta parameters I use (which are the common notation found in texbooks), and put the q joint position placeholder in the correct parameter. Usually q will appear where you have a 0.0. For revolution joints that is usually the theta parameter:
>>> import sympy
>>> import sympybotics
>>> rbtdef = sympybotics.RobotDef('Example Robot', # robot name
... # list of tuples with Denavit-Hartenberg parameters
... # (alpha, a, d, theta)
... [('-pi/2', 0, 0, 'q+pi/2'),
... ( 'pi/2', 0, 0, 'q')],
... (..., ..., ..., ...),
... ...
... (..., ..., ..., ...), # last link
... dh_convention='standard' # either 'standard' or 'modified'
... )
@cdsousa I used the PUMA560 model in the test file, and I found that the result is not same with the Matlab robotics toolbox.
This is worrying. @lyhbuaa can you add the code for both so I can reproduce it. thanks.