ROS LinuxCNC Link

More
16 Jun 2021 13:43 #212200 by Grotius
Replied by Grotius on topic ROS LinuxCNC Link
Hi,

It now can follow the arc's in a program.
The opencascade abscissa is used for this implementation.

user-images.githubusercontent.com/448801...814-1199550dd265.mp4
The following user(s) said Thank You: Bari, tommylight, robins, Aciera

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

More
23 Jun 2021 13:57 - 23 Jun 2021 13:58 #212743 by rockandsalt
Replied by rockandsalt on topic ROS LinuxCNC Link
@Grotius and @thefabricator03

I have been following this thread but I think it got a little side tracked from the original subject. Did you figure out how to make ROS and linuxcnc talk to each other.
I would like to use ROS as a glue between linuxcnc and some peripherical device like a camera.
Last edit: 23 Jun 2021 13:58 by rockandsalt.

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

More
24 Jun 2021 09:22 #212801 by Roiki
Replied by Roiki on topic ROS LinuxCNC Link
This depends what you want to achieve. If uspace is all you need then making ros subscribers/service nodes is pretty trivial.

If you need realtime access then you need to use the hal_streamer realtime component and make a new userspace component for it using either the python or C APIs. This way you can send hal commands to realtime threads and can use the standalone joint planners. If you want access to the linuxcnc motion controller you need to modify the source and change coarse.pos pin from HAL_OUT to HAL_IO(maybe, haven't actually tested this).

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

More
24 Jun 2021 16:15 #212833 by rockandsalt
Replied by rockandsalt on topic ROS LinuxCNC Link
Hi Roiki,

Yeah, I would need to have real-time access. So the idea is to create a real-time component that listens and send ROS message?

Do you have any example code I can take a look at? Such as sending motion command to linuxcnc in real time?

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

More
25 Jun 2021 20:31 #212920 by Roiki
Replied by Roiki on topic ROS LinuxCNC Link
The hal_streamer is already in linuxcnc. There's also a C component called hal_streamer_usr which is the userspace part for this. You could use that as an example for making your own C/C++ component or use the (undocumented) python API for hal_stream to create the userspace part. There's documentation for this so you should read it and understand how it works.

There's test code for the python api here that tells you how it works: github.com/LinuxCNC/linuxcnc/tree/master/tests/halmodule.1

There's no direct examples since I haven't had the time(or machine) to prototype this stuff but I have a pretty good idea how it works. You do need some experience in programming.

Also as the way linuxcnc works is a bit...different so there's no way to send direct motion commands. You can send individual hal values as hal pins but as the motion controller doesn't accept outside inputs you can only send certain values without modifying the underlying code.

You can do raw joint values if you use the simple_tp component.
The following user(s) said Thank You: rockandsalt

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

Time to create page: 0.099 seconds
Powered by Kunena Forum