Trajectory Planner using Ruckig Lib
I don't think there is any requirement to use halcompile to build the TP module. There are plenty of components written without it so you should be ablr to use Cmake to build you module.@rodw
Yes, I mostly agree - however if we would like to be able to package the trajectory planner with LinuxCNC at some point its much easier to build it with CMake. I discovered this myself while attempting to get the trajectory planner to compile alongside the rest of the project, I spent more time trying to get it to properly compile/link and fighting the preprocessor macros than actually making progress on the code itself. However, it can be done as a separate project using HALCompile as you said.
The way I see it, this recent change to allow replacement modules is perfect for your project as it compartmentalises the code you need to write from the core code.
Please Log in or Create an account to join the conversation.
gitlab.com/mecatronyx/opencnc/opencn
Please Log in or Create an account to join the conversation.
I wish I could contribute but I don't have the skills nor the time for it. Time available might change in a couple of months, but what can a newcomer on this topic really do?
When it comes to development methods my view is that you do it the way you find most efficient. Full freedom. Develop and demonstrate that it works. Then, when and if it should be integrated into the linuxcnc source tree, that is the time to start discussions on cmake etc.
Please Log in or Create an account to join the conversation.
Opencn use C code generated by matlab and they say you need to have a commercial licence to matlab to use it. They were a university so it was free to them on an educational license. I did look at the licences once and could not see that was an impediment for an open source project.Hey beef, have you seen the opencn project? its kinda similar, in the sense they use matlab instead of ruckrig. they changed a lot but maybe it has something useful
gitlab.com/mecatronyx/opencnc/opencn
Please Log in or Create an account to join the conversation.
For using scurve jogging in lcnc, i coded the ruckig scurve library into the motdot.so library that is used for jogging.
It seems to work now.
github.com/grotius-cnc/linuxcnc/blob/mai...tmod_src/simple_tp.c
A picture of the jog output in axis:
github.com/grotius-cnc/linuxcnc/blob/mai...ts/motmod/screen.jpg
I need to add the "jerk_max" value into the lcnc .ini file and read this value into the motdot.so lib when lcnc starts up.
Any suggestions?
Please Log in or Create an account to join the conversation.
jerk_max is per joint or per axis? questions questions
Edit: jerkmax is settable by G-code in 3d-printing so that can be a way. But what is the interaction with G64 setting, if any?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Just a little update today.
github.com/grotius-cnc/linuxcnc/ is a repository with a cmake project.
It builds linuxcnc without the original make file.
Currently only tested to startup a axis gui after build.
In the above repository ruckig is implemented for jogging a scurve motion profile.
Also a max_jerk value is added in the axis_mm.ini file:
# Joints sections
[JOINT_0]
MAX_JERK = 200
This value can be changed in runtime by setting a new value for this ini pin.
The picture shows the x axis jogging output in hal :
picture
Now waiting for beef's update.
Please Log in or Create an account to join the conversation.
I will have some more videos available soon as we continue to resolve some of the outlying issues, but you can see the results of some various jerk values that (as Grotius said) initialized through .ini but are HAL pins so can be changed on the fly.
HALscope outputs are attached (also in the same Testing_TEMP on github ... i'll remove this down the road)
github.com/TheRealBeef/LinuxCNC-CMake/bl...Testing_TEMP/low.mp4
github.com/TheRealBeef/LinuxCNC-CMake/bl...Testing_TEMP/med.mp4
github.com/TheRealBeef/LinuxCNC-CMake/bl...esting_TEMP/high.mp4
Hopefully we have more to show soon, and of course once I sort out teleop (or am brave enough to home this thing) I will come back with a better video demonstrating the trapezoidal vs s-curve and some more documentation.
Please Log in or Create an account to join the conversation.
- Packaging the community version of Ruckig is fine
- They don't sell individual/hobby licenses for Ruckig Pro (although it may not be needed anyway)
- They're willing to help with some technical questions
One bit that's worth more digging into as we move into the actual trajectory planner instead of just the simple_tp for jogging is figuring out how to keep lookahead functionality working without delving into the Ruckig Pro version. I've copied the email directly here as I have to do some thinking and it may be interesting for the rest of you
From me:
And their reply:However, to my understanding the only way to keep the lookahead functionality that LinuxCNC's trapezoidal trajectory planner has will require the use of intermediate waypoints, which is in the Ruckig Pro version.
We'll look into the various solutions moving forwards, just wanted to provide an update.Yeah, this seems to be correct. However, the intermediate waypoints might work a bit different than what you might expect in the CNC world. Basically Ruckig Pro will calculate a time-optimized trajectory going through all waypoints exactly.
If you apply Ruckig to control each axes directly, it might deviate from a straight-line path between waypoints, and in general the time-optimization works best for fewer waypoints. More info in our docs here. There is a cloud server built into the community version to try out the intermediate waypoints (of course with lot’s of latency), but it’s good to make sure that the intermediate waypoints work as expected.
You can also apply Ruckig to time-parametrize the path in a single DoF, so that you stay exactly on the path. This way you can add kinematic limitations easily, but it would still require intermediate waypoints for the lookahead. Which approach do you have in mind?
Please Log in or Create an account to join the conversation.