ros-industrial / ros_canopen

CANopen driver framework for ROS (http://wiki.ros.org/ros_canopen)
GNU Lesser General Public License v3.0
336 stars 271 forks source link

Error Frame on Initialization #378

Closed JadTawil-theonly closed 4 years ago

JadTawil-theonly commented 4 years ago

Hello,

I am receiving the following error frame on initialization. I am having trouble interpreting it. Can someone explain what the byte fields mean?

[ INFO] [1579272167.922525125]: Using fixed control period: 0.010000000
[ INFO] [1579272174.664336079]: Initializing...
[ INFO] [1579272174.664988208]: Current state: 1 device error: system:0 internal_error: 0 (OK)
[ INFO] [1579272174.665456296]: Current state: 2 device error: system:0 internal_error: 0 (OK)
[ERROR] [1579272174.676965536]: internal error: 4
[ INFO] [1579272174.677092130]: Current state: 2 device error: system:0 internal_error: 4 (controller problems;)
[ INFO] [1579272174.677187433]: Current state: 1 device error: system:0 internal_error: 4 (controller problems;)
[ERROR] [1579272174.677474422]: Received error frame: 20000004#000c000000000000
[ERROR] [1579272174.686669883]: CAN not ready
[ERROR] [1579272181.406856888]: Did not receive a response message
[ INFO] [1579272181.407591074]: Current state: 1 device error: system:125 internal_error: 4 (controller problems;)
[ INFO] [1579272181.407731045]: Current state: 0 device error: system:125 internal_error: 4 (controller problems;)
[ INFO] [1579272181.407901425]: Current state: 0 device error: system:0 internal_error: 4 (controller problems;)
[ INFO] [1579272181.408087939]: Current state: 0 device error: system:0 internal_error: 4 (controller problems;)
[ERROR] [1579272181.408495967]: Initializing failed: Transition timeout; Could not enable motor

Also, the time at which it occurs seems variable, for example, when running again after rebooting the controller:

[ INFO] [1579273993.391579784]: Using fixed control period: 0.010000000
[ INFO] [1579274006.030639647]: Initializing...
[ INFO] [1579274006.031218756]: Current state: 1 device error: system:0 internal_error: 0 (OK)
[ INFO] [1579274006.031900299]: Current state: 2 device error: system:0 internal_error: 0 (OK)
[ INFO] [1579274006.237545188]: Initializing successful
[ERROR] [1579274012.347936714]: internal error: 4
[ INFO] [1579274012.348112643]: Current state: 2 device error: system:0 internal_error: 4 (controller problems;)
[ INFO] [1579274012.348211838]: Current state: 1 device error: system:0 internal_error: 4 (controller problems;)
[ERROR] [1579274012.348515220]: Received error frame: 20000004#000c000000000000
[ERROR] [1579274012.352582509]: CAN not ready
[ERROR] [1579274014.845544357]: Did not receive a response message
[ERROR] [1579274015.847249361]: Did not receive a response message
[ERROR] [1579274016.848209866]: Did not receive a response message
[ERROR] [1579274017.849487966]: Did not receive a response message
[ERROR] [1579274018.850885233]: Did not receive a response message
[ERROR] [1579274019.852345306]: Did not receive a response message
[ERROR] [1579274020.853266720]: Did not receive a response message
[ERROR] [1579274021.854678989]: Did not receive a response message
[ERROR] [1579274022.352698629]: CAN not ready; CAN not ready
[ERROR] [1579274022.855785291]: Did not receive a response message

Notice how the driver says "Initialization succesful", then, after six seconds, the same error frame is detected.

mathias-luedtke commented 4 years ago

The error frame format is defined by SocketCAN: https://github.com/linux-can/can-utils/blob/master/include/linux/can/error.h


The issue is tracker is not meant for user support, only for bug tracking and feature requests,