Python glue code to be ran as LinuxCNC HAL

More
03 May 2024 18:51 #299660 by Bashar22
I'm looking to connect the EMCMOT components to CopelliaSim through an API provided by CoppelliaSim which allows the remote control of the robots built in this SW robotic environment. As shown in the snapshot of the attached article. Unfortunately, the article doesn’t give details. I expect that it is possible to make a python  HAL to build structures or variables from the signals and pins in python so that it can be sent to the CoppeliaSim via the API.Is there any hint that someone can suggest? With many thanks in advance.

 
Attachments:

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

More
04 May 2024 09:59 #299709 by andypugh
The mention of TCP/IP makes me wonder if they are using linuxcnc.org/docs/stable/html/man/man1/linuxcncrsh.1.html
But some of the HAL pins they show are not normal LinuxCNC HAL pins, so it is possible that they have their own HAL component that communicates with the network.

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

More
05 May 2024 07:16 #299781 by Bashar22
Thanks andypugh for the prompt answer and the link. In fact, I've already established the communication using socket in ZeroMQ library between the LinuxCNC machine (A RPi 4) and the Server machine (a laptop) where the CoppeliaSim is running with the ZeroMQ server. This is done using a Python on the LinuxCNC side. Maybe they created their own structures from existing HAL pins and components. I can conclude that I need to build a component in Python HAL to take the position pins (for example from the EMCMOTS) and concatinate them in a structure to be sent through the ZeroMQ to the CoppeliaSim from the Python component code.

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

Time to create page: 0.196 seconds
Powered by Kunena Forum