ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ros_canopen did not receive a response message

asked 2016-05-10 03:02:47 -0500

Craig gravatar image

updated 2016-05-10 07:57:13 -0500

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.

edit retag flag offensive close merge delete

Comments

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.

gvdhoorn gravatar image gvdhoorn  ( 2016-05-10 03:19:12 -0500 )edit

Thx for your advice.

Craig gravatar image Craig  ( 2016-05-10 04:13:49 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-05-10 04:23:09 -0500

Mathias Lüdtke gravatar image

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_impl<boost::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?

edit flag offensive delete link more

Comments

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.

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2016-05-10 09:10:31 -0500 )edit

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.

Craig gravatar image Craig  ( 2016-05-10 10:10:53 -0500 )edit

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"

Craig gravatar image Craig  ( 2016-05-17 04:22:24 -0500 )edit

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.

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2016-05-19 04:15:07 -0500 )edit

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.

Craig gravatar image Craig  ( 2016-05-19 21:15:47 -0500 )edit

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

Craig gravatar image Craig  ( 2016-05-19 21:30:14 -0500 )edit

Your EDS still uses wrong types for a number of objects. In CANeds you have to add the 402 database (Ctrl+F2).

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2016-05-30 16:02:06 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-05-10 03:02:47 -0500

Seen: 1,165 times

Last updated: May 10 '16