Signal Driven SocketCAN Node [closed]
Hi
I am trying to establish a signal-driven SocketCAN in Linux with C++ as a ROS node. I am facing some issues. First of all I do not have the SIGIO signal for every message. Therefore at the reception of SIGIO I am reading from the socket until there is no message left. This is somehow solvable although It would be nice to know the reason and it may be a cause for the second unsolved problem.
The main problem is that in my signal Driven CAN ROS node, the messages are not sometimes read in the order of the arrival. Sometimes it is not FIFO. But interestingly the timestamp of the message is correct. For example the following image is showing the output of the candump can0 -ta -c
on the left side and on the right side the output of my CAN node is shown. As you can see there is a a message in the wrong order (labeled with Time Error: ) on the right side.
Can this happen because of multi threading by ROS?? I am not doing any multi-threading in my node.