hal-core

More
5 years 1 week ago - 5 years 1 week ago #224021 by Grotius
Replied by Grotius on topic hal-core
Hi,

Halcore is by default installed in the /opt/ dir, i see you did this oke.

After the configure scripts you have to do a trick.
To insert kernel modules as user in the future, you have to type : "sudo make setuid"
This will give the user "superuser" privileges for inserting kernel modules. image missing /media/kunena/emoticons/smile.png

Info:
github.com/grotius-cnc/hal-core/blob/main/src/configure
Line 11152 :  " sudo make setuid "

github.com/grotius-cnc/hal-core/blob/main/src/readme.md
Install by makefile:
Code:
$ ./clean $ ./configure $ make -j2 $ sudo make setuid Then if you have a problem inserting kernel modules, the readme says: If app refuses to insert kernel module try: This is actually the command "sudo make setuid". $ sudo chown $USER -R rtapi_app $ sudo chown $USER -R module_helper $ sudo chmod 777 rtapi_app $ sudo chmod 777 module_helper The above $USER has to be replaced with your username. If you search with : $ sudo find . -name rtapi_app You will find the file.
Last edit: 5 years 1 week ago by Grotius.

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

More
5 years 1 week ago #224024 by Grotius
Replied by Grotius on topic hal-core
Info:

For the trajectory planner i will make an update coming time.
Current code : github.com/grotius-cnc/hal_trajectory

The trajectory planner has a s-curve motion profile implemented, this works oke with hal-core.

However,

What i really miss is a path optimizer algoritme to optimize speed in small corners, small circles, high velocity path's, etc
in such a way the machine off path stay's minimal, like zero mm.
It's like sampling the machine's g-force to optimal result.

Today i worked out a concept that samples the path planner to optimal results.
I will implement this algo as look ahead function. I think it should work, it only takes time to implement the code.

 

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

More
5 years 1 week ago #224036 by rodw
Replied by rodw on topic hal-core
This might help. I have a branch here  github.com/rodw-au/linuxcnc/tree/arc-radius
that extends state tags to report the arc radius in real time as a hal motion pin.
You should be able to calculate the maximum velocity for a given acceleration and arc radius.
The Khan Academy loop de loop is a humourous way to describe the maths required.

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

More
5 years 1 week ago #224058 by Dave3891
Replied by Dave3891 on topic hal-core
Thanks Grotius,

Running those commands manually with $USER replaced with my name fixed the problem. It seems to be working now.

One thing I had to do to get everything to compile was add include statements to halcmd_completion.h for ctype.h and string.h, not sure if this is something that needs to be changed on the github code or it was just me?

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

More
5 years 1 week ago #224073 by Grotius
Replied by Grotius on topic hal-core
Hi Dave,

Thanks for the feedback.

not sure if this is something that needs to be changed on the github code or it was just me?

I just tested hal-core on a clean install. It looks to me it was just you. But i added a "prepare" file to the source that will
install the dependencies for you. It turn's out we only need 4 primairy dependencies. That's quite clean isn't it?

github.com/grotius-cnc/hal-core/blob/main/Readme.md

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

More
5 years 1 week ago - 5 years 1 week ago #224076 by Grotius
Replied by Grotius on topic hal-core
Hi Rod,

Thanks for your comment.

I have to be more specefik.
 

In the lcnc code there is a G64P0.01 to stay on path.
This will eliminate the cnc motion overshoot's in blue. I think the off path dist called "Ferror" in the ini files.

The motionplanner i have written calculates a path from a gcode. For example line 1,2 + arc 3 + line 4 + 5 will
be a motion where the s-curve does it's thing from start to end.

This video shows how the motion is done : user-images.githubusercontent.com/448801...7ee-0a229e1caa60.mp4

The stepgen component will try to stay at tcp speed, but
will overshoot at some corners if the machine speed is too high. There are plenty senario's where the machine has to slow down, but there are also plenty senario's where the machine may stay at full speed.

Therefore i have the idea to make a look ahead function that samples the Velocity end, Velocity start to get optimal results.
Green is a programmed value like Velocity : 10.
After the algo is done, it turn's out the machine will not overshoot if the Velocity-end of 1 = 8. 
And so on.

So every gcode line has to be sampled and will get a different optimal value for Velocity start and Velocity end.
The s-curve max velocity will be used always. So when the machine can do it, it will go full trottle.
But with complex gcode it will sample until it will find the best g-force results, according to the acc and dcc values.

The picture is made with : sudo apt-get install gnome-paint









 
Last edit: 5 years 1 week ago by Grotius.

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

Time to create page: 0.255 seconds
Powered by Kunena Forum