Go Down

Topic: Rubik's cube Robot solver (Read 135603 times) previous topic - next topic

matelot

#435
Feb 13, 2018, 05:47 pm Last Edit: Feb 13, 2018, 05:52 pm by matelot
I am trying all sorts of things to get it to work.
I am changing directories in the command prompt and moving various files around but just keep getting nowhere.
I am now at the point with setup.py in the python directory and failing to load cos it can't find _init_py.  _init_py is in the seriel directory back in pyserial_master. I don't want to keep moving files around like this, there has to be a way round this I can't see everone having to do what I am doing?

The cog printed and looks quite good.



kas

#436
Feb 13, 2018, 06:56 pm Last Edit: Feb 13, 2018, 06:56 pm by kas
Quote
I have never used python before so a learning curve is so steep it is blocking out the light.
Matelot, we are on the same boat   ;)
I first fiddled with Python, 3 year ago for this specific project and have not used it later on  ::)

I tend to remember that pySerial had a built in installer
Also make sure not to mix 16/32 bit versions for Python/pySerial

My "serial" files are here: C:\Python36\Lib\site-packages\serial
I have no "pyserial-master" folder on my (Windows) machine
Suspect that pySerial is not _installed_





matelot

Just whilst I am looking at other things I will comment that the py-serial folder pyserial-master was produced by the auto loader? :(

matelot

I have now tried lots of things with the python.
I can get the hello world box by removing all references to the pyserial but still can't get it to run with it in.

I have printed the cog twice and the middle plate that it sits on.
If you still have the files (I don't know what you used to make the STL's but I would use *.FCstd's in freeCAD, would it be possible to alter the hole on one of the cogs to take the servo? Like the bottom plate.
Perhaps moving the cog teeth round a bit so you have a male and a female might help as well. Just a thought.

kas

#439
Feb 14, 2018, 10:24 am Last Edit: May 15, 2018, 10:09 am by kas
Quote
I don't know what you used to make the STL's
I work using Fusion 360 from Autodesk, a great/free piece of software



Quote
would it be possible to alter the hole on one of the cogs to take the servo? Like the bottom plate.
Perhaps moving the cog teeth round a bit so you have a male and a female might help as well. Just a thought
I don't get the point, please elaborate, a quick sketch might help

This is the Fusion 360 final assembly, including the wrist servo:


the embedded horns are designed for Futaba 25 teeth spline geometry (Futaba/TowerPro/Orion/Savox/ProTekAce/Bluebird...)
I will release specific designs for Hitech servo's family (24T) if required


Quote
I have now tried lots of things with the python.
I can get the hello world box by removing all references to the pySerial but still can't get it to run with it in.
OK, let me know:
 - Operating System
 - 16/32 bit
 - Python version installed (link)
 - Python root folder (C:\  ??)
 - Did you add Python to $PATH ??
 - pySerial version installed (link)
 - pySerial installation procedure you used (pip install ??)
 - where is serialutil.py actual folder location in your setup?
 - are you using "iddle" IDE environment?




kas

#440
Feb 14, 2018, 06:17 pm Last Edit: May 15, 2018, 10:09 am by kas
For an easier assembly, I just uploaded a short exploded view video on YouTube


Video

Enjoy



matelot

#441
Feb 15, 2018, 12:47 am Last Edit: Feb 15, 2018, 01:13 am by matelot
OK, let me know:
- Operating System
- 16/32 bit
- Python version installed (link)
- Python root folder (C:\  ??)
- Did you add Python to $PATH ??
- pySerial version installed (link)
- pySerial installation procedure you used (pip install ??)
- where is serialutil.py actual folder location in your setup?
- are you using "iddle" IDE environment?

Operating system
Windows 7

64 bit

Version installed
Look at list of files at bottom of  https://www.python.org/downloads/release/python-364/
Windows x86-64 executable installer.

Root folder
C;|users\bob\python36  (the installer produced the directory python36)

Did I add $path
When I loaded python I ticked the PATH box.

Pyserial; version
https://pypi.python.org/pypi/pyserial      Halfway down the page is a grey headed box  'File'
I loaded the top one    pyserial-3.4py2.py3-none-any.whl (md5)    it loaded from there.

Where is serialutil.py
Not in my files?  I can't find serialutil.py

I take it I don't have pyserial in my computer?

Am I using 'iddle'
? I am using the CMD box to send instructions to python. Your initial test prog works, without the pyserial bits in.

In the second link above, further down the page Is the file       'programming language::python::3.6'   is this the one I need to load as I am using python 3.6.4?


Quote
I don't get the point, please elaborate, a quick sketch might help
Would the servo that is connected to the cog be better with one of these?
Quote
the embedded horns are designed for Futaba 25 teeth spline geometry (Futaba/TowerPro/Orion/Savox/ProTekAce/Bluebird...)
I will print the bottom plate and let you know if this is the one, I think so.

Quote
I don't get the point, please elaborate, a quick sketch might help
I am wondering if because both sets of teeth are the same, one arm would be further forward than the other? I will see when I print enough parts.

matelot

Sorry Kas I have just noticed there is a gear(cog) with a horn plate on it

kas

#443
Feb 15, 2018, 08:12 am Last Edit: Feb 15, 2018, 09:38 pm by kas
Quote
Sorry Kas I have just noticed there is a gear(cog) with a horn plate on it
So all is well   :)  :)
Depending on your specific servo's, we may have to adapt spline design in  gear_horn25T_L.stl  and  rear_ plate_horn25T.stl




Quote
I have the python in c:\.....python\python36-32
seems to be a 32bit install   ::)  
I just installed "Windows x86-64 executable installer" for testing and get a "c:\.....python\python36" folder
please confirm your windows 7 is 64bit and you downloaded "Windows x86-64 executable installer"


- where is your site-packages folder located ?
- where is your serialwin32.py file located ?
- where is your pip.exe file located ?


Open a cmd prompt and type "pip freeze" without quotes and let me know the outcome





matelot

#444
Feb 15, 2018, 12:18 pm Last Edit: Feb 15, 2018, 01:35 pm by matelot
seems to be a 32bit install   ::)  
I just installed "Windows x86-64 executable installer" for testing and get a "c:\.....python\python36" folder
please confirm your windows 7 is 64bit and you downloaded "Windows x86-64 executable installer"
I have added an attachment with a screen shot of the python file it shows 64 bit..

Quote
- where is your site-packages folder located ?
If I do  'python -m site' in CMD I get the second screen shot.
The reference to the ones at appdata\roaming look to be a copy of python27 that is far from complete. I wonder if a previous unload of the program failed to wipe these?


Quote
- where is your serialwin32.py file located ?
I have a copy of a program called CURA (for 3d printing) and it looks as if the only serialwin32.py I have is in the directories of that as if that loaded them in with it?

Quote
- where is your pip.exe file located ?
I have three copies of pip.exe. one is in the Python36 directory.

Quote
Open a cmd prompt and type "pip freeze" without quotes and let me know the outcome
the first time I did it my AVG virus eater checked it for malware and then it just waited a second and went back to the CMD prompt. Each time now it just waits a second then goes back to the CMD prompt and waits for another instruction.

matelot

#445
Feb 15, 2018, 12:59 pm Last Edit: Feb 15, 2018, 02:12 pm by matelot
I have just printed the gear horn T25. The hole for the servo is about 1mm diameter smaller than the cog on my futaba FP S28 servo? The diameter of the spline is 6mm. The hole is 5mm.
For reference the middle plate is exactly 7cm wide. and the servo top fails to go into the hole in the lower plate. I am still looking but it looks as if my printer is printing everything slightly too small?

kas

#446
Feb 15, 2018, 01:19 pm Last Edit: Feb 15, 2018, 01:20 pm by kas
OK, let's re install the complete package (I just did it to make sure)

 - disable AVG anti virus
- delete C:\Users\bob\AppData\Local\Programs\Python folder
- download and install Windows x86-64 executable installer (with path option)
- check your Python install is located at C:\Users\bob\AppData\Local\Programs\Python\Python36
 - open a CMD prompt
- type C:\Users\bob\AppData\Local\Programs\Python\Python36\Scripts\pip install pyserial

Should display: Successfully installed pyserial-3.4

You should then be all set






matelot

#447
Feb 15, 2018, 02:55 pm Last Edit: Feb 15, 2018, 02:56 pm by matelot
I have no idea what I was doing wrong?
I have deleted all references to python, other than the ones in other programs such as CURA and Inkscape that look as if they were loaded as part of those programs.
I did a full reinstall of Windows x86-64 executable installer (with path option) as you said.
I then remade the test.py file from your #22 below and just as a test I opened a CMD prompt and from c'\Users\bob I typed   python test.py (I have shown it on the attached screen shot) the hello world box opened. It looks as if that has done it.   Well done to you.

I will start another thread with my problems with the printed parts.


matelot

#449
Feb 15, 2018, 03:07 pm Last Edit: Feb 15, 2018, 03:45 pm by matelot
Do you have a 3d printer? are you printing the parts?
If I screw the lower plate and middle plate together than try to fit the servo under them, into the square hole. The servo doesn't quite fit in the hole. The spline doesn't extend into the round hole of the middle plate but the gear horn doesn't drop down beyond the bottom of the middle plate so the spline and the horn don't quite reach each other, apart from the fact that the spline is too big for the horn hole. If the grommets are removed from the holes in the servo then if the holes were right up to the middle plate the spline should just reach the horn and work?
I have two different servos FPS 128 AND FPS 28. I am trying to find more just to check.
I am amazed to see the pillared holes in both the plates are threaded at one end :o

Go Up