-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Hello,
I am trying to use icube ethercat_ros2_driver and ros controller at 500hz. I made some simple change to display cycles. And the result is good for me.
ecmaster::readdata function is like that;
// check for master and slave state change
if (update_counter_ % check_state_frequency_ == 0) {
checkMasterState();
checkSlaveStates();
clock_gettime(CLOCK_TO_USE, &startTime);
period_ns = DIFF_NS(lastStartTime, startTime);
lastStartTime = startTime;
printf("Avarage cycle: %10u\n", period_ns/check_state_frequency_);
}
I did not see average cycle on screen in every second but after some times information getting together like below;
[ros2_control_node-1] Average cycle: 2613006
[ros2_control_node-1] Average cycle: 2000021
[ros2_control_node-1] Average cycle: 2000051
[ros2_control_node-1] Average cycle: 1999965
[ros2_control_node-1] Average cycle: 1999950
[ros2_control_node-1] STATE: Fault with status word :8
[ros2_control_node-1] Slave: State 0x08.
[ros2_control_node-1] Slave: operational.
[ros2_control_node-1] Average cycle: 1999999
[ros2_control_node-1] STATE: Switch on Disabled with status word :96
[ros2_control_node-1] STATE: Ready to Switch On with status word :33
[ros2_control_node-1] STATE: Switch On with status word :35
[ros2_control_node-1] STATE: Operation Enabled with status word :4135
[ros2_control_node-1] Average cycle: 2000012
[ros2_control_node-1] Average cycle: 1999992
[ros2_control_node-1] STATE: Fault with status word :8
[ros2_control_node-1] Slave: State 0x04.
[ros2_control_node-1] Average cycle: 2000032
[ros2_control_node-1] Master AL states: 0x08.
[ros2_control_node-1] Slave: State 0x08.
[ros2_control_node-1] Slave: operational.
[ros2_control_node-1] Slave: State 0x08.
[ros2_control_node-1] Slave: operational.
[ros2_control_node-1] Slave: State 0x08.
[ros2_control_node-1] Slave: operational.
[ros2_control_node-1] Average cycle: 1999976
[ros2_control_node-1] STATE: Switch on Disabled with status word :96
[ros2_control_node-1] STATE: Ready to Switch On with status word :33
[ros2_control_node-1] STATE: Switch On with status word :35
[ros2_control_node-1] STATE: Operation Enabled with status word :4135
[ros2_control_node-1] Average cycle: 2000024
[ros2_control_node-1] Average cycle: 1999973
[ros2_control_node-1] STATE: Fault with status word :104
[ros2_control_node-1] STATE: Fault with status word :104
[ros2_control_node-1] STATE: Switch on Disabled with status word :96
[ros2_control_node-1] STATE: Switch on Disabled with status word :96
[ros2_control_node-1] STATE: Ready to Switch On with status word :161
[ros2_control_node-1] STATE: Ready to Switch On with status word :161
[ros2_control_node-1] Average cycle: 2000023
[ros2_control_node-1] Average cycle: 1999963
[ros2_control_node-1] Average cycle: 2000026
[ros2_control_node-1] STATE: Switch On with status word :35
[ros2_control_node-1] STATE: Switch On with status word :35
[ros2_control_node-1] STATE: Operation Enabled with status word :4135
[ros2_control_node-1] STATE: Operation Enabled with status word :4135
some trigger can cause printout. This is another issue but not much important.
The important point is, I have disabled checkdomainstate function but on dmesg out there is info about domain working counter changes. There is also no missing datagrams.
[13120.589399] EtherCAT 0: Domain 0: 335 working counter changes - now 9/9.
[13121.593332] EtherCAT 0: Domain 0: 334 working counter changes - now 9/9.
[13122.597343] EtherCAT 0: Domain 0: 335 working counter changes - now 7/9.
[13123.601235] EtherCAT 0: Domain 0: 335 working counter changes - now 9/9.
[13124.605211] EtherCAT 0: Domain 0: 334 working counter changes - now 9/9.
[13125.609164] EtherCAT 0: Domain 0: 335 working counter changes - now 7/9.
[13126.613098] EtherCAT 0: Domain 0: 335 working counter changes - now 9/9.
[13127.617059] EtherCAT 0: Domain 0: 334 working counter changes - now 9/9.
[13128.621014] EtherCAT 0: Domain 0: 335 working counter changes - now 7/9.
[13129.624983] EtherCAT 0: Domain 0: 335 working counter changes - now 9/9.
[13130.628931] EtherCAT 0: Domain 0: 334 working counter changes - now 9/9.
[13131.632908] EtherCAT 0: Domain 0: 335 working counter changes - now 7/9.
[13132.636863] EtherCAT 0: Domain 0: 335 working counter changes - now 9/9.
[13133.640790] EtherCAT 0: Domain 0: 334 working counter changes - now 9/9.
[13134.644772] EtherCAT 0: Domain 0: 335 working counter changes - now 7/9.
[13135.648707] EtherCAT 0: Domain 0: 335 working counter changes - now 9/9.
[13136.652648] EtherCAT 0: Domain 0: 334 working counter changes - now 9/9.
Every single second this information logged. This is my state change check period. Is it such a coincidence or it is related with igh ethercat master?
Metadata
Metadata
Assignees
Labels
No labels