Closed JonathanGruner closed 5 years ago
Seems that our controller does not come up. Maybe there is an error with the drives?
EMCY: 86#0090212500000044
EMCY: 87#0090212500000044
EMCY: 88#0090212500000044
ER: 33 // <-- this could be some indication...
[ INFO] [1552301653.775363515]: Current state: 2 device error: system:125 internal_error: 0 (OK)
[ INFO] [1552301653.775458465]: Current state: 1 device error: system:125 internal_error: 0 (OK)
[ INFO] [1552301653.775812399]: Current state: 1 device error: system:0 internal_error: 0 (OK)
@JonathanGruner Please report, if increasing the timeout helped.
@jschleicher I can't say it to 100%, but I feel it's more stable. But yesterday morning, I got this error every time I started the robot until I restarted my computer.
Okay, so this is more related to logging ros_canopen errors.
But I'd still suggest to drop the timeout in sto_modbus_adapter_node
in favor of the ros way "[INFO] ... not available yet, retrying..."
(@ct2034 was here)
Note: timeout can be changed in
prbt_hardware_support/include/prbt_hardware_support/pilz_modbus_read_client.h
Idea: make configureable
Why not wait until ROS is ready? There should not be a timeout at all, but just a warning to notify the user: "Service xxx not yet available, waiting...". If you start rqt without a roscore it outputs the same: "Waiting...".
Note:
EMCY: 86#0090212500000044 EMCY: 87#0090212500000044 EMCY: 88#0090212500000044 ER: 33 // <-- this could be some indication...
Maybe we can improve the error handling here, too. the canopen python library seems to have info on the error codes: https://canopen.readthedocs.io/en/latest/_modules/canopen/emcy.html#EmcyError
I have now an Error: ER: 129
And I can't find the corresponding codes in the canopen python library
Yes you can. 129 is 0x80, when masked with 0xF0:
(0x8000, 0xF000, "Monitoring")
Not that this tells us anything more though ;-)
I am trying to implement this in canopen: https://github.com/ct2034/ros_canopen/commit/deba5d001e6784596a72bb9b3e35cef494788ed3
Now i got an empty error: '''ER:'''
The original issue could be solved by cloning pilz_robots in my workspace, adjusting the timeout to 10 seconds in
prbt_hardware_support/include/prbt_hardware/support/pilz_modbus_read_client.h
and than rebuilding it with catkin_make. Maybe you could insert 10 or 20 seconds too in the original files at the first connection?
I made a new issue with the ER: XY error.
There seems to be a confusion regarding the timeouts.
During the launch MODBUS_CONNECTION_RETRY_TIMEOUT_S_DEFAULT
defined in pilz_modbus_read_client_node.cpp
should be relevant.
While running
The definition of RESPONSE_TIMEOUT_IN_MS
in pilz_modbus_read_client.h
is related to the detection of a disconnect. Please reset this to the default and try to adjust MODBUS_CONNECTION_RETRY_TIMEOUT_S_DEFAULT
if you experience issues during launch.
Or it would be better to increase MODBUS_CONNECTION_RETRIES_DEFAULT
if your launch takes some time...
So the chain of cause is:
@jschleicher Close? Other suggestion?
Maybe open an issue on
ER: 33
during launch?
I'll prepare a separate PR to continue the discussion. This issue is about the initial timeout during launch.
Commit
05d7a01
Steps to reproduce
Start launch file on low-end pc with a large robot model. If the startup process takes more than 5 seconds, the modbus node dies.
Expected behavior
Node waits until ROS is ready. There should not be a timeout at all, but just a warning to notify the user: "Service xxx not yet available, waiting...".
Observed behavior
Modbus node dies and takes down ROS.
Logfiles