CANopen test based on the canopen_test_utils package
Hello,
i am trying to communicate with a single motor through CANopen. I had posted earlier about it in this question: #q294210
EDIT (21/06): This question was answered by Mathias Lüdtke. The error was in the EDS file, Mathias noticed that the [6502] object had a wrong DataType value, the right DataType value is 0x0007. After i changed the value the controller was spawned correctly.
*However a new ERROR occurred after the spawning. * This problem is discussed in #q294869
ORIGINAL question starts here: Since no answer was arrived, i was trying to find reference CANopen based projects. Two popular projects/packages were recommended by Mathias Lüdtke: 1) canopen_test_utils and 2) schunk_robots.
The canopen_test_utils seemed perfect to me, since it provides a CANopen based control solution for only 1 joint, e.g. one motor. Therefore i only needed to replace the Elmo.dcf file to my EDS file in canopen_rig1.yaml file. I changed nothing else in the package.
So i did the following:
- sudo ip link set can0 up type can bitrate 500000
- roslaunch canopen_test_utils hw_rig1.launch
- rosservice call /rig1/driver/init
And of course the call crashed with the following message:
success: False
message: "Throw location unknown (consider using BOOST_THROW_EXCEPTION)\nDynamic exception\
\ type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error>\
\ >\nstd::exception::what: boost: mutex lock failed in pthread_mutex_lock: Invalid\
\ argument\n; Could not set transition"
OK.. (so i thought...) Since only the DCF/EDS file differs, and this project has been tested, therefore i checked and compared the Elmo.dcf and my EDS file line by line in a bruteforce way. I modified my original EDS file based on this Elmo.dcf, so it has the same T/R PDO mappings, transmission types, etc, more or less everything.
I repeated the aforementioned 3 steps using the new updated EDS file to test the package.
And of course it crashes again. I try to give here every information that i got in the terminals:
After step 2, i have the following output in the terminal (2 suspicious warnings: Controller Spawner couldn't find the expected controller_manager ROS interface.):
xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
deprecated: xacro tags should be prepended with 'xacro' xml namespace.
Use the following script to fix incorrect usage:
find . -iname "*.xacro" | xargs sed -i 's#<\([/]\?\)\(if\|unless\|include\|arg\|property\|macro\|insert_block\)#<\1xacro:\2#g'
when processing file: /home/akosodry/catkin_ws/src/canopen_test_utils/urdf/rig1.urdf.xacro
xacro.py is deprecated; please use xacro instead
started roslaunch server http://akosodry-8700K-linux:33007/
SUMMARY
========
CLEAR PARAMETERS
* /rig1/driver/
PARAMETERS
* /rig1/driver/bus/device: can0
* /rig1/driver/bus/master_allocator: canopen::SimpleMa...
* /rig1/driver/defaults/dcf_overlay/1016sub1: 0x7F0064
* /rig1/driver/defaults/dcf_overlay/1017: 100
* /rig1/driver/defaults/dcf_overlay/6098: 35
* /rig1/driver/defaults/eds_file: config/ASDA_A2_10...
* /rig1/driver/defaults/eds_pkg: canopen_test_utils
* /rig1/driver/heartbeat/msg: 77f#05
* /rig1/driver/heartbeat/rate: 20
* /rig1/driver ...
Which service call? The errors do not look good. The error register (1001) cannot be read/reset and your drive has a heartbeat failure. In addition "RPDO timeout" might occur once in a while (given heavy CPU or bus load), but not always.
After i call: