Jump to content

Houdini + Arduino + Robotic Claw


GallenWolf

Recommended Posts

  • 2 weeks later...
  • 3 years later...
  • 1 year later...

HI,

I'm really interested in this work flow (houdini - > arduino -> many servos)

unfortunately, I'm new to Houdini and I've never been programming.
So I'm wondering if this setup you've got Alvin, could be used (and adapted) to a more complex rig (16 servos) by someone like me (zero python knowledge) ???

 

thanks,

cyril.
 

Link to comment
Share on other sites

Has anyone tried to use this on windows ?

I don't know how to tweak this in order to run it under windows.

when I open the hip, console give me this :

Error running event handler:
Traceback (most recent call last):
  File "opdef:/Object/servo?PythonModule", line 1, in <module>
ImportError: No module named serial

Error running event handler:
Traceback (most recent call last):
  File "opdef:/Object/servo?PreFirstCreate", line 1, in <module>
  File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.416/houdini/python2.7libs\hou.py", line 22570, in __getattr__
    def __getattr__(*args): return _hou.HDAModule___getattr__(*args)
AttributeError: 'module' object has no attribute 'openSerialConnection'

 

Link to comment
Share on other sites

On 26/03/2011 at 6:57 PM, GallenWolf said:

- OTL included will give a python error if there is no serial device on /dev/ttyACM0 - please note that I am running Linux, so I have no idea what this will be like on Windows.

Can someone help with this ?

 

Link to comment
Share on other sites

6 minutes ago, 6ril said:

Can someone help with this ?

 

I'd just install Linux in this case. It's much better suited for things like this. If you must use Windows then you'll have to install this inside of Houdini's Python install (which I don't recommend).

http://pyserial.readthedocs.io/en/latest/index.html

Link to comment
Share on other sites

Houdini on Linux will use the system install of Python. Houdini on Windows uses an internal version of Python specific to that version of Houdini because Windows doesn't inherently have Python installed like Linux does. If you want to use the serial module in Python on Linux you can install it from the software repositories and then you can use it in any software that uses Python (like Houdini). An example command is below to install the serial module on Ubuntu.

sudo apt-get install python-serial

I'm sure it could be installed on Windows but the process is much more convoluted. Then if you move to another version of Houdini or another computer it all breaks because the module would be installed just for that one version of Houdini. It's a very cumbersome way of working. Linux is just setup to be more developer friendly so when you start doing this kind of stuff it just makes more sense to do it in Linux. You'll spend more time doing actual work and less time doing ridiculous troubleshooting.

Link to comment
Share on other sites

thanks Luke!

I've installed ubuntu and houdini, I'll see how it goes. Got to tune and fix a few problems with that new OS first.

thanks for your explanations.

 

Edited by 6ril
Link to comment
Share on other sites

so,

I've installed:

ubuntu 16.04
houdini 15.5
arduino IDE 1.6.9

I've included myself in the group for tty and dialout (usermod -a -G tty <username>)

I've flashed the arduino with the .pde provided in the first post of this thread.

and to do that, I had to use /dev/ttyUSB0 port.

now when I launch the hip servo-test.hipnc I've got :

after file opened

Traceback (most recent call last):
  File "opdef:/Object/servo?PreFirstCreate", line 1, in <module>
  File "opdef:/Object/servo?PythonModule", line 5, in openSerialConnection
  File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 180, in __init__
    self.open()
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 294, in open
    raise SerialException(msg.errno, "could not open port %s: %s" % (self._port, msg))
SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'

 

also if I middle click a servo node :

servopb.png

 

I've also tried to replace ttyACM0 by ttyUSB0 but same results :/

 

ANY help will be much appreciated !

 

thanks guys.

 

 

 

Edited by 6ril
Link to comment
Share on other sites

27 minutes ago, 6ril said:

SerialException: [Errno 2] could not open port /dev/ttyACM0: [Errno 2] No such file or directory: '/dev/ttyACM0'

The path to the serial device isn't correct. The correct path should be one of the following paths if you runs this command.

ls /dev | grep 'ttyACM\|ttyUSB'

Each time you plug the Arduino in or reboot the computer it might show up under a different path.

Edited by lukeiamyourfather
Link to comment
Share on other sites

1 hour ago, 6ril said:

I've also tried to replace ttyACM0 by ttyUSB0 but same results :/

that's why I mentioned this, I tried with the same port that I used to flash the board, but it's still the same :/

when I type

ls /dev | grep 'ttyACM\|ttyUSB'

I get ttyUSB0

and so when I replace ttyACM0 by ttyUSB0 in the code, I still get the same error msg when opening the hip file.

 

**EDIT**

:) after some more restarts, the error msg disappeared and now servo motors dont turn, but a led is flashin whenever I move sliders in houdini !

gettin closer...

Edited by 6ril
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...