Closed mistoll closed 4 years ago
Our system has a emergency switch which cuts the power to the motors.
Do you power off the logic as well?
Do you restart the CAN device or do you specify restart-ms
?
The "CAN not ready" messages after init
look suspicious.
Do you power off the logic as well?
Yes
Do you restart the CAN device or do you specify
restart-ms
?
Neither. But I'll try.
The "CAN not ready" messages after
init
look suspicious.
I tried do debug that but without much success. The error starts at https://github.com/ros-industrial/ros_canopen/blob/67172327d83e6308172b09d21916282cb23b99f1/socketcan_interface/include/socketcan_interface/asio_base.h#L71 and 125 is OPERATION_CANCELED. That's all I found out.
Do you restart the CAN device or do you specify
restart-ms
?Neither. But I'll try.
Tried ifup/down and restart-ms with no change in result at all.
Please check the error counters as well:
ip -details -statistics link show can0
I guess that the heartbeat (or the SYNC) gets sent to the offline device and fills up the CAN buffer. However, I could not spot this in your candump. To log everthing, you should use:
candump any,0:0,#FFFFFFFF
$: ip -details -statistics link show can0
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 3068960324
can state ERROR-ACTIVE (berr-counter tx 126 rx 0) restart-ms 1000
bitrate 1000000 sample-point 0.750
tq 83 prop-seg 4 phase-seg1 4 phase-seg2 3 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 24000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 4 4 0 numtxqueues 3068960324 numrxqueues 3068960324 gso_max_size 3068960324 gso_max_segs 3068960324
RX: bytes packets errors dropped overrun mcast
12839 3055 0 0 0 0
TX: bytes packets errors dropped carrier collsns
5302 985 0 0 0 0
It's also worth mentioning that if I restart the node after it failed the first init works. So I assume it's some state in the node causing that error.
I used
candump any,0:0,#FFFFFFFF
to record two candumps. candump.txt reproduces the error, while in candump_working.txt I try to reproduce the error but it works as expected. I can't tell, what's the difference, it's somehow indeterministic. Sometimes it even works over and over again and only fails after rebooting the system. But on other days it won't work a single time.
Closing this issue, because the problem didn't happen for a long time and the there's no reliable reproduction.
Our system has a emergency switch which cuts the power to the motors. After switching the power off and on we want to be able to get the driver up again. Therefore we call shutdown and init. However that only works sometimes, but I can't tell what's influencing it.
Example:
Services:
Output:
candump.txt