Jump to content
GallenWolf

Houdini + Arduino + Robotic Claw

Recommended Posts

I just came across this Houdini robot thing which I didn't recall seeing posted on odforce before: http://vimeo.com/15463389

(sorry, yes the data is going the other way into Houdini instead out of it)

Share this post


Link to post
Share on other sites

I just came across this Houdini robot thing which I didn't recall seeing posted on odforce before: http://vimeo.com/15463389

(sorry, yes the data is going the other way into Houdini instead out of it)

Dang, that's quite a project, rotary encoders all over my guess. Plus custom C++ CHOP x.x

Thanks Edward!

Share this post


Link to post
Share on other sites

im having trouble even importing serial module any suggestions?

 

Share this post


Link to post
Share on other sites

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.
 

Share this post


Link to post
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'

 

Share this post


Link to post
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 ?

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

thanks Luke,

I'm considering Linux more and more... never made the leap as I still need lots of win-only software :/

Mind if I ask why you wouldn't recommend to install this?

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

WORKS !

:)

now I "just" need to adapt it to a 16servos robot ...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×