Open NadimDeeb opened 7 months ago
Hey,
Yes, you are right. You indeed need to initialize the CAN communication.
You can easily do that by running the enable_can.sh script that can be found here: https://github.com/neobotix/neo_kinematics_omnidrive/tree/master/scripts
You can setup cron rules for that, if you do not want to avoid initializing it each time.
Hello again,
When I run the following script I get the following error:
@.***:~/ros_ws/src/neo_kinematics_omnidrive/scripts$ sudo ./enable_can0.sh Cannot find device "can0"
Could this mean I am missing a driver?
Thanks, Nadim
From: Pradheep Krishna @.> Sent: Sunday, January 14, 2024 9:33 PM To: neobotix/neo_mpo_700 @.> Cc: Nadim Dib (Student) @.>; Author @.> Subject: Re: [neobotix/neo_mpo_700] Failure to open CAN interface (Issue #11)
Hey,
Yes, you are right. You indeed need to initialize the CAN communication.
You can easily do that by running the enable_can.sh script that can be found here: https://github.com/neobotix/neo_kinematics_omnidrive/tree/master/scripts
You can setup cron rules for that, if you do not want to avoid initializing it each time.
— Reply to this email directly, view it on GitHubhttps://github.com/neobotix/neo_mpo_700/issues/11#issuecomment-1891050162, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6LFDCSWZRY4PPMJZGLFRNDYOQXH5AVCNFSM6AAAAABBYKOLLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJRGA2TAMJWGI. You are receiving this because you authored the thread.Message ID: @.***>
could you please confirm you have used a PEAK CAN-USB convertor for establishing the communication between the on-board computer and the motor drives?
By default, the Ubuntu should have SocketCAN drivers installed at the kernel level if it is > Ubuntu 18.04/
Hello again we do not have the specific cable PEAK CAN-USB but we have one that acts similarly. We used a Kvaser Leaf Light V2 found in the following link (https://www.kvaser.com/product/kvaser-leaf-light-hs-v2/). The PWR light on it is ON but the CAN light is off. After inserting this cable into the setup and running the enable_can0.sh in terminal we can see the can0 port in the ifconfig list. After launching the node we are now getting a weird error:
[ERROR] [1705417221.165329888]: NeoSocketCanNode: write() failed with: No buffer space available [ERROR] [1705417221.175265274]: wheel_3_joint: motor status timeout! [ERROR] [1705417221.175466392]: NeoSocketCanNode: write() failed with: No buffer space available [ERROR] [1705417221.185229804]: mpo_700_head_2_joint: motor status timeout! [ERROR] [1705417221.185400642]: NeoSocketCanNode: write() failed with: No buffer space available [ERROR] [1705417221.195216540]: wheel_2_joint: motor status timeout! [ERROR] [1705417221.195385028]: NeoSocketCanNode: write() failed with: No buffer space available [ERROR] [1705417221.205249624]: mpo_700_head_1_joint: motor status timeout! [ERROR] [1705417221.205431581]: NeoSocketCanNode: write() failed with: No buffer space available [ERROR] [1705417221.215231753]: wheel_1_joint: motor status timeout! [ERROR] [1705417221.215411665]: NeoSocketCanNode: write() failed with: No buffer space available [ERROR] [1705417221.225221295]: mpo_700_head_0_joint: motor status timeout!
Is there something left we need to run to empty the buffer or launch the socket?
Thanks again, Nadim
From: Pradheep Krishna @.> Sent: Monday, January 15, 2024 7:51 PM To: neobotix/neo_mpo_700 @.> Cc: Nadim Dib (Student) @.>; Author @.> Subject: Re: [neobotix/neo_mpo_700] Failure to open CAN interface (Issue #11)
could you please confirm you have used a PEAK CAN-USB convertor for establishing the communication between the on-board computer and the motor drives?
By default, the Ubuntu should have SocketCAN drivers installed at the kernel level if it is > Ubuntu 18.04/
— Reply to this email directly, view it on GitHubhttps://github.com/neobotix/neo_mpo_700/issues/11#issuecomment-1892583701, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6LFDCWE4K7EOQT7YKT5VIDYOVUCNAVCNFSM6AAAAABBYKOLLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSGU4DGNZQGE. You are receiving this because you authored the thread.Message ID: @.***>
Unfortunately, we have never tried KVaser convertor. Since we know that, PeakCAN-USB work out of the box since it already has all the drivers installed by default, whereas in KVaser I think we have to install the drivers of it in Ubuntu separately.
We ended up installing the needed driver. They are found on the Kvaser website, but the issue is that the main driver has blacklisted SocketCAN so you'll need to download the driver that enables SocketCAN. It is found at this website (https://www.kvaser.com/download/#?filter=linux).
We managed to get the output of the launch code to run without errors by also extending the tx queue length by using:
ifconfig can0 txqueuelen 1000
The node is launching properly now! One last question, when we monitor the can traffic we are receiving error frames like so:
@.***:~$ candump any,0:0,#FFFFFFFF can0 20000088 [8] 00 00 80 00 00 00 00 00 ERRORFRAME can0 20000088 [8] 00 00 80 19 00 00 00 00 ERRORFRAME
Do you happen to know what might be causing the issue? If this is not directly related to the omni drives issue then thank you anyway! 🙂
Cheers, Nadim
From: Pradheep Krishna @.> Sent: Tuesday, January 16, 2024 7:20 PM To: neobotix/neo_mpo_700 @.> Cc: Nadim Dib (Student) @.>; Author @.> Subject: Re: [neobotix/neo_mpo_700] Failure to open CAN interface (Issue #11)
Unfortunately, we have never tried KVaser convertor. Since we know that, PeakCAN-USB work out of the box since it already has all the drivers installed by default, whereas in KVaser I think we have to install the drivers of it in Ubuntu separately.
— Reply to this email directly, view it on GitHubhttps://github.com/neobotix/neo_mpo_700/issues/11#issuecomment-1894180964, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6LFDCQMP5EZMUOJSL2OA4DYO2ZF3AVCNFSM6AAAAABBYKOLLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJUGE4DAOJWGQ. You are receiving this because you authored the thread.Message ID: @.***>
Hello again and sorry for the consecutive emails,
We found out something weird with the omni drives bitrates. Since we are facing issues with receiving data, we suspect this might be due to the bitrate of the can. In the datasheet of the omni drive modules, it is said to be 57600 (baud rate), but when we try to set this number for the can bitrate, it gets automatically changed to 57692, which is 0.1% off from the desired value, and possibly causing the errors as per those terminal snipets:
@.***:~$ dmesg | grep can0 [ 364.421723] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready [ 1974.723909] kvaser_usb 1-2:1.0 can0: bitrate error 0.1% [ 1974.729013] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready [ 2796.569566] kvaser_usb 1-2:1.0 can0: refused to change device tx_queue_len [ 3024.750029] kvaser_usb 1-2:1.0 can0: bitrate error 0.1% [ 3024.755018] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
and
@.***:~$ sudo ip -details -statistics link show can0 5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 5000 link/can promiscuity 0 minmtu 0 maxmtu 0 can state ERROR-ACTIVE restart-ms 0 bitrate 57692 sample-point 0.875 tq 1083 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1 kvaser_usb_flex: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1 clock 24000000 re-started bus-errors arbit-lost error-warn error-pass bus-off 0 936362 0 0 5 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 RX: bytes packets errors dropped overrun mcast 0 0 936362 1 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 133 0 0
Could you tell us what the appropriate baud rate for those omni drives is? We are almost certain the error we are getting is from the discrepancy in the bitrate.
Cheers, Nadim
From: Pradheep Krishna @.> Sent: Tuesday, January 16, 2024 7:20 PM To: neobotix/neo_mpo_700 @.> Cc: Nadim Dib (Student) @.>; Author @.> Subject: Re: [neobotix/neo_mpo_700] Failure to open CAN interface (Issue #11)
Unfortunately, we have never tried KVaser convertor. Since we know that, PeakCAN-USB work out of the box since it already has all the drivers installed by default, whereas in KVaser I think we have to install the drivers of it in Ubuntu separately.
— Reply to this email directly, view it on GitHubhttps://github.com/neobotix/neo_mpo_700/issues/11#issuecomment-1894180964, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6LFDCQMP5EZMUOJSL2OA4DYO2ZF3AVCNFSM6AAAAABBYKOLLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJUGE4DAOJWGQ. You are receiving this because you authored the thread.Message ID: @.***>
No problem, we are happy that were able to connect and the ODM's and get it going.
First of all the baud rate that you are using is for RS 232.
For the CAN device, we usually the default one as shown below.
let me know if this helps..
I have 4 omni drive modules of the MPO_700 robot and I am trying to run the following command (after having downloaded the required dependencies from your documentation):
roslaunch neo_mpo_700 kinematics.launch
It launches the needed nodes perfectly, but it can't seem to communicate properly with the motors as I get the following error:
[ INFO] [1705070756.252012456]: Using motor group id: 30 [ INFO] [1705070756.283865614]: Initializing ... [ WARN] [1705070756.283981895]: Failed to open CAN interface 'can0': ioctl() failed! (No such device) [ WARN] [1705070757.284447663]: Failed to open CAN interface 'can0': ioctl() failed! (No such device) [ WARN] [1705070758.284880506]: Failed to open CAN interface 'can0': ioctl() failed! (No such device) ^C[ WARN] [1705070759.285312333]: Failed to open CAN interface 'can0': ioctl() failed! (No such device)
It is not a hardware issue, are there any preliminary steps that I need to do to set up the CAN interface?