ros-industrial / ros_canopen

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

timeout exception for SDO 6061 when calling driver/init on first time, on second time success #347

Open fmros opened 5 years ago

fmros commented 5 years ago

Hy there,

I am getting following error message when calling /driver/init:

[ INFO] [1565258600.536702986]: Initializing XXX
[ INFO] [1565258600.537116441]: Current state: 1 device error: system:0 internal_error: 0 (OK)
[ INFO] [1565258600.537340556]: Current state: 2 device error: system:0 internal_error: 0 (OK)
[ INFO] [1565258613.363428700]: Current state: 2 device error: system:125 internal_error: 0 (OK)
[ INFO] [1565258613.363567866]: Current state: 0 device error: system:125 internal_error: 0 (OK)
[ INFO] [1565258613.363666844]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ INFO] [1565258613.363958490]: Current state: 0 device error: system:0 internal_error: 0 (OK)
Did not receive a response message
[ERROR] [1565258614.364209329]: /home/fhi/flexbin/flexbin_ws/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*)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<canopen::TimeoutException> >
std::exception::what: SDO
[canopen::tag_objectdict_key*] = 6061sub0

Please see also here the candump of the device when calling /init for the first time: candump.txt

When I then call /driver/init again following can be seen on the output:

[ INFO] [1565259405.633995612]: Initializing XXX
[ INFO] [1565259405.634328823]: Current state: 1 device error: system:0 internal_error: 0 (OK)
[ INFO] [1565259405.634480953]: Current state: 2 device error: system:0 internal_error: 0 (OK)
Loaded joint_state_controller
Loaded lifter_joint_position_controller
Started ['joint_state_controller'] successfully
Started ['lifter_joint_position_controller'] successfully
[lifter_ros/controller-4] process has finished cleanly
log file: /home/fhi/.ros/log/babbe266-b9c3-11e9-a42d-d4bed921f9c3/lifter_ros-controller-4*.log

but servocontroller goes into stop state and is not able to be moved. Here the candump of that point:

candump_after_init.txt

Does somebody have ideas what could cause that issue?

This is my eds file: dryve_eds.txt

mathias-luedtke commented 4 years ago

Did not receive a response message

It looks like your drive does not respond the SDO to query 6061sub0 (Modes Of Operation Display). I am not sure if I ever tested the driver without mapping it to a PDO. SDO might work, but only if it is faster than the sync interval.