ROS_CANopen faults on init.
I have a Bechoff CANopen bus terminal I'm trying to interface with. However, the driver fails on init and faults with the following error. I'm fairly new to CAN and am having a hard time debugging this.
Snapshot of terminal upon launching the canopen_chain_node
-
sidd@ubuntu:~$ roslaunch canopen_chain_node chain.launch yaml:=path/to/bus.yaml
[ INFO] [1576523526.299477632]: Initializing...
[ INFO] [1576523526.301994944]: Current state: 1 device error: system:0 internal_error: 0 (OK)
[ INFO] [1576523526.302596992]: Current state: 2 device error: system:0 internal_error: 0 (OK)
[ INFO] [1576523527.617270944]: Current state: 2 device error: system:125 internal_error: 0 (OK)
[ INFO] [1576523527.617470912]: Current state: 0 device error: system:125 internal_error: 0 (OK)
[ INFO] [1576523527.617731168]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ INFO] [1576523527.617830624]: Current state: 0 device error: system:0 internal_error: 0 (OK)
[ERROR] [1576523527.618035712]: CAN not ready
[ERROR] [1576523527.618344320]: Initializing failed: PDO error: _Map_base::at
The bus.yaml
file with parameters looks like this -
bus:
device: can0
loopback: false
sync:
interval_ms: 10
# update_ms: 10
overflow: 0
heartbeat:
rate: 20
msg: "707#00"
nodes:
node1:
id: 7
eds_file: "/home/sidd/ws/install/share/sidd_canopen/BK5120.eds"
publish: ["2000sub1!"]
Upon calling the /driver/init
service, I get the error -
sidd@ubuntu:~$ rosservice call /driver/init
success: False
message: "PDO error: _Map_base::at"
I tried doing a candump to get the raw frames, and this is what it prints out -
sidd@ubuntu:~$ candump can0
can0 707 [1] 00
can0 000 [2] 82 07
can0 707 [1] 00
can0 607 [8] 2B 17 10 00 00 00 00 00
can0 587 [8] 60 17 10 00 00 00 00 00
can0 000 [2] 02 07
I've also monitored the error counters by running and don't see anything suspicious -
sidd@ubuntu:~$ ip -details -statistics link show can0
8: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 250000 sample-point 0.875
tq 20 prop-seg 87 phase-seg1 87 phase-seg2 25 sjw 1
mttcan: tseg1 2..255 tseg2 0..127 sjw 1..127 brp 1..511 brp-inc 1
mttcan: dtseg1 1..31 dtseg2 0..15 dsjw 1..15 dbrp 1..15 dbrp-inc 1
clock 50000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
57 15 0 0 0 0
TX: bytes packets errors dropped carrier collsns
72 18 0 0 0 0
EDS file I'm using attached as a github gist
I see this github issue here with the same error code, but that's not very useful and I doubt the issues are related.
Any help would be appreciated!