Rosanswers logo

Hi, I trying to use ros_canopen to control a robot with canopen motors. I use indigo.

I run candump in a terminal. When I connect the motor to power,candump receives:

~/ws $ rosrun socketcan_interface socketcan_dump can0
ERROR: state=1 internal_error=0('OK') asio: system:0
ERROR: state=2 internal_error=0('OK') asio: system:0
s 702   1 0
s 82    8 30 81 0 0 0 40 0 0

So I suppose the hardware connection is correct.

However when I load parameters and then run canopen_motor_node , it gave an error:

$ rosrun canopen_motor_node canopen_motor_node 

[ WARN] [1462871551.731234857]: Sync overflow was not specified, so overflow is disabled per default

Did not receive a response message

[ERROR] [1462871553.457722242]: 
/home/craig/ws/src/ros_canopen/canopen_master/include/canopen_master/objdict.h(457): Throw in function canopen::ObjectStorage::Entry<T> canopen::ObjectStorage::entry(const canopen::ObjectDict::Key&) [with T = signed char]
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::bad_cast> >
std::exception::what: std::bad_cast

The configuration of CAN bus is simple and is Here.The eds is provided by Copley.

I've tried to read the code where produces the "Did not receive a response message" but could find out how to solve this problem.

Any help will be appreciated .Thank you.

Originally posted by Craig on ROS Answers with karma: 78 on 2016-05-10

Post score: 0

Original comments

Comment by gvdhoorn on 2016-05-10:
If at all possible, please don't use screenshots of terminal output. It's all text, and can easily be copy/pasted into the question. Images aren't searchable, and if the screenshots ever disappear, this question will be worthless.

If you decide to update, please edit your original question.

Comment by Craig on 2016-05-10:
Thx for your advice.


1 Answer 1


Rosanswers logo

The branch of ros_canopen i use is indigo-devel,which i found out very different from indigo_release_candidate.Which one is more recommended?

indigo-devel is the most recent and recommended version.

82 8 30 81 0 0 0 40 0 0

This is a heatbeat failure. (You're controller waits for a heartbeat message, but you have not configured to send it?)

boost::exception_detail::clone_implboost::exception_detail::error_info_injector<std::bad_cast > std::exception::what: std::bad_cast

The driver expects another data type (signed char), I guess you're EDS states something else.

It is really hard to debug if you don't provide your config. I guess you have been calling the init service from another shell?

Originally posted by Mathias Lüdtke with karma: 1596 on 2016-05-10

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by Mathias Lüdtke on 2016-05-10:
I have checked your EDS with CANchkEDS, it does not match the standard object types. You should install CANeds (v3.6 works with wine) and resolve all errors.

Comment by Craig on 2016-05-10:
Thanks! I will try it. I download this EDS file from Copley website. Strange problem that it should not match the standard object types. Do you think this leads to problems that I mentioned above?Thanks.

Comment by Craig on 2016-05-17:
i have checked the eds file with CANeds. After I fixed two errors that CANeds gave, I still got the bad_cast. There are some warnings about not clearifying remapping direction of some object. Copley replied that other costumers did well with this eds . And it still "did not receive response msg"

Comment by Mathias Lüdtke on 2016-05-19:
Please update your EDS on github. A faulty EDS might work for others, but ros_canopen relies on the type information because of its strict type policy.

Comment by Craig on 2016-05-19:
Updated eds file is here. The main difference from its original file is the "EDSVersion=3.0" is changed to "EDSVersion=4.0" and a sub-index data type is modified to conform to it's parent index.

Comment by Craig on 2016-05-19:
Besides, AccessType in the eds file is changed into lowercase. (canopen_motor_node doesn't accept uppercase ones) E.g. "AccessType=RW" --> "AccessType=rw" CANeds gave warnings about not specifying the mapping direction.I think AccessType of mappable object with rw access should change to rwr or rw

Comment by Mathias Lüdtke on 2016-05-30:
Your EDS still uses wrong types for a number of objects. In CANeds you have to add the 402 database (Ctrl+F2).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.