A little help to finish my hexapod

More
28 Jul 2018 11:53 #115007 by topone
Hi andypugh
As you have suggested I have looked the source code
github.com/LinuxCNC/linuxcnc/blob/master...ematics/genhexkins.c
and i think a little change of the code can resolve my problem.
So I have installed linuxcnc following this guide: linuxcnc.org/docs/html/getting-started/getting-linuxcnc.html -->7.2. Installing on Ubuntu Precise.

If I compile with
halcompile --install genhexkins.c
I have this error:
/tmp/tmpOdWCxO/genhexkins.c: In function kinematicsForward
/tmp/tmpOdWCxO/genhexkins.c:468:7: error: implicit declaration of function rtapi_fabs [-Werror=implicit-function-declaration]
-- followed by other similar errors --

I think some libraries are not linked correctly. Why?

*************************************************
something else
I also noticed that in the installation procedure it refers to the link
releases.ubuntu.com/precise/
leading to
Ubuntu 12.04.5 LTS (Precise Pangolin)
This installation does not work (i think for a wrong kernel version), it is necessary to use the Ubuntu 12.04 LTS (Precise Pangolin) (version hard to find)

Thanks.

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

More
28 Jul 2018 15:07 #115012 by topone
I have reinstalled ubuntu (great fsarchiver), reinstalled LinuxCNC and then copied this 2 files
github.com/LinuxCNC/linuxcnc/blob/master...ematics/genhexkins.c
github.com/LinuxCNC/linuxcnc/blob/master...ematics/genhexkins.h

i have copied genhexkins.h on the /usr/include/linuxcnc/ folder, and now i can compile.

halcompile --install genhexkins.c
make KBUILD_EXTRA_SYMBOLS=/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/Module.symvers -C /usr/src/linux-headers-3.4-9-rtai-686-pae SUBDIRS=`pwd` CC=gcc V=0 modules
make[1]: ingresso nella directory "/usr/src/linux-headers-3.4-9-rtai-686-pae"
CC [M] /tmp/tmpW0KzgX/genhexkins.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "pmRpyMatConvert" [/tmp/tmpW0KzgX/genhexkins.ko] undefined!
WARNING: "pmCartCartCross" [/tmp/tmpW0KzgX/genhexkins.ko] undefined!
WARNING: "pmCartUnit" [/tmp/tmpW0KzgX/genhexkins.ko] undefined!
WARNING: "pmMatCartMult" [/tmp/tmpW0KzgX/genhexkins.ko] undefined!
WARNING: "pmCartCartAdd" [/tmp/tmpW0KzgX/genhexkins.ko] undefined!
WARNING: "pmCartUnitEq" [/tmp/tmpW0KzgX/genhexkins.ko] undefined!
WARNING: "pmCartCartDot" [/tmp/tmpW0KzgX/genhexkins.ko] undefined!
WARNING: "pmCartMag" [/tmp/tmpW0KzgX/genhexkins.ko] undefined!
WARNING: "pmCartCartSub" [/tmp/tmpW0KzgX/genhexkins.ko] undefined!
CC /tmp/tmpW0KzgX/genhexkins.mod.o
LD [M] /tmp/tmpW0KzgX/genhexkins.ko
make[1]: uscita dalla directory "/usr/src/linux-headers-3.4-9-rtai-686-pae"
cp genhexkins.ko /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/

Now, if i run linuxcnc and select Hexapod this happen
LINUXCNC - 2.7.14
Machine configuration directory is '/usr/share/doc/linuxcnc/examples/sample-configs/sim/axis/vismach/hexapod-sim'
Machine configuration file is 'hexapod.ini'
Starting LinuxCNC...
Found file(REL): ./core_sim_6.hal
insmod: error inserting '/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/genhexkins.ko': -1 Unknown symbol in module
./core_sim_6.hal:4: exit value: 1
./core_sim_6.hal:4: insmod for genhexkins failed, returned -1
See the output of 'dmesg' for more information.
Shutting down and cleaning up LinuxCNC...
LinuxCNC terminated with an error. You can find more information in the log: /home/cnc/linuxcnc_debug.txt
and /home/cnc/linuxcnc_print.txt as well as in the output of the shell command 'dmesg' and in the terminal


this the dmesg report
[ 6503.438802] RTAI[math]: loaded.
[ 6503.471489] genhexkins: Unknown symbol pmCartCartSub (err 0)
[ 6503.471509] genhexkins: Unknown symbol pmCartMag (err 0)
[ 6503.471523] genhexkins: Unknown symbol pmCartCartDot (err 0)
[ 6503.471534] genhexkins: Unknown symbol pmCartUnitEq (err 0)
[ 6503.471545] genhexkins: Unknown symbol pmCartCartAdd (err 0)
[ 6503.471556] genhexkins: Unknown symbol pmMatCartMult (err 0)
[ 6503.471566] genhexkins: Unknown symbol pmCartUnit (err 0)
[ 6503.471577] genhexkins: Unknown symbol pmCartCartCross (err 0)
[ 6503.471586] genhexkins: Unknown symbol pmRpyMatConvert (err 0)
[ 6503.634707] RTAI[math]: unloaded.

I suppose halcompile don't work, WARNING: "pmRpyMatConvert" [/tmp/tmpW0KzgX/genhexkins.ko] undefined! is an error. Is this correct?

Thanks

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

More
28 Jul 2018 15:24 #115014 by andypugh
It may be that you can't compile genhexkins with halcompile.
halcompile works with _some_ kinematics files, I think, but not those with certain #includes.
It looks like you don't have posemath.h (at a guess)

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

More
28 Jul 2018 21:02 #115027 by topone
posemath.h is present and it is on the same folder of genhexkins.h.
I think it is possible to compile genhexkins with halcompile. I have found this post:

forum.linuxcnc.org/forum/10-advanced-con...g-genhexkins?limit=6
I have open posemath.h with gedit and saved it using Unix/Linux line endings, as suggest on the post but I have the same problem.
It seems it is necessary install some packages, but I don't understand which.

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

More
28 Jul 2018 22:47 #115032 by andypugh
You could try apt-get install linuxcnc-dev

(I don't know for sure that that package still exists as a separate thing)

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

More
29 Jul 2018 07:07 #115043 by topone
linuxcnc-dev is already installed.

sudo apt-get install linuxcnc-dev
[sudo] password for cnc:
Lettura elenco dei pacchetti... Fatto (Read list of packages... Done)
Generazione albero delle dipendenze (Dependency tree generation)
Lettura informazioni sullo stato... Fatto (Reading status information... Done)
linuxcnc-dev è già alla versione più recente (linuxcnc-dev is already at the latest version).

I can't understand...

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

More
29 Jul 2018 13:59 #115060 by andypugh
I am not very familiar with compiling code (I just tend to type "make" and trust someone else to have written a good makefile)

This is where halcompile does the actual compiling.
github.com/LinuxCNC/linuxcnc/blob/master...ls/halcompile.g#L708

You can see that the build_usr and build_rt files both create a makefile then run 'make" on it.

the makefile is probably deleted, but there might be a way to prevent that.

Then you might be able to add the extra makefile entries to find the posemath libraries.

It might just be easier to download all the LinuxCNC source and compile everything, including your new genserkins.

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

Time to create page: 0.372 seconds
Powered by Kunena Forum