ros-industrial / ros_canopen

CANopen driver framework for ROS (http://wiki.ros.org/ros_canopen)
GNU Lesser General Public License v3.0
328 stars 267 forks source link

Re-init error #465

Open archee8 opened 2 years ago

archee8 commented 2 years ago

When executing consecutive commands init->shutdown->init. I often get various initialization errors.

Error examples: success: False message: "CAN is not ready" success: False message: "/home/src/ros_canopen/canopen_master/src/sdo.cpp(429): Throw\ \ in function void canopen::SDOClient::transmitAndWait(const canopen::ObjectDict::Entry&,\ \ const canopen::String&, canopen::String*)\nDynamic exception type: boost::wrapexcept<canopen::TimeoutException>\n\ std::exception::what: SDO\n[canopen::tag_objectdict_key*] = 1800sub1\n" success: False message: "CAN init timed out; CAN is not ready"

But if I call init several times (3-4) in a row, then the driver is initialized successfully. Why doesn't this happen the first time?