ROS LinuxCNC Link

More
15 May 2021 14:01 #208911 by Roiki
Replied by Roiki on topic ROS LinuxCNC Link
Their solution is micro-ros. Which is still quite young.

They also have a demo for xenomai I believe but that's more of a proof of concept.

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

More
15 May 2021 14:08 #208912 by Roiki
Replied by Roiki on topic ROS LinuxCNC Link

@Grotius

Collision detection is easy. It's collision avoidance I'd like. :)

The real problem is with robot makers. They don't want you inside their controller or robot. ROS doesn't talk to motor drivers and encoders directly so you are limited by what you can do with them when the controller decides to give or take info on velocity and/or position.


This isnt quite accurate. While ros itself is a framework for programmers to build on, there are ros-microcontroller bridges to get you the realtime motor control you design. It's left for you to implement yourself.

And ros got its start in the AGV space so it's quite understandable they didn't bother quite as much with the realtime motor control and the high level simulation is more of an issue.

It's true though that industrial manufacturers don't want you to mess with their proprietary stuff. They want that sweet sweet maintenance bucks. :)

There was a connection with machinekit but it's abandoned now so.

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

More
17 May 2021 14:06 - 17 May 2021 14:08 #209226 by Grotius
Replied by Grotius on topic ROS LinuxCNC Link
Hi,

I tested the motors today on ethercat hardware.

The path for testing is a cartesian move in x+350mm with maxvel 250 and acc 45.
The interpolation model used is a Kuka kr6.

The test included a path interpolation for every 1ms wich is saved in the streambuffer.
A stepgen component is doing the position command work in the base-thread.

Then when the motion is executed, the motor's run ok following the output stream.
The motor sound's and speeds are ok. An sich this is quite nice.

One thing i mentioned is, i was not a good idea to do other things, like working with other programs at the same time.
Then the performance was down. I will have a look if i can priorize a program in c++.
An other option is bring the stream buffer into kernel land. But i am not sure if that will ensure or increase the
performance. This will be just a tryout.
Last edit: 17 May 2021 14:08 by Grotius.

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

More
17 May 2021 20:44 #209280 by Grotius
Replied by Grotius on topic ROS LinuxCNC Link
Hi,

Tommorow i would like to test streaming file data to hal. I did not use it before, the "streamer" component.
I hope this improves the realtime performance. The downside, it is only accepted by the servo-thread.

I just tested the component a little bit. It runs. It can do 4 float values at one stream. Then it's configured to accept 1000 lines
at a time. Somehow 8 floats at a stream are not accepted. I have to look what might be the problem.
system("/opt/linuxcnc/bin/./halcmd loadrt threads name1=base-thread fp1=0 period1=30000 name2=servo-thread period2=1000000");
    system("/opt/linuxcnc/bin/./halcmd loadrt streamer depth=1000,1000 cfg=ffff,ffff");
    system("/opt/linuxcnc/bin/./halcmd addf streamer.0 servo-thread");
    system("/opt/linuxcnc/bin/./halcmd addf streamer.1 servo-thread");

Then in the lcnc /bin directory i used ./halstreamer filename.txt, to sent the data.

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

More
18 May 2021 10:49 - 18 May 2021 10:51 #209329 by Grotius
Replied by Grotius on topic ROS LinuxCNC Link
Hi,

I tested the halstreamer today.

Using this config :
loadrt threads name1=base-thread fp1=0 period1=30000 name2=servo-thread period2=1000000
loadrt streamer depth=10000,10000 cfg=fffffffff,fffffffff
addf streamer.0 servo-thread
addf streamer.1 servo-thread
net meat streamermeat streamer.0.curr-depth

Then the "streamermeat float in pin" is looking how much meat there is left in the buffer.
There is a pin when the buffer is empty, but we have to send data before it's empty.

Then in c++
if(*streamermeat->Pin<3000)
It gives the buffer a new file of 1000 lines when the buffer shrinks under the 3000 lines.
During execution the buffer stay's around the 3000. This is good !
The gui refresh time is 200ms, this is perfect !
During the test it was doing a job of 61 text files, each containing 1000 lines of joint positions for multiple axis.

Everything went okey. I am very satisfied.
I think this is the final solution for the program.
It improved the realtime motor sounds a little and that's good.
Last edit: 18 May 2021 10:51 by Grotius.

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

More
18 May 2021 13:48 #209351 by Roiki
Replied by Roiki on topic ROS LinuxCNC Link
Are you writing text files on your application and then passing them off to streamer? Why not just build the userspace part into your application directly with the c++ api?

Or use pipes, the streamer_usr component supports that too.

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

More
18 May 2021 16:30 #209358 by Grotius
Replied by Grotius on topic ROS LinuxCNC Link
Hi Roiki,

Are you writing text files on your application and then passing them off to streamer?
Yes. It works out of the box.

Why not just build the userspace part into your application directly with the c++ api?
I already use the hal api. But the halstreamer shared lib
can stay outside the app for now.

Or use pipes, the streamer_usr component supports that too.
I looked at the streamer_usr code yesterday.

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

More
18 May 2021 17:50 #209370 by Bari
Replied by Bari on topic ROS LinuxCNC Link

This isnt quite accurate. While ros itself is a framework for programmers to build on, there are ros-microcontroller bridges to get you the realtime motor control you design. It's left for you to implement yourself.


LCNC is similar. If it doesn't have a feature that you need, you just have to implement it yourself.

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

More
23 May 2021 15:33 - 23 May 2021 18:31 #209915 by Grotius
Replied by Grotius on topic ROS LinuxCNC Link
Hi,

I have now tested the halstreamer. It works excellent.

For testing and moving the robot i have created a little program.

This program has under the hood:
- Hal connection ( base threat + servo thread + halstreamer )
- Forward + Inverse interpolation based on kdl
- Respect's joint limits.
- Cartesian s-curve moves, based on this algoritme
- Euler angles rotating at fixed (user defined) degrees a second ( ** cool option ** )
- Joint angles rotating at fixed (user defined) degrees a second. => used when only rotating joints.
- Opencascade cad machine preview, updated by stepgen feedback value's results in realistic motion preview.
- Live mode (hal stream) and demo (playing) mode.

Used hardware :
Ethercat beckhoff + 5us stepper outputs.
Used software :
Linux-cnc source : Linuxcnc at master
Linux software : Linux-11-pro

There was quite a lot to code. This took me 2 day's.
I am quite happy with this result so far. The best kinematic result so far.
Next thing to do:

1. Make a working gripper, wich can open and close in preview.

- Maybe make a program for a piano?
- If you have any request for a program, please post your request. :)



2. Record the halstreamer movements to a single play-off file, and then execute this file.


3. So far so good. Up to the next day !

* Attached my hal file. It's quite clean.
Attachments:
Last edit: 23 May 2021 18:31 by Grotius.
The following user(s) said Thank You: tommylight

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

More
23 May 2021 16:53 #209921 by Aciera
Replied by Aciera on topic ROS LinuxCNC Link
Nice!
I'd still be very much interested in testing your app on my Mitsubishi robot. But, as discussed earlier, I'd need Dmitry's SSCNET drivers from his nyx branch built in to do so.

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

Time to create page: 0.273 seconds
Powered by Kunena Forum