ros-industrial / ros2_canopen

CANopen driver framework for ROS2
https://ros-industrial.github.io/ros2_canopen/manual/rolling/
159 stars 71 forks source link

RPDO message skipped or two message published simultaneously #322

Open halil93ibrahim opened 2 months ago

halil93ibrahim commented 2 months ago

Describe the bug Using the ProxyDriver to connect to my sensors and it is publishing rpdo messages at 100Hz. It might occur that one message is missed and two messages received simultaneously the next iteration. When I check it with candump on terminal the data is coming properly. However, the /sensor1/rpdo topic is having this issue. Is there anyone can help me how to approach this problem?

Logs Below I have printed each received rpdo message. Timestamps show that package 2 and 3 received 20ms after package 1. Supposed to send each 10ms apart.

[sick_mls_node-2] [INFO] [1727342578.589812399] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 1  # package 1
[sick_mls_node-2] [INFO] [1727342578.589948279] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 2
[sick_mls_node-2] [INFO] [1727342578.590049550] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 3
[sick_mls_node-2] [INFO] [1727342578.590199967] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 4
[sick_mls_node-2] [INFO] [1727342578.590337962] [sick_mls_publisher]: Sensor num 0. index 2022, subindex: 0
[sick_mls_node-2] [INFO] [1727342578.609024044] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 1  # package 2
[sick_mls_node-2] [INFO] [1727342578.609262077] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 2
[sick_mls_node-2] [INFO] [1727342578.609367358] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 3
[sick_mls_node-2] [INFO] [1727342578.609461185] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 4
[sick_mls_node-2] [INFO] [1727342578.609596538] [sick_mls_publisher]: Sensor num 0. index 2022, subindex: 0  
[sick_mls_node-2] [INFO] [1727342578.609686594] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 1 # package 3
[sick_mls_node-2] [INFO] [1727342578.609779485] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 2
[sick_mls_node-2] [INFO] [1727342578.609871000] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 3
[sick_mls_node-2] [INFO] [1727342578.610008108] [sick_mls_publisher]: Sensor num 0. index 2021, subindex: 4

Setup:

Additional context I am connected to 6 sensors. I have check the load on the canbus and there is not problem. I have also checked the flow with candump all 6 sensors send can packages properly.