orocos / soem

ROS package wrapping the Simple Open EtherCAT Master (SOEM) from https://github.com/OpenEtherCATsociety/SOEM

Home Page:http://wiki.ros.org/soem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sending and receiving different types of PDOs

mictas opened this issue · comments

Hello,

I manage a 6 axes robot in ROS through EtherCAT using the soem package.
The "ROS Master EtherCAT PC" is a laptop in which are installed Ubuntu 18.04 LTS and ROS Melodic.
Each joint has an EtherCAT driver developed by us.
We developed a ROS node which acts as Master EtherCAT using soem library.
This node was developed based on simple_test.c example.
Each Joint communicates with the "ROS Master EtherCAT" using:

  • 1 RXPDO
  • 1 TXPDO
    which are transmitted and received from ROS Master each ms.
    The commands used are the following:

ec_send_processdata();
auto wkc = ec_receive_processdata( EC_TIMEOUTAW );

Now we need to implement a further change. We need that "ROS Master EtherCAT PC" sends/receives each ms:

  • 1 RXPDO for "standard data"
  • 1 RXPDO for "special data"
  • 1 TXPDO for "standard data"
  • 1 TXPDO for "special data"

"Standard data" and "special data" need to be managed with separately in different PDOs.

I don't know how implement this feature in our code, because I suppose that the only two commands listed above couldn't be enough for transmitting 2 RXPDOs and 2 TXPDOs separately at the same time.
Anyone can help us?
Waiting for a response, I thank you.
Best regards.

You should configure all PDOs in the respective IOMap. ec_send_processdata() and ec_receive_processdata() update the slaves based on the IOmap. You can then retrieve the respective values from the IOMap.

You might want to check the tutorial for additional information.

Again, please note that this is an issue with how to use SOEM, not the SOEM ROS wrapper.

Closing, as this is not a bug, but a usage question, that has been answered.