halcompile 5axiskins.c throws 'syntax error in VERSION script'

More
3 years 3 months ago #276381 by chowderhead
As usual, I'm in over my head. I'm trying to write custom kinematics by modifying 5axiskins as I thought it might be a good template to work from. I want duplicate axes (e.g., XYYZ) with the Z-joint being a scissor lift. Problem is, when I run halcompile -c 5axiskins, I get the following:

Compiling realtime 5axiskins.c
Linking 5axiskins.so
/usr/bin/ld:5axiskins.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
make: *** [/usr/share/linuxcnc/Makefile.modinc:123: 5axiskins.so] Error 1

Don't know if this helps diagnosis:
uname -a
Linux jimac 6.1.0-10-rt-amd64 #1 SMP PREEMPT_RT Debian 6.1.38-1 (2023-07-14) x86_64 GNU/Linux

Installed linuxcnc-uspace and linuxcnc-uspace-dev via apt.

Thanks!

Please Log in to join the conversation.

More
3 years 3 months ago #276383 by Aciera

I'm trying to write custom kinematics by modifying 5axiskins as I thought it might be a good template to work from.

The recommended way to build custom kinematics is to modify the 'userkins.comp' template:
Code:
4.1. Kinematics module using the userkins.comp templateAnother way to create a custom kinematics module is to adapt the HAL component [i]userkins[/i]. This template component can be modified locally by a user and can be built using halcompile.See the userkins man pages for more information.Note that to create switchable kinematic modules the required modifications are somewhat more complicated.See [i]millturn.comp[/i] as an example of a switchable kinematic module that was created using the [i]userkins.comp[/i] template.
as copied from here linuxcnc.org/docs/devel/html/motion/kinematics.html

'userkins.comp' should be located in the folder '/src/hal/components'

Please Log in to join the conversation.

More
3 years 3 months ago #276403 by chowderhead
Thank you, Aciera. I've successfully compiled and installed the modified userkins component (attached) and added it to the KINS section of ini. Unfortunately, I get 'zissorkins.so: undefined symbol: position_to_mapped_joints' upon starting linuxcnc. As near as I can tell, kinematics.h (included in the component) contains that function.

Appreciate the help.

Please Log in to join the conversation.

More
3 years 3 months ago #276436 by Aciera
I would suggest to drop the mapping of the joints and just assign the joints in the code like in the template (ie use j[0], j[1] and so on).

Please Log in to join the conversation.

More
3 years 2 months ago #276744 by chowderhead
Thanks again, for the advise, but I wanted to maintain joint mapping, so slashed and hacked until I got it working. Since I'm not worth a sh*t with C++, I copied the required functions from kins_utils.c.

Have a follow-on question: With non-linear joint:axis, what's the relationship between .ini [AXIS] MAX_VELOCITY and [JOINT] MAX_VELOCITY? It seems they would no longer be one-to-one, but LCNC complains if [AXIS] exceeds [JOINT]. Here I go again...

Please Log in to join the conversation.

More
3 years 2 months ago #276767 by Aciera

so slashed and hacked until I got it working. Since I'm not worth a sh*t with C++, I copied the required functions from kins_utils.c.

interesting, do you mind sharing your kinematic comp?

Please Log in to join the conversation.

More
3 years 2 months ago #276783 by chowderhead
Sure, there are two versions, one a quadratic fit to the scissor lift motion (zissorkins.c), the other a geometric solution (zissorkins2.c, which a much smarter friend helped me with). The quadratic fit works fine, the geometric solution was just finished this morning and is untested, but does compile.

Please Log in to join the conversation.

Time to create page: 0.911 seconds
Powered by Kunena Forum