Drivers implementation for ROS - rtt_soem
12 Aug 2021 07:11 #217590
by juniorfi
Replied by juniorfi on topic Drivers implementation for ROS - rtt_soem
Thanks for the info.
Right now I'm looking to implement first with EtherCAT. I saw there are some drivers already made in C. I have to check if I maybe have to work directly with those drivers in order to get the values and also write the new ones.
But I have to be sure if those new values will be replicated to HAL somehow.
Right now I'm looking to implement first with EtherCAT. I saw there are some drivers already made in C. I have to check if I maybe have to work directly with those drivers in order to get the values and also write the new ones.
But I have to be sure if those new values will be replicated to HAL somehow.
Please Log in or Create an account to join the conversation.
12 Aug 2021 07:13 #217591
by juniorfi
Replied by juniorfi on topic Drivers implementation for ROS - rtt_soem
Thanks for the reply. I will look at it to get more knowledge about it and see how works.
The way I saw so far is maybe to implement the "ROS layer" directly in the EtherCAT drivers as a POC.
But not sure if the changes will be replicated to HAL somehow.
Have to do more research in that part. Thanks again for the new info.
The way I saw so far is maybe to implement the "ROS layer" directly in the EtherCAT drivers as a POC.
But not sure if the changes will be replicated to HAL somehow.
Have to do more research in that part. Thanks again for the new info.
Please Log in or Create an account to join the conversation.
12 Aug 2021 13:50 #217612
by Roiki
Replied by Roiki on topic Drivers implementation for ROS - rtt_soem
There's some examples of running ros2 within a realtime kernel. Mostly as a proof of concept. The thing with realtime is that you need to implement all of it in the realtime code. You can't use dynamic libraries or libraries that call non realtime libraries. If I remember this is not possible in ros1 due to design choices at the time.
Imo the simpler solution would be just to make a ros node(with whatever language) that talks to the linuxcnc hal through the streamer component. You don't need to mess with realtime code, all the realtime stuff is already implemented. All you need to do is to make a normal ros node that uses the streamer api. And linuxcnc does the rest.
docs.ros.org/en/foxy/Tutorials/Real-Time-Programming.html
Imo the simpler solution would be just to make a ros node(with whatever language) that talks to the linuxcnc hal through the streamer component. You don't need to mess with realtime code, all the realtime stuff is already implemented. All you need to do is to make a normal ros node that uses the streamer api. And linuxcnc does the rest.
docs.ros.org/en/foxy/Tutorials/Real-Time-Programming.html
Please Log in or Create an account to join the conversation.
13 Aug 2021 02:42 #217648
by Grotius
Replied by Grotius on topic Drivers implementation for ROS - rtt_soem
Hi Roiki,
or libraries that call non realtime libraries
Orocos kinematics can run in realtime. It's just how you implement it.
Hi Juniorfi,
Have a look at the hal_ruckig_trajectory on my github. This code is showing how to setup a hal kernel module quite easy. Maybe it give's you a good idea.
or libraries that call non realtime libraries
Orocos kinematics can run in realtime. It's just how you implement it.
Hi Juniorfi,
Have a look at the hal_ruckig_trajectory on my github. This code is showing how to setup a hal kernel module quite easy. Maybe it give's you a good idea.
Please Log in or Create an account to join the conversation.
13 Aug 2021 05:54 #217659
by juniorfi
Replied by juniorfi on topic Drivers implementation for ROS - rtt_soem
Hello @Roiki.
The idea is to use a realtime time process to all. The rtt_ros_integration works with realtime and ROS1 but not sure if works with ROS2. Anyways is a good start point also the streamer component you mentioned.
I want to dig a bit more to know if with that I can get the "Slaves" at least the pins or whatever process attached to/from that. To have a concrete start point.
Also mention that will be useless get that working just with the EherCAT one. Will be great to have all modules available working with ROS somehow.
So the point you mentioned about to work directly from the LinuxCNC HAL make sense, because all is already working and don't need to reinvent the wheel again, at least picking process from drivers directly and so.
Thanks
The idea is to use a realtime time process to all. The rtt_ros_integration works with realtime and ROS1 but not sure if works with ROS2. Anyways is a good start point also the streamer component you mentioned.
I want to dig a bit more to know if with that I can get the "Slaves" at least the pins or whatever process attached to/from that. To have a concrete start point.
Also mention that will be useless get that working just with the EherCAT one. Will be great to have all modules available working with ROS somehow.
So the point you mentioned about to work directly from the LinuxCNC HAL make sense, because all is already working and don't need to reinvent the wheel again, at least picking process from drivers directly and so.
Thanks
Please Log in or Create an account to join the conversation.
13 Aug 2021 05:59 #217660
by juniorfi
Replied by juniorfi on topic Drivers implementation for ROS - rtt_soem
Hello @Grotius. Thanks for the hints.
I have been seeing your Github quite often, trying to see how you implemented the Orocos Kinematic there. Great work you have made there!
I'm right now seeing your github.com/grotius-cnc/hal_trajectory/tree/main .
Right now I have and EL1144 and El2024 to get started at least blinking leds and get the input from switch.
And once I get that working want to go to EL7342 with EL6900 on it.
Thanks again for the information and code you provided to me.
Regards.
I have been seeing your Github quite often, trying to see how you implemented the Orocos Kinematic there. Great work you have made there!
I'm right now seeing your github.com/grotius-cnc/hal_trajectory/tree/main .
Right now I have and EL1144 and El2024 to get started at least blinking leds and get the input from switch.
And once I get that working want to go to EL7342 with EL6900 on it.
Thanks again for the information and code you provided to me.
Regards.
Please Log in or Create an account to join the conversation.
16 Aug 2021 11:38 - 16 Aug 2021 13:33 #217876
by Grotius
Replied by Grotius on topic Drivers implementation for ROS - rtt_soem
Last edit: 16 Aug 2021 13:33 by Grotius.
The following user(s) said Thank You: juniorfi
Please Log in or Create an account to join the conversation.
18 Aug 2021 10:31 #218062
by juniorfi
Replied by juniorfi on topic Drivers implementation for ROS - rtt_soem
Hi Grotius,
What amazing job! Congratulations!.
As I noticed, there is not needed to run linuxcnc to get the HAL running, right?
Do I have to put somewhere my .hal config, the .xml and the HAL=myconfig.xml (inside .ini file)?
I will try it tomorrow for sure, and get better code understanding.
Thanks for the link and info!
What amazing job! Congratulations!.
As I noticed, there is not needed to run linuxcnc to get the HAL running, right?
Do I have to put somewhere my .hal config, the .xml and the HAL=myconfig.xml (inside .ini file)?
I will try it tomorrow for sure, and get better code understanding.
Thanks for the link and info!
Please Log in or Create an account to join the conversation.
18 Aug 2021 12:30 #218068
by Grotius
Replied by Grotius on topic Drivers implementation for ROS - rtt_soem
Hi Juniorfi,
Yesterday i did some extra work at the repository of hal-core. For now it's ok.
I have to filter out the dependencies when i have time over, and update the ./config scripts.
There is a video that show's how easy it is to install and use.
It has no halshow at the moment. For the time being you can use your excisting halshow if you already have a lcnc install.
Otherwise you could try this one wich has a save state : sourceforge.net/projects/halview/
As I noticed, there is not needed to run linuxcnc to get the HAL running, right?
Yes that is one of the purposes. Provide a hal platform without any entanglement.
I filtered everything out except Rtapi (kernel interface) and Hal. (hardware abstract layer (the framework).
You just get hal running by doing a halcmd.
(behind the screen it will do a insmod for the kernel module with the module_helper, the module_helper is just a trick to avoid a "sudo" command each time you want to insert a kernel module. The module_helper was originally called the "linuxcnc_module_helper").
Do I have to put somewhere my .hal config, the .xml and the HAL=myconfig.xml (inside .ini file)?
Ini files aren't used anymore. Hal files are used. Things like halcmd, halrun etc all work.
You can install the linuxcnc-ethercat driver just as usual. I expect no problem's.
I will try it tomorrow for sure, and get better code understanding.
Point of interest is the file ./make.sh
This file will give you an insight how rtapi & hal is compiled. It uses gcc and g++ compilers. It uses .o and .d extensions.
It is quite interesting to see how much effort has to be done to compile it.
The ruckig library has now dynamic-DoFs input. That's nice ! Working on a ruckig DoFs[x] hal component now.
Yesterday i did some extra work at the repository of hal-core. For now it's ok.
I have to filter out the dependencies when i have time over, and update the ./config scripts.
There is a video that show's how easy it is to install and use.
It has no halshow at the moment. For the time being you can use your excisting halshow if you already have a lcnc install.
Otherwise you could try this one wich has a save state : sourceforge.net/projects/halview/
As I noticed, there is not needed to run linuxcnc to get the HAL running, right?
Yes that is one of the purposes. Provide a hal platform without any entanglement.
I filtered everything out except Rtapi (kernel interface) and Hal. (hardware abstract layer (the framework).
You just get hal running by doing a halcmd.
(behind the screen it will do a insmod for the kernel module with the module_helper, the module_helper is just a trick to avoid a "sudo" command each time you want to insert a kernel module. The module_helper was originally called the "linuxcnc_module_helper").
Do I have to put somewhere my .hal config, the .xml and the HAL=myconfig.xml (inside .ini file)?
Ini files aren't used anymore. Hal files are used. Things like halcmd, halrun etc all work.
You can install the linuxcnc-ethercat driver just as usual. I expect no problem's.
I will try it tomorrow for sure, and get better code understanding.
Point of interest is the file ./make.sh
This file will give you an insight how rtapi & hal is compiled. It uses gcc and g++ compilers. It uses .o and .d extensions.
It is quite interesting to see how much effort has to be done to compile it.
The ruckig library has now dynamic-DoFs input. That's nice ! Working on a ruckig DoFs[x] hal component now.
The following user(s) said Thank You: tommylight, juniorfi
Please Log in or Create an account to join the conversation.
20 Aug 2021 10:27 #218228
by juniorfi
Replied by juniorfi on topic Drivers implementation for ROS - rtt_soem
Hello Grotius,
I got all working in the Rpi4. I had to place all in /opt/ and them remove -mieee-fp to be able to compile in the Rpi, install dependencies and change some files permission.
Everything works well so far.
Now I'm trying to use the EtherCAT drivers there.
So far I noticed that I should modify the start_hal.sh with my own HAL parameters for EtherCAT. But not sure if that will be the best way to do it.
Same with test.c. I tried to put there some parameters to point at the .xml I have with not success.
Any hint? I already have the .hal and the .xml .
Thanks again for that great job!
Regards.
I got all working in the Rpi4. I had to place all in /opt/ and them remove -mieee-fp to be able to compile in the Rpi, install dependencies and change some files permission.
Everything works well so far.
Now I'm trying to use the EtherCAT drivers there.
So far I noticed that I should modify the start_hal.sh with my own HAL parameters for EtherCAT. But not sure if that will be the best way to do it.
Same with test.c. I tried to put there some parameters to point at the .xml I have with not success.
Any hint? I already have the .hal and the .xml .
Thanks again for that great job!
Regards.
Please Log in or Create an account to join the conversation.
Time to create page: 0.138 seconds