*SOLVED* Recompiling genhexkins
I'm new to EMC2 and would like to use it for hexapod control.
I tried to recompile genhexkins.c with changed hexapod dimensions. After changing values in genhexkins.h I used
sudo comp --install genhexkins.c
and had the following warnings
WARNING: "pmRpyMatConvert" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
WARNING: "hal_init" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
WARNING: "pmCartCartCross" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
WARNING: "hal_exit" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
WARNING: "pmCartUnit" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
WARNING: "pmMatCartMult" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
WARNING: "pmCartCartAdd" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
WARNING: "hal_ready" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
WARNING: "pmCartMag" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
WARNING: "pmCartCartSub" [/tmp/tmpvWVdx8/genhexkins.ko] undefined!
After that EMC-HAL-SIM-HEXAPOD not starting, error message under spoiler
RUN_IN_PLACE=no
EMC2_DIR=
EMC2_BIN_DIR=/usr/bin
EMC2_TCL_DIR=/usr/share/emc/tcl
EMC2_SCRIPT_DIR=
EMC2_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/emc2
EMC2_CONFIG_DIR=
EMC2_LANG_DIR=/usr/share/emc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
EMC2_EMCSH=/usr/bin/wish8.5
EMC2 - 2.4.4
Machine configuration directory is '/home/pkm/emc2/configs/hexapod-sim'
Machine configuration file is 'minitetra.ini'
INIFILE=/home/pkm/emc2/configs/hexapod-sim/minitetra.ini
PARAMETER_FILE=hexapod.var
EMCMOT=motmod
EMCIO=io
TASK=milltask
HALUI=
DISPLAY=tkemc
NML_FILE=
Starting EMC2...
Starting EMC2 server program: emcsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting EMC2 IO program: io
Shutting down and cleaning up EMC2...
Killing task emcsvr, PID=3323
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done
Debug file information:
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/emc2/genhexkins.ko': -1 Unknown symbol in module
core_sim_6.hal:4: exit value: 1
core_sim_6.hal:4: insmod failed, returned -1
See the output of 'dmesg' for more information.
3323
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Kernel message information:
[ 2657.357007] I-pipe: Domain RTAI registered.
[ 2657.357012] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 2657.357015] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 2657.357048] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 2657.357051] PIPELINE layers:
[ 2657.357053] fd256e20 9ac15d93 RTAI 200
[ 2657.357056] c085cb20 0 Linux 100
[ 2657.374615] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 2657.374814] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 2657.374820] RTAI[sched]: hard timer type/freq = APIC/16679797(Hz); default timing: periodic; linear timed lists.
[ 2657.374823] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2135181000 hz.
[ 2657.374826] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[ 2657.374891] RTAI[usi]: enabled.
[ 2657.411980] RTAI[math]: loaded.
[ 2657.449293] genhexkins: Unknown symbol pmCartCartSub
[ 2657.449380] genhexkins: Unknown symbol pmCartMag
[ 2657.449532] genhexkins: Unknown symbol pmCartCartAdd
[ 2657.449616] genhexkins: Unknown symbol pmMatCartMult
[ 2657.449700] genhexkins: Unknown symbol pmCartUnit
[ 2657.449849] genhexkins: Unknown symbol pmCartCartCross
[ 2657.450023] genhexkins: Unknown symbol pmRpyMatConvert
[ 2657.788064] RTAI[math]: unloaded.
[ 2657.815202] SCHED releases registered named ALIEN RTGLBH
[ 2657.844350] RTAI[malloc]: unloaded.
[ 2657.944274] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 2657.947174] I-pipe: Domain RTAI unregistered.
[ 2657.947213] RTAI[hal]: unmounted.
Thus, genhexkins is not compiled properly. What should I do? Please, help
PS: EMC2_2.2.4 on Ubuntu 10.04
Solved by installing all required packages.
Please Log in or Create an account to join the conversation.
PKM wrote:
Solved by installing all required packages.
Which packages you have installed? I have a similar problem....I tried to install a new kinematics "armkins.c" with sudo comp --install and I have this error:
> MODPOST 1 modules
> WARNING: "hal_init" [/tmp/tmpujuZ4U/armkins.ko] undefined!
> WARNING: "hal_exit" [/tmp/tmpujuZ4U/armkins.ko] undefined!
> WARNING: "hal_ready" [/tmp/tmpujuZ4U/armkins.ko] undefined!
> WARNING:"pmPoseHomConvert" [/tmp/tmpujuZ4U/armkins.ko] undefined!
>WARNING:"pmHomPoseConvert" [/tmp/tmpujuZ4U/armkins.ko] undefined!
> CC /tmp/tmpujuZ4U/armkins.mod.o
> LD [M] /tmp/tmpujuZ4U/armkins.ko
> make[1]: Uscita dalla directory '/usr/src/linux-headers-2.6.32-122-rtai'
When I run emc2 I have this debug information:
>arm_inversa.hal:4: Warning: File contains DOS-style line endings.
>insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/emc2/armkins.ko': -1 Unknown symbol in module
>arm_inversa.hal:5: exit value: 1
>arm_inversa.hal:5: insmod failed, returned -1
You can help me?
Please Log in or Create an account to join the conversation.
using for example gedit
re-save using Unix/Linux line endings will solve one problem as shown
run sudo apt-get build-dep emc2
should help finding any missing packages
you do not say which version of emc you are compiling for , or if you are using the development version from GIT
this would help
Please Log in or Create an account to join the conversation.
one problem you have is arm_inversa.hal has been saved using Dos style liine endings
using for example gedit
re-save using Unix/Linux line endings will solve one problem as shown
run sudo apt-get build-dep emc2
should help finding any missing packages
you do not say which version of emc you are compiling for , or if you are using the development version from GIT
this would help
I have installed the packages with apt-get build-dep but when I run emc2 I have also:
>arm_inversa.hal:4: Warning: File contains DOS-style line endings.
>insmod: error inserting '/home/cnc/emc2-dev/rtlib/armkins.ko': -1 Unknown symbol in module
>arm_inversa.hal:5: exit value: 1
>arm_inversa.hal:5: insmod failed, returned -1
I'm using ubuntu 10.4 emc2 2.4.6, developement version....
Please Log in or Create an account to join the conversation.
insmod: error inserting '/home/cnc/emc2-dev/rtlib/armkins.ko': -1 Unknown symbol in module
This might well mean that the line in the HAL file which loads armkins has a parameter after it which does not match the code.
(for example, a joint length called one thing, when the code uses a different name).
I think it might also be that the kinematics file name and what the module calls itself internally might not match.
For example, in git.linuxcnc.org/gitweb?p=emc2.git;a=blo...9f90d9bf3b40ce548cc7
there is the line 347 comp_id = hal_init("pumakins");
Your kinematics file name needs to match the comp_id.
Please Log in or Create an account to join the conversation.
[For example, in git.linuxcnc.org/gitweb?p=emc2.git;a=blo...9f90d9bf3b40ce548cc7
there is the line 347 comp_id = hal_init("pumakins");
Your kinematics file name needs to match the comp_id.[/quote]
I check that line and I have changed already the line in comp_id=hal_init("armkins")
I think that the problem could be how I wrote the kinematics of the robot. I am not so expert. Where I can post my file and if someone wants, he can help me?
Please Log in or Create an account to join the conversation.
I think that the problem could be how I wrote the kinematics of the robot. I am not so expert. Where I can post my file and if someone wants, he can help me?
Attach the kinematics file to a reply, and also tell us what the format is of the line which loads the kinematics in the HAL file.
If we can reproduce the problem we would be half way to solving it.
Please Log in or Create an account to join the conversation.
If you just add the new file to source/emc/kinematics folder, it is not compiled with make.
I'm not a programmer, but I think that any kinematics file should be specified in some file list to be compiled (the developers can explain this better).
It would be easier to use comp and installed EMC2 version, but comp works with very simple kinematic files only, without included libraries.
Here's a trivial solution: make a backup copy of any existing kinematics file and change it to what you want. It compiles just fine.
Please Log in or Create an account to join the conversation.
You know, I was never successful to compile a new kinematics file within run-in-place EMC2 install.
If you just add the new file to source/emc/kinematics folder, it is not compiled with make.
I think that they are, in general, but genserkins is a special case.
The submakefile controls the compilation of the modules in the kinematics folder:
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...86818a2edce346bb45ed
And I think that any generic .c file will be automatically compiled if it doesn't have any complex dependencies (genserkins does have dependencies)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.