ipa320 / schunk_robots

www.schunk-modular-robotics.com
29 stars 50 forks source link

Schunk LWA4P CAN issues #96

Closed fzoric8 closed 2 years ago

fzoric8 commented 3 years ago

Hi,

I'm having some troubles regarding CAN interface and setup for Schunk LWA4P.

I'm getting following errors as long as I'm trying to use following can0.yaml specification:

bus:
  device: can0
sync:
  interval_ms: 25
[ERROR] [1630779962.084919678]: EMCY received: 88#1081110000000000
[ERROR] [1630779962.892890561]: EMCY received: 83#0000000000000000
[ERROR] [1630779962.894302423]: error register: 17

I've tried to debug following error code (CAN overrun) and I've found this issue regarding CAN overflow.

I've tried values ranging from 10-20 for setting up txqueuelen of my can0 interface but still no luck.

First sync interval that's possible to achieve is 25 ms, which reduces my control loop frequency to 40Hz. Altough it's relatively ok, It would be great to have 50Hz for smooth robotic arm servoing, ideally 100Hz.

Output of ip -details -statistics link show can0 is:

ip -details -statistics link show can0
9: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 25
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 50 
      bitrate 500000 sample-point 0.875 
      tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
      pcan_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
      clock 8000000 
      re-started bus-errors arbit-lost error-warn error-pass bus-off
      0          0          0          1          0          0         numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 
    RX: bytes  packets  errors  dropped overrun mcast   
    56244      10330    0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    7092       2249     0       0       0       0      

I'm using PCAN-USB and SocketCAN driver.

Basically, I'm wondering how to solve can overrun issue and initialize driver sucessfuly to enable control of robot manipulator above 40Hz.

Thank you for your time and help.

fzoric8 commented 2 years ago

Nobody maintains this anymore, and I doubt somebody will anytime soon. Closing due to inactivity.