How would you design a real time application for cnc control in c / c++ ???

More
30 Nov 2020 14:56 #190685 by Aciera
So I started again with a new ISO install and installed the qt online installer and installed the missing libxcb-util1 then installed cmake and made the archive. Then I pointed "Qt versions" to the correct location as in the git tutorial.
Now when I try to compile a new project the compile buttons are inactive. I think this is because it can't find a "Kit". How do I point it to the correct Kit?

Attachments:

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

More
30 Nov 2020 17:43 - 30 Nov 2020 18:04 #190690 by Grotius
Hi Arciera,

Here i did point out to the "tab page" QT Versions, Tab Kits seems oke.

You can try to install my provided qt version. It's just copy paste.
Then you don't have to use the online installer, etc.
howto: github.com/grotius-cnc/QT_Creator/releases

Tonight my pc is going to make a iso again. This take's several hours. And is not the final iso. Just a test iso.



video



Looks good very impressive.
Thank you !

Seems like there were a few times when the kinematic crossed a singular point though (when the arm suddenly changes postures).
Yes.


The other thing that is still not clear to me is the capability to change between Joint, cartesian world and cartestian tool coordinate mode in the same gcode.

At the moment it's only following the gcody by xyz positions.

If we only use cartesian modes the arm cannot reach all of its potential work space because the kinematic model will produce infinite solutions when the arm approaches certain postures (ie two joints becoming colinear). To move between such "subspaces" requires the use of joint mode where the inverse kinematic is not used and then we need to be able to switch back to coordinated moves where the kinematic calculates the joints position through the inverse kinematic.
Once you have played with the app. You can see yourself what's happening. It is possible to integrate a script that avoid's
elbow back moves or moves that will lock the robot position. With the IK you can define minimal and maximal jointpositions for each joint for every IK calculation. If you are about to trigger an impossible situation you could activate a minimal joint value for a certain joint to prevent locking. Sometimes the IK from current_position or the IK taken from init_position make's some difference in moves. You will see that. Its the second variable input 0 or 1 of the IK function.

What would a gcode program look like if I wanted to use all those different modes and change from one to the other?

Yes, that's something to think about. Lcnc can use comments that cannot be readed. Our app can read the comments if we want to.
But yeahh. A gcode command for joint moves only is nice to have ! We have to think about that.
Attachments:
Last edit: 30 Nov 2020 18:04 by Grotius.
The following user(s) said Thank You: Himarc3D

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

More
30 Nov 2020 18:03 - 30 Nov 2020 18:09 #190692 by Aciera

You can try to install my provided qt version. It's just copy paste.
Then you don't have to use the online installer, etc.


Hm, now I'm totally confused. Do I need to download the ISO again or where is the qt creator installation suddenly coming from without using the online installer?

[edit]
Ah, pffff. I just realized there are downloads at the bottom of the git page. But anyway this is still a bit unclear to me:


If I recall correctly there was no QT folder in the /home directory before I ran the online installer. So were would I do this:
My command to make the archive, in terminal where Qt directory is, archive name is archive.tar.gz :
$ tar -czvf archive.tar.gz Qt
Last edit: 30 Nov 2020 18:09 by Aciera.

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

More
30 Nov 2020 18:09 - 30 Nov 2020 18:19 #190693 by Grotius
Hm, now I'm totally confused.

Aii. I am sorry for that.

You don't have to download the iso.

or where is the qt creator installation suddenly coming from without using the online installer?
I did some magic, and uploaded qt files to my git channel. This is a full qt install in one folder with a separate desktop launcher.
I thought. That's handy for you. I changed the licence from GPL3 to MIT. :lol:

My command to make the archive, in terminal where Qt directory is, archive name is archive.tar.gz :
$ tar -czvf archive.tar.gz Qt

This is a comment for me, for if i do it a next time.

Just unpack the archive from my git channel to your desktop. Put the desktop launcher also on the desktop.
Then it is about to work, i think.

I tested this today on a clean iso install. I had to change a few things inside qt to get it compile the skynet app.
I hope it will work for you also.

Beside above solution i am building a new iso, where everything is pre-configured But this takes more time.
Last edit: 30 Nov 2020 18:19 by Grotius.
The following user(s) said Thank You: Aciera

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

More
30 Nov 2020 18:12 #190695 by Aciera

I did some magic, and uploaded qt files to my git channel. This is a full qt install in one folder with a separate desktop launcher.
I thought. That's handy for you.


Ah, yes that IS handy, thanks. I'll do a fresh install tomorrow and try again.
I might get there yet...

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

More
01 Dec 2020 07:05 #190742 by Aciera
So I reinstalled and everything but I get new compile errors. I think I'll wait for the new iso.

Attachments:

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

More
02 Dec 2020 10:34 - 02 Dec 2020 10:58 #190864 by Grotius
@ Hi Arciera,



You can download the iso.
iso live-image-amd64.hybrid.iso, 3.275Gb

Leave root pass empty, only username & pass.
Run the auto installers on desktop to your needs.

I forgot one thing to do in the iso. You have to do this by hand :
Copy the Qt directory at /usr/share/ethercat/ to your desktop.

Your Qt_Creator desktop launcher command to check is :
"Desktop/Qt/Tools/QtCreator/bin/qtcreator"

Start Qt, add a kit (this will create a default kit), add Qt Versions : Desktop/Qt/5.15.1/gcc_64/qmake

When you load the Qt project "Qt_skynet_app" at your Desktop, file "Skynet.pro" it will configure and you can compile this.

After the first compile, put the following folders from "/home/**yourname**/Desktop/Qt_skynet_app" into the build directory :
- gode, -hal, -robot.
Your build directory will be something like : Desktop/build-Skynet-Desktop-Debug/

If you now start the compile process again, you can load the FactoryApp.xml project files.
Later on this day i will update a new pre-release that has repared stepcolors.

--
Some additional info :

I will do the iso live build again tonight, to include above change.

This iso has some improvements releated to my first Edition.
I noticed the lcnc reprository was giving error's about pgp key's. This was not the case with
my first RTOS iso release. So something is changed over there. And i am almost convinced that it will change another time.

So to avoid this in the future forever, i have included all .deb's in maps /usr/share/ethercat/deps and /usr/share/eterhcat/deps_oce.
This save's much time during the live-build and for future releases. Have Fun !!

One thing, this iso is too big for GITHUB.
Who has hosting space for my iso's?
Attachments:
Last edit: 02 Dec 2020 10:58 by Grotius.
The following user(s) said Thank You: tommylight, Aciera

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

More
02 Dec 2020 15:14 - 02 Dec 2020 15:15 #190878 by Aciera
Thanks for your efforts. Must have been a ton of work. I have now succeeded to compile and run "Skynet Robot Controller"!

A few notes for other users:

Run the auto installers on desktop to your needs.

I also had to run the "Ethercat_installer" as Skynet.pro did not compile without it.

Start Qt, add a kit (this will create a default kit), add Qt Versions : Desktop/Qt/5.15.1/gcc_64/qmake

should be:
Start Qt, add a kit (this will create a default kit), add Qt Versions : Desktop/Qt/5.15.1/gcc_64/bin/qmake

add Qt Versions : Desktop/Qt/5.15.1/gcc_64/qmake

It's important to remove the other entry (the one with the yellow warning sign. Otherwise the compiler will keep using that.


Once the project successfully compiles and the window "Skynet Robot Controller" appears, click on "load project" to load the KUKA robot.
Last edit: 02 Dec 2020 15:15 by Aciera.

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

More
02 Dec 2020 16:40 - 02 Dec 2020 16:48 #190880 by Grotius
Hi Arciera,

Nice that it works !

I also had to run the "Ethercat_installer" as Skynet.pro did not compile without it.
This is strange. The ethercat installer is separate from qt..

Desktop/Qt/5.15.1/gcc_64/bin/qmake
Ha, you checked it !


A nice practice to start with is to load your own robot step files. You had a tiny white robot. I edited the orginal kuka stepfile
with Freecad into one file for each moving part.

To start and try out a little bit, you have only to edit the FactoryApp.xml file.

Then you could load your own robot step files, and change the parameters of the kinematic chain in the xml.
That should have to work. The kuka document helps you to figur out, how the chain dimensions are used.

If that is done, you could start lcnc and load a gcode file into the workframe, and try to move it from lcnc.
I forgot to change the lcnc machine limits to -10000 and +10000. Will do this before making the next iso.

Thanks for your efforts. Must have been a ton of work.
Preparing the opencascade lib was the difficult one to do. But now it's all done. And it will stay so for ever !!

Now loading DraftSight 64 bit with IDA.
It stops at the rax line. How to solve this?
Attachments:
Last edit: 02 Dec 2020 16:48 by Grotius.

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

More
02 Dec 2020 16:56 #190882 by Aciera

This is strange. The ethercat installer is separate from qt..

You seem to have some kind of connection there. There is also a reference to ethercat at the top of FactoryApp.xml

To start and try out a little bit, you have only to edit the FactoryApp.xml file.

This looks like what's also used by MoveIt! in the ROS framework. Not quite sure as it's been a while.
The following user(s) said Thank You: Grotius

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

Time to create page: 0.276 seconds
Powered by Kunena Forum