help with vismach

More
12 Dec 2011 15:50 #15589 by honey
help with vismach was created by honey
Hallo,

I would like create a custom simulation with the .obj files of my robot. I have studied the puma560gui.py to create a myfile.py. I have add this file to emc2-dev/src/hal/user_comps and the line myfile.py in the submakefile and then recompile emc2. But when run emc2 these errors appear:

- execv(myfile): No such file or directory
- myfile exited without becoming ready

What did I do wrong? Should I use a different procedure? Who can help me?

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

More
13 Dec 2011 13:11 #15630 by andypugh
Replied by andypugh on topic Re:help with vismach
honey wrote:

Who can help me?


I don't think many people here have experience with Vismach, and there is no documentation.

I think you will need to look through the source code to figure out how it works, and where it searches for files.

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

More
14 Dec 2011 13:39 #15676 by honey
Replied by honey on topic Re:help with vismach
OK, but I don't understand a thing that I think that isn't about vismach.Or maybe yes.
I go in the directory emc2-dev/src/hal/user_comps/vismach
edit pumag560gui.py
run emc2 and nothing is change. I have also the old puma560gui.py

Now I do another procedure:
I go in the file system usr/bin. Also here there is the file puma560gui.py So now edit this file with
sudo gedit puma560gui.py
salve it and exit.
run emc2 and I have again this error:

- execv(puma560gui): No such file or directory
- puma560gui exited without becoming ready

Which could be the problem??

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

More
14 Dec 2011 18:02 - 15 Dec 2011 08:35 #15686 by ArcEye
Replied by ArcEye on topic Re:help with vismach
Hi

I know nothing about Vismach and my knowledge of python is only in so far as it is similar to C/C++.

If you have written a user space component in python based upon puma560gui.py, you don't need to compile it, python is interpreted.

The .py files have the header # !/usr/bin/env python2 in the emc source tree

Change this to # ! /usr/bin/python and ensure the file is executable (chmod 755) then you can just place the component in
emc2-dev/bin after removing the .py extension.

It appears that you have a standard emc install, plus a git pull in /src/emc-dev so you could access the code.

Don't forget that to use the git pull, you will have have probably compiled as run-in-place and have to set the environment variable before using, otherwise you will be executing the standard install.

As for the errors, I will post something on testing your module from the command-line in a while.

As to whether it works, back to you...!

regards
Last edit: 15 Dec 2011 08:35 by ArcEye. Reason: add info

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

More
15 Dec 2011 09:30 #15698 by ArcEye
Replied by ArcEye on topic Re:help with vismach
Hi Again,

What I have done in the past to check userspace components, is to run through a realtime environment outside emc from the command-line as per this link

linuxcnc.org/docs/html/man/man1/halrun.1.html

A simple sequence of commands might be

$ halrun
halcmd: loadusr puma560gui
halcmd: show pin
halcmd: show param
halcmd: show sig

(or just halcmd: show all for everything)
halcmd: unloadusr puma560gui
halcmd: exit
$


This will prove that the module loads, has created the right pins and params etc.

The errors you are getting both come from the fact that execv cannot find the target file, from all I can gather.

That is where the importance of setting the . ./scripts/emc-environment per shell session if using RIP comes in especially.

I don't know how you are launching the module, or indeed whether it is being called directly by you, or by other elements of the Vismach set up.

You could try putting the fully qualified path/filename in your .hal file to ensure it can be found

Running through halcmd should tell you what you need to do re this, as it will produce the same errors if it cannot find the specified file.

Hope this is of use

regards

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

More
30 Dec 2011 00:48 #16102 by honey
Replied by honey on topic Re:help with vismach
Thank you very much ArcEye,

I followed your advice and the procedure that you indicated me and now I have my nice simulation 3D.... :))
Attachments:

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

More
30 Dec 2011 07:34 - 30 Dec 2011 07:35 #16112 by ArcEye
Replied by ArcEye on topic Re:help with vismach
You are very welcome and well done with your modified puma code.

Vismach is certainly not documented well, if you are able to provide a guide to getting the base system working, it might help a lot of people.

A post would be fine, if there was enough detail, I could transfer it to a Wiki.

Have a ponder on it

regards
Last edit: 30 Dec 2011 07:35 by ArcEye.

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

Time to create page: 0.153 seconds
Powered by Kunena Forum