GithubHelp home page GithubHelp logo

studywolf / blog Goto Github PK

View Code? Open in Web Editor NEW
264.0 30.0 236.0 11.16 MB

for code created as part of http://studywolf.wordpress.com

License: GNU General Public License v3.0

Python 41.44% C 2.08% C++ 2.95% Jupyter Notebook 53.53%

blog's Introduction

Studywolf code blog

This repository serves to hold projects that I'm both working on and have completed and presented on http://www.studywolf.com.

The Control folder has been moved to its own repo, at studywolf/control.

The DMPs folder has been moved to its own repo, at studywolf/pydmps and can be installed with pip.

blog's People

Contributors

studywolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blog's Issues

Problem with V-REP two-link arm example

I am so sorry for opening yet another of these. This really must be the issue at my end, but just in case it is not; the two-link arm example is not running out of the box either:

image

The second link, top, is continuously reflecting about the top joint, suggesting there is a sign that's gone wrong somewhere.

Your Code Explain is lacking

I read your posts in your blog. It is exciting, but you rarely explain your code and I cannot understand absolutely

Your blog theme is very good

Your blog theme is very good, very simple and regular, people like to read. Is your blog theme open source? I like it very much and want to use your blog. thank you.

Funny error with UR5 arm

Hi Travis,

Excellent blog as always.

I was playing around with your ur5_ctrl.py example and I am running into this funny error where I can run the code from outside an IDE like so:

[90] โ†’ python ur5_ctrl.py
Connected to remote API server
Generating transform function for EE
connection closed...
Traceback (most recent call last):
  File "ur5_ctrl.py", line 364, in <module>
    ax.plot([track_hand[0, 0]],
IndexError: too many indices for array

If I then run it inside and IDE like sublime or a notebook, I get the same error above once, but then if I try to run it again I get this rather worrying chunk of stuff:

Connected to remote API server
Generating transform function for EE
connection closed...
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-d8786628c253> in <module>()
    149             # calculate position of the end-effector
    150             # derived in the ur5 calc_TnJ class
--> 151             xyz = robot_config.Tx('EE', q)
    152 
    153             # calculate the Jacobian for the end effector

/Users/nd/cloud/control/src/vrep/ur5.pyc in Tx(self, name, q, x)
    213             # both have their own transform calculated with this check
    214             self._Tx[name] = self._calc_Tx(
--> 215                 name, x=x)
    216         parameters = tuple(q) + tuple(x)
    217         return self._Tx[name](*parameters)[:-1].flatten()

/Users/nd/cloud/control/src/vrep/ur5.pyc in _calc_Tx(self, name, x, lambdify)
    384         if (os.path.isfile('%s/%s.T' % (self.config_folder, name))):
    385             Tx = cloudpickle.load(open('%s/%s.T' %
--> 386                                        (self.config_folder, name), 'rb'))
    387         else:
    388             T = self._calc_T(name=name)

/Users/nd/anaconda2/lib/python2.7/pickle.pyc in load(file)
   1382 
   1383 def load(file):
-> 1384     return Unpickler(file).load()
   1385 
   1386 def loads(str):

/Users/nd/anaconda2/lib/python2.7/pickle.pyc in load(self)
    862             while 1:
    863                 key = read(1)
--> 864                 dispatch[key](self)
    865         except _Stop, stopinst:
    866             return stopinst.value

/Users/nd/anaconda2/lib/python2.7/pickle.pyc in load_reduce(self)
   1137         args = stack.pop()
   1138         func = stack[-1]
-> 1139         value = func(*args)
   1140         stack[-1] = value
   1141     dispatch[REDUCE] = load_reduce

/Users/nd/anaconda2/lib/python2.7/site-packages/sympy/core/numbers.pyc in __new__(cls, num, prec)
    823                 else:
    824                     _mpf_ = mpmath.mpf(
--> 825                         S.NegativeOne**num[0]*num[1]*2**num[2])._mpf_
    826         elif isinstance(num, Float):
    827             _mpf_ = num._mpf_

TypeError: can't multiply sequence by non-int of type 'float'

Do you know why it might be doing that?

EDIT:

The issue seems to be with cloudpickle

If I do

Tx = cloudpickle.load((open('%s/%s.T' % ('ur5_config', 'EE'), 'rb')))

I get

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-d19e02c244b8> in <module>()
----> 1 Tx = cloudpickle.load((open('%s/%s.T' % ('ur5_config', 'EE'), 'rb')))

/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.pyc in load(file)
   1382 
   1383 def load(file):
-> 1384     return Unpickler(file).load()
   1385 
   1386 def loads(str):

/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.pyc in load(self)
    862             while 1:
    863                 key = read(1)
--> 864                 dispatch[key](self)
    865         except _Stop, stopinst:
    866             return stopinst.value

/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.pyc in load_reduce(self)
   1137         args = stack.pop()
   1138         func = stack[-1]
-> 1139         value = func(*args)
   1140         stack[-1] = value
   1141     dispatch[REDUCE] = load_reduce

/usr/local/lib/python2.7/site-packages/sympy/core/numbers.pyc in __new__(cls, num, prec)
    823                 else:
    824                     _mpf_ = mpmath.mpf(
--> 825                         S.NegativeOne**num[0]*num[1]*2**num[2])._mpf_
    826         elif isinstance(num, Float):
    827             _mpf_ = num._mpf_

TypeError: can't multiply sequence by non-int of type 'float'

I think, possibly, maybe, there is an issue with the files in ur5_config/ - surely I should be able to use the ones on this repo and not process them myself (it takes a few hours as you have noted :)

having issues in understanding of code vrep two link arm example

sir i have read your code. i have certain issues

  1. how did you make M , C matrices of two link manipulator (that represent the dynamics of your 2 link manipulator)
  2. i have read that vrep joints required velocity and torque for simulation. my question is that how I can give the output of PID to our manipulator joints

Typo within self.J_orientation

self.J_orientation = [[0, 0, 10],  # joint 0 rotates around z axis
                          [10, 0, 0],  # joint 1 rotates around x axis
                          [10, 0, 0],  # joint 2 rotates around x axis
                          [10, 0, 0],  # joint 3 rotates around x axis
                          [0, 0, 10],  # joint 4 rotates around z axis
                          [1, 0, 0]]  # joint 5 rotates around x axis

I guess the orientation axis should be normed, so 10 ->1 .

MapleSim Example Model

Could you please upload the corresponding MapleSim Model to reproduce the presented workflow? Thx in advance

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.