ROS LinuxCNC Link

More
5 years 5 months ago - 5 years 5 months ago #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: 5 years 5 months ago by Grotius.

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

More
5 years 5 months ago #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.
Code:
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
5 years 5 months ago - 5 years 5 months ago #209329 by Grotius
Replied by Grotius on topic ROS LinuxCNC Link
Hi,

I tested the halstreamer today.

Using this config :
Code:
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++
Code:
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: 5 years 5 months ago by Grotius.

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

More
5 years 5 months ago #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
5 years 5 months ago #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
5 years 5 months ago #209370 by Bari
Replied by Bari on topic ROS LinuxCNC Link

Roiki wrote: 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.

Time to create page: 0.400 seconds
Powered by Kunena Forum