- LinuxCNC
- General LinuxCNC Questions
- How would you design a real time application for cnc control in c / c++ ???
How would you design a real time application for cnc control in c / c++ ???
In the last 6 years I have never found the time to do this .... very well done. In my attempts I was getting too many disconnections from nml .... now that I see what you have done I understand that it was quite normal that I received them. But I am merciful to myself, I have many ideas, but I am not a good programmer and I often get lost in a glass of water.
Thanks again.
Please Log in or Create an account to join the conversation.
Thanks buddy for your kind words.
If you sent c++ command's trough the halui interface, it works just fine. In my opinion the best way to start with.
You can see i use the existing interface of the c++ halcommand source code. So in fact you can do every halcommand
though c++ in this way, or trough a c++ system(" ") command if you have more time.
If you use c++ with the nml channel (commands), the channel must be destructed or closed in the right way.
In my code sample that is not properly done. With every nml command i create a new channel.
After a few minutes and many nml commands some kind of overflow happens and lcnc
becomes slow. Keep that in the mind.
I have many ideas, but I am not a good programmer and I often get lost in a glass of water.
Me too. Today i was starting to make my first mobile app. After multiple hours i now got my first c++ app working on my android phone.
A few day's ago i made my first webserver and webclient chatprogram trough a onion proxy.
This worked in a few hours, thanks to some github qt examples. I came to the conclusion that the chatprogram is really invisible, even
HexChat could not see it, because HexChat uses channels and my app not. Every day you can learn something different, if you
have the time to do it.
If you use the chatprogram (tcp based) on your mobile phone, you can control lcnc trough a onion webserver. This is safer then a telnet interface with in fact an open backdoor. Also no port forwarding is required and it is invisible.
Please Log in or Create an account to join the conversation.
anyway I forked your project .... the idea is to use only halui commands .... about nml .... it's not just an overflow problem .... there's more ... if run the classic example of positon logger running a 5 axis gcode with thousands of do / while cycles, the position logger runs for hours (on qt I ran it on a separate thread from the main) .... but if sometimes pause and then run ..... only then is there disconnection. I think it depends on the propagation of commands. I have not read the code well .... but I know the programmers .... those certainly have privileged the commands coming from the python flow of axis the historical gui .... in fact all the other gui, while working very well are not " granite "like axis gui. nml is certainly the most "mistreated". I think the misconception is that axis gui is the official Lcnc gui ..... while for correctness it should be nml the core of every gui or halui too. In this way every gui would have equal dignity. However I understand very well that it is easier to write a code with "import linuxcnc" on the first line and then a series of simple commands. Just to reinforce the concept not even halui as an interface is "granitic" as axis gui. This speaks volumes. If halui had a complete and well tested tools of commands and states, that could be the official gui .... even in this way all the gui that used halui as a base would have equal dignity.
But you have to be satisfied .... what is on Lcnc is really a lot and thanking the developers is never enough.
thanks Again
bkt
Please Log in or Create an account to join the conversation.
And have been able to build it in QT without error when I run it the gui starts but as soon a I click on "load robot model" or "reset joints" the gui crashes with error .."/skynet crashed".
The problem of being able to switch between trivial and coordinated kinematics using KDL will also need to be adressed.
Just give me a detailled practical example of the problem. Then i can think about it.
Well, the problem is the math involved in the inverse kinematics. All known kinematics for serial manipulators and many others suffer from singularities where the results become infinite for certain values (See also "gimbal lock"). This effectively means that it is necessary to be able to use coordinated moves (using the non-trivial kinematics of say the KDL library) AND Joint moves (using trivial kinematics) that directly use joint angles in the "gcode". In LCNC I can use dewey garretts "switchkins"-branch to do just that: switch between "trivkins" and "genserkins" inside a gcode programm.
For this reason I had hoped it would be possible to wrap the access to the KDL kinematic library inside a modified LCNC-kinematics file. So instead of doing the forward and inverse kinematic calculations inside the C code of the kinematics file it would be piped through another file using the KDL library.
As I'm not a programmer I have no idea if this is totally ridiculous but it seems the easiest approach to me.
Please Log in or Create an account to join the conversation.
regards
bkt
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
But if it approach to singularity point in poin-to-point move it changes it axis angles (also doesn't keep tool position precisely) and keep moving after rebuilding it.
Please Log in or Create an account to join the conversation.
- TheRoslyak
- Offline
- Elite Member
- Posts: 238
- Thank you received: 37
I'm ashamed of Grotius leading a topic on the forum forum.linuxcnc.org/27-driver-boards/4031...on-ethercat?start=40
And he gave me a link to his project and I try to build them.
I settled on an error. But "iso live-image-amd64.hybrid.iso, 3.275Gb" is broken.
Can you give me this iso or give advise to fix it?
Please Log in or Create an account to join the conversation.
I did it. It's work
The questions are as follows:
1 Now It works in linear move. Can I simulate circular movements or G64 in hal files?
2 I find 16 joint (0-15pcs). In theory, I could manage them. But RSH is not suitable for this, because there are no free letters:)
How can I use them independently? May be New HAL or any else?
3 In general, it would be nice. Make a new application based on Linuxcnc source. Why did you give up the idea of "STUXNET_Cascade". I still don't understand this new app or plugin for Linuxcnc.
PS I have a lot of ideas and solutions, but I will discuss. I'm waiting for a dialogue
Ну так ты же это сделал! Сделай еще раз? Какие проблемы? Фонды у тебя неограничены
Please Log in or Create an account to join the conversation.
- TheRoslyak
- Offline
- Elite Member
- Posts: 238
- Thank you received: 37
PS То что я сделал Это скорее помогло познать как писать собственные хал компоненты. Если не трудно можешь скинуть свои контакты или ссылку где можно обсудить нанную тему. Что бы здесь не флудить своим Русским речитативом)
Please Log in or Create an account to join the conversation.
- LinuxCNC
- General LinuxCNC Questions
- How would you design a real time application for cnc control in c / c++ ???