Canopen ROS infinite loop at Init [closed]

Hello everybody,

I encountered some kind of really big trouble trying to initialize the schunk powerball lwa using the ipa_canopen_ros node after updating to its new version. (I did this to take advance of the new halt-service.) First of all, I want to mention that before the update everything worked perfectly. But then, it brought me a strange problem.

This is what I do as a startup:

roscore
roslaunch schunk_bringup lwa4p_solo.launch
roslaunch schunk_bringup dashboard_lwa4p.launch


Up until this point everything works fine, no errors. So let's initialize the arm, using the init-service of the canopen_ros node (e.g. clicking the Init-Button of the dashboard). This makes the canopen_ros node check for availability of the robot's nodes, finds all of them, starts some PDO mapping, runs through it and stops responding afterwards. Neither there are click-noises (as it should be while initializing the robot) to hear from the robot nor the robot's joints were initialized. It just steps into an infinite loop it, that's it. When contacting the canopen_ros node using my own program, it gets no response from the canopen_ros node (as it is caught in an infinite loop).

So far, so bad. What's happening? - As far as I could understand the canopen_ros and canopen_core program, after the PDO mapping, it tries to set motor states for all joints. I found out by running the canopen_ros node in QtCreator in debug mode, setting some breakpoints and randomly halting the program after it gets caught in its infinite loop. Funny thing is, that using breakpoints and stepping through it, sometimes the program gets to initialize some joints or even all, sometimes there is no difference to running it normally in its behaviour. Some kind of randomness.

This problem occurs in the canopen::setMotorState routine, which is somehow called while initializing the arm. It contains a loop in which for all devices ( =joints) the current motor state is compared to a desired motor state, trying to change the motor state if this is not the case ( = if the current state does not equal the desired state). The program gets caught in this loop as it fails to match the current state and the desired state of the robot's first joint.

So my question is, why does the program fail to change the motor state? How can I resolve this? Is there some kind of communication fail? - I do not think so, as I can easily initialize and move the arm using a schunk software tool. I did not edit any launch- or yaml-file and I reinstalled the ipa_canopen, schunk_robots and schunk_modular_robotics package. This error occurs everytime I try to initialize the arm using the ros service.

I really hope, someone can help me with this one. Thank you in advance and best regards,

Marcel Usai

P.S.: I use ROS groovy.

edit retag reopen merge delete