*SOLVED* Recompiling genhexkins

More
10 Jan 2012 17:05 #16538 by cncbasher
post your files here and Andy or I can take it further
just confirm which version of emc you are using , so we can test against that particular build

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

More
11 Jan 2012 10:25 #16574 by honey
I state that I am not a programmer, so I might have made many stupid errors. I have an antropomorphic robot with 6 dof (like puma but the wrist is different). I wrote the general kinematics for a antropomorphic manipulator without spherical wrist (3dof) and for the last 3dof I have used equations like trivial kinematics one (world->a = joint[3]). I edited pumakins for this. Some parameters are declared but not used.

In the hal file I wrote this line:
"loadrt armikins"

The procedure that I have used to compile the module is:
sudo comp --install armkins.c
Then I have copied the file armkins.ko that it was created in emc2-dev/rtlib.
When I run emc2 I have this error:
insmod: error inserting ?/home/cnc/emc2-dev/rtlib/armkins.ko': -1 Unknow symbol in module
arm_inversa.hal:5: exit value: 1
arm_inversa.hal:5: insmod failed, returned -1

There is "loadrt armkins" in the line 5 of my hal file.

File Attachment:

File Name: armkins-ce...389fd5.c
File Size:4 KB
Attachments:

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

More
11 Jan 2012 10:48 - 11 Jan 2012 12:59 #16576 by andypugh
honey wrote:

I state that I am not a programmer,

I think you will find that you are now. You are hacking Linux kernel drivers.

The procedure that I have used to compile the module is:
sudo comp --install armkins.c
Then I have copied the file armkins.ko that it was created in emc2-dev/rtlib.

I think the problem is that your file was compiled in one place, then moved to another. You have to figure out a way to get the .ko to compile into the right place.

Why not use the version of emc2 that the driver is compiling in to? ie the run-in-place version?
Last edit: 11 Jan 2012 12:59 by andypugh.

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

More
11 Jan 2012 11:06 #16579 by honey

andypugh wrote:

Why not use the version of emc2 that the driver is compiling in to? ie the run-in-place version?


Mmmh...I think that I use already that version or not? How I can know this? and What I should do?
You think that the my kinematics file are correct?

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

More
11 Jan 2012 13:06 #16590 by andypugh
honey wrote:

Why not use the version of emc2 that the driver is compiling in to? ie the run-in-place version?

Mmmh...I think that I use already that version or not? How I can know this? and What I should do?

Do you actually have a self-compiled version of EMC2, compiled from source using "make" from inside the "src" directory of emc2-dev?
I am trying to work out if you have a run-in-place version as well as an installed version, or not.
How are you starting emc? From the menu, or from the command line?
If you try it both ways, are the version numbers on the splash-screen the same?
How about if you cd to emc2-dev and type
. ./scripts/emc-environment
emc
Which version number do you get then?

You think that the my kinematics file are correct?

I haven't had a chance to look yet. Anyway, didn't you have it working a while ago? I seem to recall you changing the wrist setup?

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

More
12 Jan 2012 09:12 #16637 by honey

andypugh wrote:
Do you actually have a self-compiled version of EMC2, compiled from source using "make" from inside the "src" directory of emc2-dev?
I am trying to work out if you have a run-in-place version as well as an installed version, or not.
How are you starting emc? From the menu, or from the command line?
If you try it both ways, are the version numbers on the splash-screen the same?


I think that I have the run in place version because I have used to compile
- cd emc2-dev/src
- ./configure --enable-run-in-place
make && sudo make setuid
but I don't know If this is the correct way to compile for my project. And probabily I have used only "make" also.

For my project I use by terminal the command with . ./script/emc-environment for start emc2 because I add a new file .py.
Anyway I can use both the ways and the version is 2.4.6

How about if you cd to emc2-dev and type

. ./scripts/emc-environment
emc
Which version number do you get then?

In this case there is 2.6.0 - pre

Anyway, didn't you have it working a while ago? I seem to recall you changing the wrist setup?

Yes. I have tried to use genserkins but this doen't work for my project. The movements aren't precise and when I change the alpha d-h parameter the inverse kinematics doesn't work at all. So I decide to write a simpler kinematics for my robot. For the wirst you have suggested a way to combine the movements of two motors with some line in hal file....

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

More
12 Jan 2012 10:08 #16641 by andypugh
honey wrote:

How about if you cd to emc2-dev and type

. ./scripts/emc-environment
emc
Which version number do you get then?

In this case there is 2.6.0 - pre

Ah, good.
If your armkins.ko compiled into emc2-dev/src/ then it "belongs" to the 2.5 run-in-place version.
If you put it back there, and run the 2.6 version you _should_ find that it works.

Similarly, I think that if you run the 2.4.6 version of the emc-environment script, then run comp on your kins file, you might find that it gets compiled into the right place for 2.4.6 (but that is speculation on my part)

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

More
12 Jan 2012 10:48 #16642 by honey

andypugh wrote:
Ah, good.
If your armkins.ko compiled into emc2-dev/src/ then it "belongs" to the 2.5 run-in-place version.
If you put it back there, and run the 2.6 version you _should_ find that it works.

Similarly, I think that if you run the 2.4.6 version of the emc-environment script, then run comp on your kins file, you might find that it gets compiled into the right place for 2.4.6 (but that is speculation on my part)


When I write the comand
comp --install armkins.c
the armkins.ko is created in /usr/realtime.2.6.32-122-rtai/modules/emc2
then I copy this file in emc2-dev/rtlib because emc-environment script requests armkins in that directory.

So how you think that i could be resolve?

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

More
12 Jan 2012 11:37 #16644 by andypugh
When I write the comand
comp --install armkins.c
the armkins.ko is created in /usr/realtime.2.6.32-122-rtai/modules/emc2
then I copy this file in emc2-dev/rtlib because emc-environment script requests armkins in that directory.
So how you think that i could be resolve?[/quote]

What happens if you run . ./emc2-dev/scripts/emc-environment then sudo comp --install armkins? Where does that put the armkins.ko?

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

More
12 Jan 2012 12:08 #16648 by honey

What happens if you run . ./emc2-dev/scripts/emc-environment then sudo comp --install armkins? Where does that put the armkins.ko?


this is the result:

cnc@emco:~$ cd emc2-dev
cnc@emco:~/emc2-dev$ . ./scripts/emc-environment
cnc@emco:~/emc2-dev$ sudo comp --install armkins.c
make -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=`pwd` CC=gcc V=0 -o /Module.symvers modules
make[1]: ingresso nella directory «/usr/src/linux-headers-2.6.32-122-rtai»
CC [M] /tmp/tmpH4rzPY/armkins.o
/tmp/tmpH4rzPY/armkins.c: In function ‘kinematicsInverse’:
/tmp/tmpH4rzPY/armkins.c:119: warning: unused variable ‘c6’
/tmp/tmpH4rzPY/armkins.c:119: warning: unused variable ‘s6’
/tmp/tmpH4rzPY/armkins.c:118: warning: unused variable ‘c5’
/tmp/tmpH4rzPY/armkins.c:118: warning: unused variable ‘s5’
/tmp/tmpH4rzPY/armkins.c:117: warning: unused variable ‘c4’
/tmp/tmpH4rzPY/armkins.c:117: warning: unused variable ‘s4’
/tmp/tmpH4rzPY/armkins.c:116: warning: unused variable ‘c23’
/tmp/tmpH4rzPY/armkins.c:116: warning: unused variable ‘s23’
/tmp/tmpH4rzPY/armkins.c:111: warning: unused variable ‘th6’
/tmp/tmpH4rzPY/armkins.c:110: warning: unused variable ‘th5’
/tmp/tmpH4rzPY/armkins.c:109: warning: unused variable ‘th4’
/tmp/tmpH4rzPY/armkins.c:107: warning: unused variable ‘th23’
/tmp/tmpH4rzPY/armkins.c:103: warning: unused variable ‘sumSq’
/tmp/tmpH4rzPY/armkins.c:102: warning: unused variable ‘k’
/tmp/tmpH4rzPY/armkins.c:101: warning: unused variable ‘t3’
/tmp/tmpH4rzPY/armkins.c:101: warning: unused variable ‘t2’
/tmp/tmpH4rzPY/armkins.c:101: warning: unused variable ‘t1’
/tmp/tmpH4rzPY/armkins.c:99: warning: unused variable ‘singular’
Building modules, stage 2.
MODPOST 1 modules
WARNING: "hal_init" [/tmp/tmpH4rzPY/armkins.ko] undefined!
WARNING: "hal_exit" [/tmp/tmpH4rzPY/armkins.ko] undefined!
WARNING: "hal_ready" [/tmp/tmpH4rzPY/armkins.ko] undefined!
WARNING: "pmPoseHomConvert" [/tmp/tmpH4rzPY/armkins.ko] undefined!
WARNING: "pmHomPoseConvert" [/tmp/tmpH4rzPY/armkins.ko] undefined!
CC /tmp/tmpH4rzPY/armkins.mod.o
LD [M] /tmp/tmpH4rzPY/armkins.ko
make[1]: uscita dalla directory «/usr/src/linux-headers-2.6.32-122-rtai»
cp armkins.ko /usr/realtime-2.6.32-122-rtai/modules/emc2/
cnc@emco:~/emc2-dev$

The file armkins.ko continues to be copied in /usr/realtime-2.6.32-122-rtai/modules/emc2/

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

Time to create page: 0.423 seconds
Powered by Kunena Forum