Using vismach

More
06 Oct 2011 09:13 #13699 by fma
Using vismach was created by fma
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?

Thanks,

Please Log in or Create an account to join the conversation.

More
07 Oct 2011 12:59 #13744 by andypugh
Replied by andypugh on topic Re:Using vismach
Other than
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Vismach
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 :-)

Please Log in or Create an account to join the conversation.

More
07 Oct 2011 16:59 #13762 by fma
Replied by fma on topic Re:Using vismach
Ok!

Please Log in or Create an account to join the conversation.

More
10 Jan 2012 15:17 #16527 by dab77
Replied by dab77 on 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 model.py 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.

Please Log in or Create an account to join the conversation.

More
10 Jan 2012 17:19 #16539 by ArcEye
Replied by ArcEye on 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?

www.linuxcnc.org/index.php/english/compo...=10&id=15589&limit=6

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.

regards

Please Log in or Create an account to join the conversation.

More
11 Jan 2012 09:58 - 11 Jan 2012 10:43 #16572 by honey
Replied by honey on 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
emc
- 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
/directory/python
python youfile.py

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
emc
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 vismah.py)
python tuofile.py
Spero di aver ricambiato l'aiuto che mi hai dato! ;-)

Francesca
Last edit: 11 Jan 2012 10:43 by honey.

Please Log in or Create an account to join the conversation.

More
11 Jan 2012 12:47 #16587 by dab77
Replied by dab77 on topic Re:Using vismach
immaginavo fossi tu.
Thanks for helping, i'm going to try that in this days.

Ciao, Davide.

Please Log in or Create an account to join the conversation.

More
11 Jan 2012 13:18 #16594 by dab77
Replied by dab77 on topic Re:Using vismach
honey wrote:

I have used the advice of ArcEye:

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

I immagine it's without the space:

#! /usr/bin/python

Please Log in or Create an account to join the conversation.

More
12 Jan 2012 00:02 - 12 Jan 2012 00:04 #16627 by dab77
Replied by dab77 on 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:

...cut...
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1413, in __call__
return self.func(*args)
File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 498, in callit
func(*args)
File "/home/dab/emc2-dev/lib/python/vismach.py", line 1029, in update
t.tkRedraw()
File "/home/dab/emc2-dev/lib/python/rs274/OpenGLTk.py", line 348, in tkRedraw
self.redraw()
File "/home/dab/emc2-dev/lib/python/vismach.py", 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.
Attachments:
Last edit: 12 Jan 2012 00:04 by dab77.

Please Log in or Create an account to join the conversation.

More
12 Jan 2012 01:20 #16633 by dab77
Replied by dab77 on 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: vismach_di...base.zip
File Size:1 KB


Ciao, Davide.
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.253 seconds
Powered by Kunena Forum