Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate socketcan_interface queue overflows #102

Open
mathias-luedtke opened this issue Jul 6, 2015 · 2 comments
Open

Investigate socketcan_interface queue overflows #102

mathias-luedtke opened this issue Jul 6, 2015 · 2 comments

Comments

@mathias-luedtke
Copy link
Member

The socketcan txqueue might run full on fast updates, socketcan_interface does not handle this properly.

A temporary fix is to increase the queue len:

sudo ip link set <NETWORK> txqueuelen 15 # or even higher, default: 10

socketcan_interface should detect the buffer overrun and handle it properly.
Problem: In most case the error is caught in the following read and not in the actual write.
Use async write instead?

@fmessmer
Copy link
Contributor

Can the command abouve be integrated into https://github.com/ros-industrial/ros_canopen/blob/indigo-devel/canopen_test_utils/scripts/prepare.sh?
It's hard to remember until it is not yet fixed...:wink:

@mathias-luedtke
Copy link
Member Author

No, because it is quite cumbersome to do argument parsing in bash.
This script will be removed sooner or later..

I recommend to put the following in /etc/network/interfaces:

allow-hotplug can0
iface can0 can static
    bitrate 500000
    up ip link set $IFACE txqueuelen 20

I have updated the wiki as well. (http://wiki.ros.org/socketcan_interface#Initialize_NIC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants