Exceeding JOINT_N.MAX_VELOCITY limits with genserkins kinematics

More
04 Jan 2021 22:46 #194082 by 3radfahrer
Dear linuxcnc-community

First of all a big thank you all to this great community: I‘m successfully operating my homebrew 4ax router with linuxcnc since 8 years now and most of my issues and questions could be solved and I found a lot of hints for experiments like implementing EtherCat-Amps with the help of this forum :-) → So thank you very much :-)

Right now, I’m running V2.8.1 and since I operate my mill on trivkins , my latest project is to experiment with the kinematics implementation with the aim of upgrading my configuration to 4ax-kinematics (either with modded linear-genserkins or a close solution algebraic transformation).
Therefore, I set up a simulation-configuration with genserkins and parameterized a Kuka Agilus KR10, because I have this one already running in Matlab including the dh-parameters and know the results for the forward and inverse transformation, and got this to a working state in linuxcnc including the visualization with vismach, except one thing:

In the ini-file of the configuration, I parameterized among other things the max_velocity for each axis and each joint. The parameters seem to be accepted correctly since linuxcnc starts without error and:
  • when jogging joint_0 in joint-mode, the actual velocity is [JOINT_0].MAX_VELOCITY
  • when jogging axis_x in world-mode (after homing) the actual velocity is [AXIS_X].MAX_VELOCITY
But now my issue: when moving in world-mode after homing, no matter for jogging, mdi-command or gcode-file, the speed of the TCP is only limited to the [AXIS_N].MAX_VELOCITY values even if the TCP-movement outruns the values of [JOINT_N].MAX_VELOCITY. (see attached gif)

My expectation in this case was, that the [JOINT_N].MAX_VELOCITY would never be exceeded. Instead, the TCP/axis-velocity should be slowed down so that the [JOINT_N].MAX_VELOCITY gets not exceeded.
I also encountered this behavior for the example-configurations “sim-xyzbc-trt”, “sim-xyzac-trt” and the “ldelta”…

So my question is now: is my expectation wrong, and this behavior is as it should or am I missing something in my configuration?

Attached is the gif that visualizes the overrun of the JOINT.MAX_VELOCITY limits, the ini-file of my configuration and the hal-file with the genserkins-parametrization
If more files are helpful, please let me know.

Thanks in advance for your hints and sorry for the long post. Just wanted to make my problem clear ;-)
Attachments:

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

More
04 Jan 2021 23:18 #194087 by tommylight
Something i noticed in your ini file, the velocity settings are all over the place, they should be the same for the corresponding axis/joint.
Try starting that config from the terminal, see if you get warning about velocities not being set correctly.
The following user(s) said Thank You: 3radfahrer

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

More
05 Jan 2021 22:25 #194172 by 3radfahrer
Hi Tommy,

thanks for your fast reply. I started linuxcnc from terminal, please find the output below.
Unfortunately no warnings, I just get a "note" about the VMAX. I'll check the origin of this value and remove the tooltable error...
Am I missing an option to get more information?

Thank you,
Dominik
dom@debian:~$ linuxcnc ~/linuxcnc/configs/KukaTest/do_kuka1.ini 
LINUXCNC - 2.8.1
Machine configuration directory is '/home/dom/linuxcnc/configs/KukaTest'
Machine configuration file is 'do_kuka1.ini'
check_config: Unchecked: [KINS]KINEMATICS=genserkins
Starting LinuxCNC...
emc/iotask/ioControl.cc 702: can't load tool table.
Found file(REL): ./do_kuka1.hal
Found file(REL): ./simulated_home_kuka.hal
note: MAXV     max: 200.000 units/sec 12000.000 units/min
note: LJOG     max: 200.000 units/sec 12000.000 units/min
note: LJOG default: 0.250 units/sec 15.000 units/min
note: AJOG     max: 10.000 units/sec 600.000 units/min
note: AJOG default: 10.000 units/sec 600.000 units/min
note: jog_order='XYZABC'
note: jog_invert=set([])
task: main loop took 0.010127 seconds
task: main loop took 0.011059 seconds
RTAPI: ERROR: Unexpected realtime delay on task 1
This Message will only display once per session.
Run the Latency Test and resolve before continuing.

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

More
06 Jan 2021 11:25 #194206 by 3radfahrer
Hi again Tommy,

I startet linuxcnc from terminal with debugmode 0x7FFFFFF and can't see anything suspicious regarding the parametrization of the axis/joints, except the entries "waiting for s.joints<0>, s.kinematics_type<0>". is this normal, or is this a kind of sync-problem?

emcTrajSetJoints(6) returned 0
emcTrajSetSpindles(1) returned 0
emcTrajSetAxes(6, 63)
emcTrajSetUnits(1.0000, 1.0000)
emcTrajSetVelocity(0.0000, 1.0000) returned 0
emcTrajSetMaxVelocity(4.0000) returned 0
emcTrajSetAcceleration(80.0000) returned 0
emcTrajSetMaxAcceleration(100.0000)
emcTrajSetHome(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) returned 0
emcJointSetType(0, 2)
emcJointSetUnits(0, 1.0000)
emcJointSetBacklash(0, 0.0000) returned 0
emcJointSetMinPositionLimit(0, -800.0000) returned 0
emcJointSetMaxPositionLimit(0, 800.0000) returned 0
emcJointSetFerror(0, 0.5000) returned 0
emcJointSetMinFerror(0, 0.0500) returned 0
emcJointSetHomingParams(0, 0.0000, 0.0000, -1.0000, 20.0000, 20.0000, 0, 0, 0, 0, 0) returned 0
emcJointSetMaxVelocity(0, 10.0000) returned 0
emcJointSetMaxAcceleration(0, 100.0000) returned 0
emcJointActivate(0) returned 0
emcJointSetType(1, 2)
emcJointSetUnits(1, 1.0000)
emcJointSetBacklash(1, 0.0000) returned 0
emcJointSetMinPositionLimit(1, -800.0000) returned 0
emcJointSetMaxPositionLimit(1, 800.0000) returned 0
emcJointSetFerror(1, 0.5000) returned 0
emcJointSetMinFerror(1, 0.0500) returned 0
emcJointSetHomingParams(1, 0.0000, 0.0000, -1.0000, 20.0000, 20.0000, 0, 0, 0, 1, 0) returned 0
emcJointSetMaxVelocity(1, 10.0000) returned 0
emcJointSetMaxAcceleration(1, 100.0000) returned 0
emcJointActivate(1) returned 0
emcJointSetType(2, 2)
emcJointSetUnits(2, 1.0000)
emcJointSetBacklash(2, 0.0000) returned 0
emcJointSetMinPositionLimit(2, -800.0000) returned 0
emcJointSetMaxPositionLimit(2, 800.0000) returned 0
emcJointSetFerror(2, 0.5000) returned 0
emcJointSetMinFerror(2, 0.0500) returned 0
emcJointSetHomingParams(2, 0.0000, 0.0000, -1.0000, 20.0000, 20.0000, 0, 0, 0, 1, 0) returned 0
emcJointSetMaxVelocity(2, 1.0000) returned 0
emcJointSetMaxAcceleration(2, 100.0000) returned 0
emcJointActivate(2) returned 0
emcJointSetType(3, 2)
emcJointSetUnits(3, 1.0000)
emcJointSetBacklash(3, 0.0000) returned 0
emcJointSetMinPositionLimit(3, -800.0000) returned 0
emcJointSetMaxPositionLimit(3, 800.0000) returned 0
emcJointSetFerror(3, 0.5000) returned 0
emcJointSetMinFerror(3, 0.0500) returned 0
note: MAXV     max: 100.000 units/sec 6000.000 units/minemcJointSetHomingParams(3, 0.0000, 0.0000, -1.0000, 20.0000, 20.0000, 0, 0, 0, 1, 0) returned 0

note: LJOG     max: 100.000 units/sec 6000.000 units/min
note: LJOG default: 0.250 units/sec 15.000 units/min
note: AJOG     max: 10.000 units/sec 600.000 units/min
note: AJOG default: 10.000 units/sec 600.000 units/min
waiting for s.joints<0>, s.kinematics_type<0>
emcJointSetMaxVelocity(3, 1.0000) returned 0
emcJointSetMaxAcceleration(3, 100.0000) returned 0
emcJointActivate(3) returned 0
emcJointSetType(4, 2)
emcJointSetUnits(4, 1.0000)
waiting for s.joints<0>, s.kinematics_type<0>
emcJointSetBacklash(4, 0.0000) returned 0
emcJointSetMinPositionLimit(4, -800.0000) returned 0
emcJointSetMaxPositionLimit(4, 800.0000) returned 0
waiting for s.joints<0>, s.kinematics_type<0>
emcJointSetFerror(4, 0.5000) returned 0
emcJointSetMinFerror(4, 0.0500) returned 0
emcJointSetHomingParams(4, 0.0000, 0.0000, -1.0000, 20.0000, 20.0000, 0, 0, 0, 1, 0) returned 0
emcJointSetMaxVelocity(4, 1.0000) returned 0
emcJointSetMaxAcceleration(4, 100.0000) returned 0
waiting for s.joints<0>, s.kinematics_type<0>
emcJointActivate(4) returned 0
emcJointSetType(5, 2)
emcJointSetUnits(5, 1.0000)
emcJointSetBacklash(5, 0.0000) returned 0
emcJointSetMinPositionLimit(5, -800.0000) returned 0
emcJointSetMaxPositionLimit(5, 800.0000) returned 0
emcJointSetFerror(5, 0.5000) returned 0
emcJointSetMinFerror(5, 0.0500) returned 0
emcJointSetHomingParams(5, 0.0000, 0.0000, -1.0000, 20.0000, 20.0000, 0, 0, 0, 1, 0) returned 0
emcJointSetMaxVelocity(5, 1.0000) returned 0
waiting for s.joints<0>, s.kinematics_type<0>
emcJointSetMaxAcceleration(5, 100.0000) returned 0
emcJointActivate(5) returned 0
emcAxisSetMinPositionLimit(0, -8000.0000) returned 0
emcAxisSetMaxPositionLimit(0, 8000.0000) returned 0
emcAxisSetMaxVelocity(0, 100.0000) returned 0
emcAxisSetMaxAcceleration(0, 100.0000) returned 0
emcAxisSetLockingJoint(0, -1) returned 0
emcAxisSetMinPositionLimit(1, -8000.0000) returned 0
emcAxisSetMaxPositionLimit(1, 8000.0000) returned 0
emcAxisSetMaxVelocity(1, 100.0000) returned 0
emcAxisSetMaxAcceleration(1, 100.0000) returned 0
emcAxisSetLockingJoint(1, -1) returned 0
emcAxisSetMinPositionLimit(2, -8000.0000) returned 0
emcAxisSetMaxPositionLimit(2, 8000.0000) returned 0
emcAxisSetMaxVelocity(2, 100.0000) returned 0
emcAxisSetMaxAcceleration(2, 100.0000) returned 0
emcAxisSetLockingJoint(2, -1) returned 0
waiting for s.joints<0>, s.kinematics_type<0>
emcAxisSetMinPositionLimit(3, -800.0000) returned 0
emcAxisSetMaxPositionLimit(3, 800.0000) returned 0
emcAxisSetMaxVelocity(3, 100.0000) returned 0
emcAxisSetMaxAcceleration(3, 100.0000) returned 0
emcAxisSetLockingJoint(3, -1) returned 0
emcAxisSetMinPositionLimit(4, -800.0000) returned 0
emcAxisSetMaxPositionLimit(4, 800.0000) returned 0
emcAxisSetMaxVelocity(4, 100.0000) returned 0
emcAxisSetMaxAcceleration(4, 100.0000) returned 0
emcAxisSetLockingJoint(4, -1) returned 0
emcAxisSetMinPositionLimit(5, -800.0000) returned 0
emcAxisSetMaxPositionLimit(5, 800.0000) returned 0
emcAxisSetMaxVelocity(5, 100.0000) returned 0
emcAxisSetMaxAcceleration(5, 100.0000) returned 0
emcAxisSetLockingJoint(5, -1) returned 0
emcJointSetMotorOffset(0, -69.7725) returned 0
emcJointSetMotorOffset(1, 4.8505) returned 0
emcJointSetMotorOffset(2, 24.0837) returned 0
emcJointSetMotorOffset(3, -0.0000) returned 0
emcJointSetMotorOffset(4, -28.9342) returned 0
emcJointSetMotorOffset(5, -69.7725) returned 0
emcJointSetMotorOffset(6, -0.0000) returned 0
emcJointSetMotorOffset(7, -0.0000) returned 0
emcJointSetMotorOffset(8, -0.0000) returned 0

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

More
06 Jan 2021 12:44 #194212 by tommylight
It all seems OK, and it shows at what value the velocities are being set for each joint:
emcAxisSetMaxVelocity(0, 100.0000) returned 0
So that will be 6000mm/m, and that still falls under what you are getting in the video above, so all is good.
I would definitely set the same value for the corresponding joint/axis for velocity and acceleration.

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

More
06 Jan 2021 20:32 #194282 by 3radfahrer
Thats right, all seems ok.

You are right, the 100mm/s for the AXIS are larger than the driven speed, so that limit is not violated.
But the values for the JOINTS maximum velocity (emcJointSetMaxVelocity) are all set properly to 1mm/s and 10mm/s respectively, and these are the limits that get exceeded when driving in world-mode. That the values are somehow set properly, which can be shown when driving in joint-mode: then the joint-limits are respected properly.

regarding your last suggestion, if I understood you correctly:
Why would you set the same values for corresponding axis/joints? This would make the separation in joints and axis kind of redundant, or?
and how would you determine the correct axis/joints-correspondances, since there is (for this six-roational robot-kinematic) never a generally valid correspondace between a cartesian axis and any of the joints?

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

More
06 Jan 2021 21:04 #194283 by tommylight
Yeah that is a bit complicated for some use cases, but in robots one axis is one joint, and in world mode the Axis setting appear to be used as they should, so setting them to the same value would also limit them in world mode.
To tired, can not think properly, later.

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

More
06 Jan 2021 21:28 #194289 by 3radfahrer
Thanks for your fast anwser.

I followed your suggestion from your previous post: all joints and all axis set on 10mm/s max velocity. But the result is the same: The TCP-Velocity is limited to the values from the axis-sections, and the limits of the max_velocities of the joints seem not to be considered...

I don't want to keep you from your rest, maybe you can share a document or link, that explains this context in particular for linuxcnc because I thought (till now) I'm sort of familiar with this axis/joint topic since I implemented the transformations for several kinematics in matlab that implicate this joint/axis item :P

Cheers and have a good rest ;-)

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

More
06 Jan 2021 21:48 #194295 by 3radfahrer
It's me again ;-)

one additional note: according to the linuxcnc 2.8.1 documentation the demand on "axis value must be the same as joint value" is only necessary for idendity-kinematics like "trivkins"...

I am confused ;-)

Cheers, Do
Attachments:

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

More
07 Jan 2021 07:39 #194329 by rodw
Do the individual joints violate their limits?

Think about this. If you are moving the X & Y axis to traverse at 45 degrees, and both axes are travelling at their max velocity, the actual velocity of the milling cutter will be higher.

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

Time to create page: 0.085 seconds
Powered by Kunena Forum