hal-core
- Grotius
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 2239
- Thank you received: 1958
16 Aug 2021 13:41 - 16 Aug 2021 13:44 #217883
by Grotius
hal-core was created by Grotius
Hi,
If you want to deliver a machine like a cnc-bandsaw you could consider to use the hal-core code with
your own component or components.
When not to use :
- If you need a linuxcnc nml interface, linuxcnc's motion planner, linuxcnc gtk or qtvcp gui's.
- If you like Python.
When considering to use:
- If you like small software package's.
- If you like C and C++
- If you like Qt-c++ gui's
Further info:
- No real coding knowlegde is needed.
- Start learing to write a component. Examples included with source.
github.com/grotius-cnc/hal_core
If you want to deliver a machine like a cnc-bandsaw you could consider to use the hal-core code with
your own component or components.
When not to use :
- If you need a linuxcnc nml interface, linuxcnc's motion planner, linuxcnc gtk or qtvcp gui's.
- If you like Python.
When considering to use:
- If you like small software package's.
- If you like C and C++
- If you like Qt-c++ gui's
Further info:
- No real coding knowlegde is needed.
- Start learing to write a component. Examples included with source.
github.com/grotius-cnc/hal_core
Last edit: 16 Aug 2021 13:44 by Grotius.
The following user(s) said Thank You: tjtr33, tommylight, Clive S, bkt
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
16 Aug 2021 23:55 #217934
by andypugh
Replied by andypugh on topic hal-core
You can do this with a stock LinuxCNC installation. (And I often do).
So I guess this is mainly about saving disc space?
So I guess this is mainly about saving disc space?
Please Log in or Create an account to join the conversation.
- Grotius
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 2239
- Thank you received: 1958
17 Aug 2021 11:12 #217971
by Grotius
Replied by Grotius on topic hal-core
Hi Andy,
You can do this with a stock LinuxCNC installation. (And I often do).
Yes, that is ok. The disk space is not as important for me.
If a company or individual want's to build something from scratch and needs in fact only a hal platform without
any entanglement with nml, tcl, python, etc. Then this becomes useful.
My strategy is to build and provide future program's from this empty hal template.
It now build's outside of qt. I will try to create a qt project of this repository.
What i did is removed everything except a working rtapi / hal environment and included a example how to build realtime components with the gcc command instead of the python-halcompile.
I had to remove the nml interface from some hal source files. Also the tcl (gtk based stuff) source is removed.
It is configured for uspace.
I just updated the repository code again. It is quite clean now. The filesize is 6.8Mib.
It can be a useful startpoint if you want to build something from scratch.
In my previous attempt's i failed trough complexity during the cleanup process.
You have to constantly check if it builds etc, otherwise you are lost. Now i succeeded quite easely.
You can do this with a stock LinuxCNC installation. (And I often do).
Yes, that is ok. The disk space is not as important for me.
If a company or individual want's to build something from scratch and needs in fact only a hal platform without
any entanglement with nml, tcl, python, etc. Then this becomes useful.
My strategy is to build and provide future program's from this empty hal template.
It now build's outside of qt. I will try to create a qt project of this repository.
What i did is removed everything except a working rtapi / hal environment and included a example how to build realtime components with the gcc command instead of the python-halcompile.
I had to remove the nml interface from some hal source files. Also the tcl (gtk based stuff) source is removed.
It is configured for uspace.
I just updated the repository code again. It is quite clean now. The filesize is 6.8Mib.
It can be a useful startpoint if you want to build something from scratch.
In my previous attempt's i failed trough complexity during the cleanup process.
You have to constantly check if it builds etc, otherwise you are lost. Now i succeeded quite easely.
Please Log in or Create an account to join the conversation.
- udoS
- Offline
- Elite Member
Less
More
- Posts: 216
- Thank you received: 25
08 Sep 2021 10:11 #219920
by udoS
Replied by udoS on topic hal-core
@Grotius
The HAL has pin to send the encoder act pos over nml RCS_CMD to the cnc.
I realy could use that.
Best rgds
The HAL has pin to send the encoder act pos over nml RCS_CMD to the cnc.
I realy could use that.
Best rgds
Please Log in or Create an account to join the conversation.
- Grotius
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 2239
- Thank you received: 1958
08 Sep 2021 17:27 - 08 Sep 2021 17:29 #219979
by Grotius
Replied by Grotius on topic hal-core
Hi Udo,
Please not spread the same questions around different topics.
And halcore is free of NML, python, etc.
Please not spread the same questions around different topics.
And halcore is free of NML, python, etc.
Last edit: 08 Sep 2021 17:29 by Grotius.
Please Log in or Create an account to join the conversation.
- Dave3891
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 5
21 Oct 2021 22:19 #223844
by Dave3891
Replied by Dave3891 on topic hal-core
Hi Grotius,
I have been trying to get this to work on a fresh install of Debian 11, I have all the make files working.
The problem is when I try to run the halrun script, I get the following errors when I run it as sudo or regular
Not sure what to do, the halcmd program seems to work, but it won't load any thread modules
I have been trying to get this to work on a fresh install of Debian 11, I have all the make files working.
The problem is when I try to run the halrun script, I get the following errors when I run it as sudo or regular
ael@debian:/opt/hal-core/scripts$ sudo ./halrun -U
Refusing to run as root without fallback UID specified
To run under a debugger with I/O, use e.g.,
sudo env RTAPI_UID=`id -u` RTAPI_FIFO_PATH=$HOME/.rtapi_fifo gdb /opt/hal-core/bin/rtapi_app
ael@debian:/opt/hal-core/scripts$ ./halrun -U
/opt/hal-core/scripts/realtime: line 176: /opt/hal-core/bin/rtapi_app: Permission denied
ael@debian:/opt/hal-core/scripts$
Not sure what to do, the halcmd program seems to work, but it won't load any thread modules
Please Log in or Create an account to join the conversation.
- Grotius
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 2239
- Thank you received: 1958
23 Oct 2021 19:17 - 23 Oct 2021 19:24 #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.
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:
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.
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:
$ ./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: 23 Oct 2021 19:24 by Grotius.
Please Log in or Create an account to join the conversation.
- Grotius
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 2239
- Thank you received: 1958
23 Oct 2021 19:41 #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.
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.
- rodw
- Away
- Platinum Member
Less
More
- Posts: 10747
- Thank you received: 3543
23 Oct 2021 22:26 #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.
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.
- Dave3891
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 5
24 Oct 2021 02:37 #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?
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.
Time to create page: 0.078 seconds