[orocosusers] EtherCAT communication

Dear Orocos-Users

I am using soem to read data at 800Hz in a real-time kernel and I
occasionally get the warning of

*[ Warning][soem] receiving data failed*

I perform this operation using my own laptop (XPS-15-9530 with no
built-in Ethernet + USB3-Ethernet adapter).

Does anyone know why is the information lost somewhere? Is this because
of not having a physical Ethernet card?

This is my kernel: 3.18.42-rt45 #2 SMP PREEMPT RT x86_64 GNU/Linux

and I have installed Orocos, Ros, Soem from standard ubuntu repository...

Cheers

Keivan

Ruben Smits's picture

[orocosusers] EtherCAT communication

Hi Keivan,

What are the schedulers and priorities you chose for the master component?
I assume you've set the limits correctly in /etc/security/limits? I've
noticed the same behavior on other systems as well, usually without
problems.

R.

On Wed, Oct 5, 2016 at 5:13 PM Keivan Zavari <keivan [dot] zavari [..] ...>
wrote:

> Dear Orocos-Users
>
>
> I am using soem to read data at 800Hz in a real-time kernel and I
> occasionally get the warning of
>
> *[ Warning][soem] receiving data failed*
>
> I perform this operation using my own laptop (XPS-15-9530 with no built-in
> Ethernet + USB3-Ethernet adapter).
> Does anyone know why is the information lost somewhere? Is this because of
> not having a physical Ethernet card?
>
>
> This is my kernel: 3.18.42-rt45 #2 SMP PREEMPT RT x86_64 GNU/Linux
>
> and I have installed Orocos, Ros, Soem from standard ubuntu repository...
>
>
> Cheers
>
> Keivan
>

[orocosusers] EtherCAT communication

Hi Ruben,

Thanks for your reply.

Here is my deployer priorities:*
*

*comm_freq= 250 Hz**
*

*depl:setActivity("robot", comm_freq, 99, rtt.globals.ORO_SCHED_RT)**
**depl:setActivity("supervisor", comm_freq, 0, rtt.globals.ORO_SCHED_RT)**
**depl:setActivity("scheduler", comm_freq, 0, rtt.globals.ORO_SCHED_RT)**
**depl:setActivity("soem", 0.001, 50, rtt.globals.ORO_SCHED_RT)*

Soem is not scheduled and runs at a higher frequency. Similar to the
Gianni's problem a while ago, after giving permissions to soem, I have
to run the deployer with super user access (the discussion
<http://orocos.org/forum/orocos/orocos-users/orocosusers-getting-permission-denied-deployers-after-running-setcap-soem>).
So root does get hard limits...

My other components are robust enough to deal with the missed pieces of
information. In other words, I am not having a big issue with this
(yet). I was more curious to know what goes wrong and why (engineering
spirit stuff!!). This EtherCAT thing is still unclear to me...

Cheers
Keivan

On 06/10/16 15:49, Ruben Smits wrote:
> Hi Keivan,
>
> What are the schedulers and priorities you chose for the master
> component? I assume you've set the limits correctly in
> /etc/security/limits? I've noticed the same behavior on other systems
> as well, usually without problems.
>
> R.
>
> On Wed, Oct 5, 2016 at 5:13 PM Keivan Zavari <keivan [dot] zavari [..] ...
> <mailto:keivan [dot] zavari [..] ...>> wrote:
>
> Dear Orocos-Users
>
>
> I am using soem to read data at 800Hz in a real-time kernel and I
> occasionally get the warning of
>
> *[ Warning][soem] receiving data failed*
>
> I perform this operation using my own laptop (XPS-15-9530 with no
> built-in Ethernet + USB3-Ethernet adapter).
>
> Does anyone know why is the information lost somewhere? Is this
> because of not having a physical Ethernet card?
>
>
> This is my kernel: 3.18.42-rt45 #2 SMP PREEMPT RT x86_64 GNU/Linux
>
> and I have installed Orocos, Ros, Soem from standard ubuntu
> repository...
>
>
> Cheers
>
> Keivan
>

Ruben Smits's picture

[orocosusers] EtherCAT communication

As the code shows:
https://github.com/orocos/rtt_soem/blob/master/soem_master/soem_master_c...

We wait for new data to arrive in a newly scheduled updateHook for maximum
of EC_TIMEOUTRET (
https://github.com/smits/soem/blob/master/soem/ethercattype.h#L89-L90)
which is 2ms, so this get's printed everytime we did not receive a new
packet in the timeframe between the send_processdata of the previous
updateHook and 2ms after calling the receive_processdata of the next
updateHook.

R.

On Thu, Oct 6, 2016 at 4:51 PM Keivan Zavari <keivan [dot] zavari [..] ...>
wrote:

> Hi Ruben,
>
> Thanks for your reply.
>
> Here is my deployer priorities:
>
> *comm_freq= 250 Hz*
>
> *depl:setActivity("robot", comm_freq, 99, rtt.globals.ORO_SCHED_RT)*
> *depl:setActivity("supervisor", comm_freq, 0, rtt.globals.ORO_SCHED_RT)*
> *depl:setActivity("scheduler", comm_freq, 0, rtt.globals.ORO_SCHED_RT)*
> *depl:setActivity("soem", 0.001, 50, rtt.globals.ORO_SCHED_RT)*
> Soem is not scheduled and runs at a higher frequency. Similar to the
> Gianni's problem a while ago, after giving permissions to soem, I have to
> run the deployer with super user access (the discussion
> <http://orocos.org/forum/orocos/orocos-users/orocosusers-getting-permission-denied-deployers-after-running-setcap-soem>).
> So root does get hard limits...
>
> My other components are robust enough to deal with the missed pieces of
> information. In other words, I am not having a big issue with this (yet). I
> was more curious to know what goes wrong and why (engineering spirit
> stuff!!). This EtherCAT thing is still unclear to me...
>
>
> Cheers
>
> Keivan
>
>
>
> On 06/10/16 15:49, Ruben Smits wrote:
>
> Hi Keivan,
>
> What are the schedulers and priorities you chose for the master component?
> I assume you've set the limits correctly in /etc/security/limits? I've
> noticed the same behavior on other systems as well, usually without
> problems.
>
> R.
>
> On Wed, Oct 5, 2016 at 5:13 PM Keivan Zavari <keivan [dot] zavari [..] ...>
> wrote:
>
> Dear Orocos-Users
>
>
> I am using soem to read data at 800Hz in a real-time kernel and I
> occasionally get the warning of
>
> *[ Warning][soem] receiving data failed*
>
> I perform this operation using my own laptop (XPS-15-9530 with no built-in
> Ethernet + USB3-Ethernet adapter).
> Does anyone know why is the information lost somewhere? Is this because of
> not having a physical Ethernet card?
>
>
> This is my kernel: 3.18.42-rt45 #2 SMP PREEMPT RT x86_64 GNU/Linux
>
> and I have installed Orocos, Ros, Soem from standard ubuntu repository...
>
>
> Cheers
>
> Keivan
>
> --
> Ruben Smits, Roboticist - Founder
> +32 479 511 786
> Intermodalics - Gaston Geenslaan 9, 3001 Heverlee - BELGIUM
> www.intermodalics.eu
>
>
> --
Ruben Smits, Roboticist - Founder
+32 479 511 786
Intermodalics - Gaston Geenslaan 9, 3001 Heverlee - BELGIUM
www.intermodalics.eu

frodo's picture

[orocosusers] EtherCAT communication

Hi Kevin,

Even if you set properly the hard limits at the security configuration file and you claim them with ulimit, without any root claim, with a priority of 0 on the deployer I keep having such warnings from time to time. Running also at 1kHz.

(Rt-patched, 2.6.x, ...)

Bests,
Sergio

From: Orocos Users [mailto:OROCOSUSERS [..] ...] On Behalf Of Keivan Zavari
Sent: jueves, 06 de octubre de 2016 16:51
To: OROCOSUSERS [..] ...
Subject: Re: [orocosusers] EtherCAT communication

Hi Ruben,

Thanks for your reply.

Here is my deployer priorities:

comm_freq= 250 Hz

depl:setActivity("robot", comm_freq, 99, rtt.globals.ORO_SCHED_RT)
depl:setActivity("supervisor", comm_freq, 0, rtt.globals.ORO_SCHED_RT)
depl:setActivity("scheduler", comm_freq, 0, rtt.globals.ORO_SCHED_RT)
depl:setActivity("soem", 0.001, 50, rtt.globals.ORO_SCHED_RT)
Soem is not scheduled and runs at a higher frequency. Similar to the Gianni's problem a while ago, after giving permissions to soem, I have to run the deployer with super user access (the discussion<http://orocos.org/forum/orocos/orocos-users/orocosusers-getting-permission-denied-deployers-after-running-setcap-soem>). So root does get hard limits...

My other components are robust enough to deal with the missed pieces of information. In other words, I am not having a big issue with this (yet). I was more curious to know what goes wrong and why (engineering spirit stuff!!). This EtherCAT thing is still unclear to me...

Cheers
Keivan

On 06/10/16 15:49, Ruben Smits wrote:
Hi Keivan,

What are the schedulers and priorities you chose for the master component? I assume you've set the limits correctly in /etc/security/limits? I've noticed the same behavior on other systems as well, usually without problems.

R.

On Wed, Oct 5, 2016 at 5:13 PM Keivan Zavari <keivan [dot] zavari [..] ...keivan [dot] zavari [..] ...>> wrote:

Dear Orocos-Users

I am using soem to read data at 800Hz in a real-time kernel and I occasionally get the warning of

[ Warning][soem] receiving data failed

I perform this operation using my own laptop (XPS-15-9530 with no built-in Ethernet + USB3-Ethernet adapter).
Does anyone know why is the information lost somewhere? Is this because of not having a physical Ethernet card?

This is my kernel: 3.18.42-rt45 #2 SMP PREEMPT RT x86_64 GNU/Linux

and I have installed Orocos, Ros, Soem from standard ubuntu repository...

Cheers

Keivan
--
Ruben Smits, Roboticist - Founder
+32 479 511 786
Intermodalics - Gaston Geenslaan 9, 3001 Heverlee - BELGIUM
www.intermodalics.eu<http://www.intermodalics.eu>