Closed augenstern-M closed 1 year ago
@mathias-luedtke Hi! Do you have any clue about this error? Look forward to your reply! Thanks in advance.
@augenstern-M: Have found the issue? It looks like the device does not behave like a regular CANopen 402 device, because it switches the motor on directly..
@augenstern-M: Have found the issue? It looks like the device does not behave like a regular CANopen 402 device, because it switches the motor on directly..
Hi @mathias-luedtke ! Thank you for your answer. The problem has been solved and now I can control my motor through ros_canopen successfully. Here is the reason why this error occurred.
Hi guys!
I'm new to ROS and I would like to use ros_canopen(0.8.5) package to control a motor (supporting Canopen) on a Raspberry Pi 4b (Ubuntu 18.04.5 + ros melodic). The current situation is that the canopen master cannot be initialized successfully with the error "std::bad cast; Could not set transition". I have looked up into many tutorials but it seems that I could not find a suitable solution for this error. However, I do found an issue #323 which is quite similar with this one . Unfortunately, no detailed solution is provided in that issue.
Here are the messages in the terminal after running the launch file.
Obviously, there is a warning message "illegal transition 0->2" which I think it is thrown by canopen_402/src/motor.cpp in line 158 . I wonder if this has something to do with the error. Also, the code snippt of where it fails is given as follows.
Here are the can frames collected from CAN bus during launching process.
Here are the corresponding configuration files, including the configurations for motor controller, motor limitations and canopen. As can be seen in the
canopen.yaml
, there are no PDO remappings now. The .eds file has been checked by CANeds and is now error-free. The original one is here.