*SOLVED* Recompiling genhexkins
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.
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.
Please Log in or Create an account to join the conversation.
I think you will find that you are now. You are hacking Linux kernel drivers.I state that I am not a programmer,
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.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.
Why not use the version of emc2 that the driver is compiling in to? ie the run-in-place version?
Please Log in or Create an account to join the conversation.
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.
Do you actually have a self-compiled version of EMC2, compiled from source using "make" from inside the "src" directory of emc2-dev?
Mmmh...I think that I use already that version or not? How I can know this? and What I should do?Why not use the version of emc2 that the driver is compiling in to? ie the run-in-place version?
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
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?You think that the my kinematics file are correct?
Please Log in or Create an account to join the conversation.
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
In this case there is 2.6.0 - preHow about if you cd to emc2-dev and type
Which version number do you get then?. ./scripts/emc-environment emc
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....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.
Ah, good.
In this case there is 2.6.0 - preHow about if you cd to emc2-dev and type
Which version number do you get then?. ./scripts/emc-environment emc
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.
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.
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.
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.