Using vismach

06 Oct 2011 09:13 #13699 by fma
fma created the topic: Using vismach
I just found vismach, which allows user to build nice 3D representations of machines.

There is not much documentation about it; is there a discussion with usefull instructions to begin with?

07 Oct 2011 12:59 #13744 by andypugh
andypugh replied the topic: Re:Using vismach
Other than
I have never found anything.

I know other people have figured it out from looking at the examples.

If you do figure it out that way, writing some docs would be great :-)
07 Oct 2011 16:59 #13762 by fma
fma replied the topic: Re:Using vismach
10 Jan 2012 15:17 #16527 by dab77
dab77 replied the topic: Re:Using vismach
Hi, i'm asking here, because it's the only thread speaking about vismach!

Just a simple question to start playing..

-where do I have to put my file?

copying from examples I put into my .hal file this line:
# load the vismach model
loadusr -W tvm

but terminal gives me this error:
tetrapod.hal:24: execv(tvm): No such file or directory
tetrapod.hal:24: tvm exited without becoming ready
Shutting down and cleaning up EMC2...

Thanks, Davide.
10 Jan 2012 17:19 #16539 by ArcEye
ArcEye replied the topic: Re:Using vismach

i'm asking here, because it's the only thread speaking about vismach!

No quite, this recent thread covers the same errors, does it assist you?

I'm not sure if honey used fully qualified path/filenames or managed to sort out where the files needed to go, but he got his userspace module tested and working.

If you follow the same steps and it does not fall into place for you, try posting on that thread and asking exactly what he did.

11 Jan 2012 09:58 - 11 Jan 2012 10:43 #16572 by honey
honey replied the topic: Re:Using vismach
I have used the advice of ArcEye:

- The .py files have the header # ! /usr/bin/python
- The file must be executable
- place the component in emc2-dev/bin after removing the .py extension.
- Run emc2 through:
cd emc2-dev
. ./scripts/emc-environment
- If you have that error again, there is something wrong in you file .py. I advice you to test the file .py by terminal with

In italian:

Ho seguito i consigli che mi ha dato ArcEye:
- metti come intestazione # ! /usr/bin/python
- rendi il file eseguibile chmod +x o altre procedure
- metti il fil in emc2-dev/bin togliendo l'estensione.
- fai partire emc2 attraverso terminale con questi comandi
cd emc2-dev
. ./scripts/emc-environment
mi hanno spiegato che per i file da fare eseguire da emc2-dev bisogna fare cosi....probabilmente perchè cosi riesce a leggere questa nuovo file
Se continua a darti ancora quell'errore evidentemente hai sbagliato qualcosa nella scrittura del file. Visto che non c'è nessuna documentazione su questo argomento io sono andata molto ad intuito spulciando i file già disponibili su emc2. Quindi ho modificato piano piano per vedere se scrivevo bene le varie linee di codice. Per fare questo mi sono aiutata testando il file python attraverso
/directory/python (in cui ho messo anche il file
Spero di aver ricambiato l'aiuto che mi hai dato! ;-)

Last Edit: 11 Jan 2012 10:43 by honey.
11 Jan 2012 12:47 #16587 by dab77
dab77 replied the topic: Re:Using vismach
immaginavo fossi tu.
Thanks for helping, i'm going to try that in this days.

Ciao, Davide.
11 Jan 2012 13:18 #16594 by dab77
dab77 replied the topic: Re:Using vismach
honey wrote:

I have used the advice of ArcEye:

- The .py files have the header # ! /usr/bin/python

I immagine it's without the space:

#! /usr/bin/python
12 Jan 2012 00:02 - 12 Jan 2012 00:04 #16627 by dab77
dab77 replied the topic: Re:Using vismach
I have some problem, difficult to solve.
I'm looking at all the vismach example and they are one different from each other!
My situation is much different from the other vismach setups, so I have to redraw all from the beginning, but there's something i can't understand!
(these are my thoughts, correct me if you know I'm wrong, please)

Vismach works with three different coord systems:
-tooltip (needed for backtracing)
-work (needed if you have a moving table)
-world (all the machine)

you 'save' this coord systems using the Capture() function.
I think this give me this error:

Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.6/lib-tk/", line 1413, in __call__
return self.func(*args)
File "/usr/lib/python2.6/lib-tk/", line 498, in callit
File "/home/dab/emc2-dev/lib/python/", line 1029, in update
File "/home/dab/emc2-dev/lib/python/rs274/", line 348, in tkRedraw
File "/home/dab/emc2-dev/lib/python/", line 809, in redraw
tx, ty, tz = self.tool2view.t[12:15]
ValueError: need more than 0 values to unpack

if I understood [12:15] are referred to a matrix 4*4 built by the three coord systems ((x,y,z,scale)each), but i don't know why my Capture()s don't work like in the other examples!

this is my file now:

File Attachment:

File Name: tvm.gz
File Size:1 KB

i gived exec permission and copied it to /emc2-dev/bin and to /emc2-dev/src/hal/user_comps/vismach/ and i'm executing emc-environment as usual..

any idea?

Thanks, Davide.
Last Edit: 12 Jan 2012 00:04 by dab77.
12 Jan 2012 01:20 #16633 by dab77
dab77 replied the topic: Re:Using vismach
ok, i did this for me and for someone else needs.
it's the very minimal to make vismach start to draw. I've commented some point so new adventurers should find simpler to understand. Of course that alone isn't enough to understand vismach, you need to study all vismach examples.
I invite others who will do different vismach proj to post here or directly into the wiki page.

File Attachment:

File Name:
File Size:1 KB

Ciao, Davide.
Time to create page: 0.084 seconds
Powered by Kunena Forum