Comments (7)
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.
Let me ask other users (if anyone): have someone any clue about this?
UPDATE: See my last comment
from sympybotics.
Excuse me, what version of sympy did you develop? Thank you.
from sympybotics.
I heavily used SymPyback in 2013, but I'm pretty sure SymPyBotics worked with SymPy versions from 2014 and 2015.
from sympybotics.
I have find the same problem。
from sympybotics.
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
from sympybotics.
import sympy
import numpy
import sympybotics
rbtdef=sympybotics.RobotDef('kuka1',
[(' 0',0.00,0.435,'q'),
('-pi/2',0.0,-0.114,'q-pi/2'),
('0','a1',0.1735,'q'),
('-pi/2',0.0,0.435,'q'),
('pi/2',0,0,'q'),
('-pi/2',0,0.136,'q+pi')],
dh_convention='modified');
rbtdef.gravityacc=sympy.Matrix([0.0,0.0,-9.81]);
rbtdef.frictionmodel={'Coulomb','viscous'}
rbt=sympybotics.RobotDynCode(rbtdef,verbose=True);
rbt.calc_base_parms()
Hb_func_def = sympybotics.robotcodegen.robot_code_to_func(
'Julia', rbt.Hb_code, 'Hb', 'Hb', rbtdef)
print Hb_func_def
Traceback (most recent call last):
File "C:\bot6_2fr.py", line 16, in
rbt.calc_base_parms()
File "build\bdist.win-amd64\egg\sympybotics\robotmodel.py", line 122, in calc_base_parms
self.dyn.calc_base_parms(regressor_func)
File "build\bdist.win-amd64\egg\sympybotics\dynamics\dynamics.py", line 55, in calc_base_parms
self.dof, self.n_dynparms, regressor_func)
File "build\bdist.win-amd64\egg\sympybotics\dynamics\dyn_parm_dep.py", line 22, in find_dyn_parm_deps
regressor_func(q, dq, ddq)).reshape(dof, parm_num)
File "", line 72, in regressor_func
NameError: global name 'a1' is not defined
python==2.7.15
sympy==0.7.3
numpy==1.15.1
from sympybotics.
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:
that use case is simply not supposed to work!
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 .
from sympybotics.
Related Issues (20)
- How to Obtain Observation Matrix? HOT 1
- Parameter definition HOT 1
- Error with rbt = sympybotics.RobotDynCode(rbtdef, verbose=True) HOT 12
- How are these matrices T_pcorke, J_pcorke, tau_pcorke obtained? HOT 2
- Negative Torque HOT 1
- NameError: name 'L1' is not defined HOT 3
- How to get the regression matrix of 4 parameters? HOT 2
- > Hi,I solve it
- AttributeError: module 'sympy' has no attribute 'iterables' HOT 7
- Has anyone verified that this algorithm is correct? HOT 6
- function rne_park_forward issue HOT 1
- Regression matrix related to base parameter HOT 1
- Excitation trajectory HOT 1
- symbolic base inertial parameter HOT 1
- Is it possible to generate forward dynamics code? HOT 2
- Is this toolbox suitable for robots with prismatic joints? HOT 1
- what is the "params" in the function? HOT 3
- how to translate the ''min param group" to M, C,G
- Is it possible to construct the dynamics of robot with compliance actuator? HOT 1
- Closed Chain Kinematics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sympybotics.