Code Monkey home page Code Monkey logo

Comments (12)

hao3han3 avatar hao3han3 commented on September 11, 2024 1

could be the problem of x64 version?
Now I am downloading the python 3 and try it.

from sympybotics.

phuicy avatar phuicy commented on September 11, 2024

https://github.com/cdsousa/SymPyBotics/blob/master/sympybotics/dynamics/dyn_parm_dep.py#L22

So this is the line. I can't see any mention of math, hmmm?

from sympybotics.

hao3han3 avatar hao3han3 commented on September 11, 2024

yes, that is the reason I am so confused.
and also I can not find the "regressor_func" in any files.

from sympybotics.

phuicy avatar phuicy commented on September 11, 2024

I would guess this is a python 3 library as i see uses of print().

from sympybotics.

phuicy avatar phuicy commented on September 11, 2024

I doubt it would have anything with machine architecture. Well i hope it doesn't shudders.
Let me know how you get on.

from sympybotics.

hao3han3 avatar hao3han3 commented on September 11, 2024

same error under python 3.7

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python\3\lib\site-packages\sympybotics-1.0.dev0-py3.7.egg\sympybotics\robotmodel.py", line 122, in calc_base_parms
  File "C:\Python\3\lib\site-packages\sympybotics-1.0.dev0-py3.7.egg\sympybotics\dynamics\dynamics.py", line 55, in calc_base_parms
  File "C:\Python\3\lib\site-packages\sympybotics-1.0.dev0-py3.7.egg\sympybotics\dynamics\dyn_parm_dep.py", line 22, in find_dyn_parm_deps
  File "<string>", line 6, in regressor_func
NameError: name 'math' is not defined

===================================
this is the code

# -*- coding: utf-8 -*-
import math
import sympy
import sympybotics

# import the MDH
rbtdef = sympybotics.RobotDef('exp',  # robot name
                              [(0, 0, 0.32, 'q'),
                               ('pi/2', 0.05, 0, 'q+pi/2'),
                               (0, 0.27, 0, 'q'),
                               ('pi/2', 0.07, 0.3, 'q+pi'),
                               ('pi/2', 0, 0, 'q+pi'),
                               ('pi/2', 0, 0.0785, 'q')],
                              dh_convention='modified'
                              );

# G
rbtdef.gravityacc = sympy.Matrix([0.0, 0.0, -9.81]);

print(rbtdef.dynparms());

rbt = sympybotics.RobotDynCode(rbtdef, verbose=True);

tau_str = sympybotics.robotcodegen.robot_code_to_func('C', rbt.invdyn_code, 'tau_out', 'tau', rbtdef);
print(tau_str)

# matrix H
Mregress = sympybotics.robotcodegen.robot_code_to_func('C', rbt.H_code, 'Mregress', 'Mregress', rbtdef);
print(Mregress)

# base para
rbt.calc_base_parms();
print(rbt.dyn.baseparms)

the process to install python is (for both python 2 and 3)
1, download and install the python x64 version
2, use the python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose to install numpy and sympy
3, download the sympybotics-master.zip and then python setup.py install
that is it.

from sympybotics.

phuicy avatar phuicy commented on September 11, 2024

Z[i * dof: i * dof + dof, :] = numpy.matrix(

hmmm so it seems to think regressor_func is a string. implying :

        Z[i * dof: i * dof + dof, :] = numpy.matrix(
            regressor_func(q, dq, ddq)).reshape(dof, parm_num)

should be:

        Z[i * dof: i * dof + dof, :] = numpy.matrix( regressor_func(q, dq, ddq)).reshape(dof, parm_num)

(no line break.)

I will try and reproduce your bug in a little while.

from sympybotics.

hao3han3 avatar hao3han3 commented on September 11, 2024

I do not think so.
and I got same error after I modified the dyn_parm_dep.py in egg file.

from sympybotics.

hao3han3 avatar hao3han3 commented on September 11, 2024

OK
problem solved
check this:
https://github.com/crush0441/SymPyBotics

picpick_2019-01-11_16-55-13
picpick_2019-01-11_16-56-23
I found it in Insights - Network

I suggest to fix it

from sympybotics.

hustfzt2 avatar hustfzt2 commented on September 11, 2024

yes, that is the reason I am so confused.
and also I can not find the "regressor_func" in any files.

Hi, have you solved the "regressor_func" issue?

from sympybotics.

cdsousa avatar cdsousa commented on September 11, 2024

Please open PR whenever it fits.

from sympybotics.

ohmyjesus avatar ohmyjesus commented on September 11, 2024

OK
problem solved
check this:
https://github.com/crush0441/SymPyBotics

picpick_2019-01-11_16-55-13
picpick_2019-01-11_16-56-23
I found it in Insights - Network

I suggest to fix it

OK
problem solved
check this:
https://github.com/crush0441/SymPyBotics

picpick_2019-01-11_16-55-13
picpick_2019-01-11_16-56-23
I found it in Insights - Network

I suggest to fix it

yes,I solve it, thanks

from sympybotics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.