Trajectory Planner using Ruckig Lib

More
3 years 1 week ago #283643 by rodw

Hi Rod,

It is that code for jogging and homing are done outside this trajectory planner. And also adding INI values require
extra code to inihal, inijoint, iniaxis and so on. The lcnc command struct's and other data struct's like nml need a max_jerk value.
Perhaps these values could be added in a seperate custom homing module that is also loaded with HOMEMOD in the ini files. It is posssoble to create new joint pins there (probably axis pins also). I have done this with joint pins. You have already said the simple planner could be integrated with an ini file.

Providing a limited jerk module would be a powerful incentive to adopt CMAKE.
My interest is in making sure you guys are aware of the existing features of Linuxcnc that support custom trajectory planners and homing modules so everything is compartmentalised in terms of the overall architecture design.

My thinking is that if the code outside of these custom modules requires changing, then the core code should be changed in a seperate PR now, rather than down the track as a single commit.
 
The following user(s) said Thank You: Grotius, Beef

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

More
3 years 1 week ago #283696 by Grotius
Hi Rod,

During the lcnc startup it prints original :
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod

We added components to jog and run programs with scurve, leaving homing untouced :
linuxcnc TPMOD=tpmod_scurve HOMEMOD=homemod EMCMOT=motmod_scurve

Above is compartimented and works excellent !

My thinking is that if the code outside of these custom modules requires changing, then the core code should be changed in a seperate PR now, rather than down the track as a single commit.

Mr Garret could look at this :  emc/motion/control.c is around 2000+ lines and at line 269 :
mot_comp_id = hal_init("motmod_scurve");

This fixed text should be made non_fixed, otherwise user can not select custom jog component.
In the cmake build, it's easy to create a control_scurve.c file. But it's code duplication. But it fix's it for now.
The following user(s) said Thank You: tivoi, rodw, Beef

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

More
3 years 1 week ago #283698 by rodw
Sounds good. Nice and modular.
Can you provide a lin to that line. Its not jumping out for me in your repo or linuxcnc's
The following user(s) said Thank You: Grotius, Beef

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

More
3 years 1 week ago #283701 by Grotius
The following user(s) said Thank You: tivoi, Beef

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

More
3 years 6 days ago #283876 by Grotius
Hi,

A little update.

The scurve trajectory planner works for each segment (gcode arc or line).
It start's and stops each segment, doing a scurve motion profile.
Pause and resume works, stop doesn't work for now. No blending for now.

github is updated: link to code

 
The following user(s) said Thank You: akb1212, tommylight, Clive S, tivoi, pommen, rodw, Joco, DHeineck, Beef, nwallace

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

More
3 years 4 days ago - 3 years 4 days ago #283962 by Grotius
Hi,

I had to do some research to find out how the trajectory planner must behave, and how to avoid lcnc freezing during
switching auto, mdi, manual. This all is because i did'nt know or see the correct program flow.
When things are unclear, strange error's occur etc.

All of this is related how the pre-defined trajectory planner function's are used or must be used.
There is not really a explanation for it. So you are on your own.

To overcome this know-how problem i made a minimal coded trajectory template component : tp_template.c
Now this file compiles to the component : tp_template.so wich can be loaded in the ini file under the [TRAJ] section.

Now we have a working trajectory template component, that rules out wrong usage i had done before.

Most of the problems where related to tpIsDone . And how to use it.

Ok, now i can go finish the scurve component, add the stop sequence.
Test some mdi moves etc. Hopely now it will go good !
Last edit: 3 years 4 days ago by Grotius. Reason: remove empty spaces.
The following user(s) said Thank You: tommylight, tivoi, rodw, Beef

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

Time to create page: 0.407 seconds
Powered by Kunena Forum