ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can't install driver using libpcan

asked 2016-03-04 17:55:08 -0500

gracecopplestone gravatar image

updated 2016-03-04 17:55:28 -0500

I followed the instructions on the libpcan ROS page however when I entered 'sudo ./install_pcan.sh' I got the following error: sudo: ./install_pcan.sh: command not found. http://wiki.ros.org/libpcan

I'm trying to work out which ROS package I can use to communicate with 2 Schunk Powercube arms via canbus. I have tried using the available schunk packages however I believe that our arms are so old that existing packages do not support them. Therefore looking to start from scratch.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-03-04 19:43:45 -0500

ahendrix gravatar image

updated 2016-03-04 19:44:45 -0500

Their installation instructions look very out of date (they're still using rosmake).

Drivers for the PEAK CAN adapters are now included in the Linux kernel, and using them through SocketCAN is simpler and more portable than using the proprietary drivers.

The wikipedia article describes how to use the virtual can interface. For a real interface, you don't need to create the interface, but you do need set the bit rate and enable the interface manually. You can do this with the following commands:

sudo ip link set can0 type can bitrate 500000
sudo ip link set can0 up

OR you can make it autoconfigure by adding the following interface configuration to your /etc/network/interfaces:

allow-hotplug can0
iface can0 inet manual
    pre-up ip link set can0 type can bitrate 500000
edit flag offensive delete link more

Comments

Thanks, out of interest why do you specify bitrate as opposed to baudrate? We've been using a baudrate of 500 up until now.

gracecopplestone gravatar image gracecopplestone  ( 2016-03-04 21:20:14 -0500 )edit

The ip command uses the bitrate keyword for setting the CAN bit rate. This is documented in the Linux kernel documentation: https://www.kernel.org/doc/Documentat... (baud rate and bit rate refer to the same thing on CAN)

ahendrix gravatar image ahendrix  ( 2016-03-04 21:46:21 -0500 )edit
0

answered 2016-03-04 19:39:11 -0500

greenfield gravatar image

try sudo apt-get install ros-indigo-libpcan ?

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-03-04 17:55:08 -0500

Seen: 1,227 times

Last updated: Mar 04 '16