Ask Your Question

How to used ROS_CANopen?

asked 2016-05-05 20:34:40 -0600

Craig gravatar image

updated 2016-05-24 04:42:24 -0600

Hi. I am quite new to ROS . I want to use ros_canopen package to communicate with the robot in my lab, i.e. build a ros controller for it. However , I cant find a more detail tutorial to use it than the general intro on .

HardWare and resources:

  1. A USB-to-CAN compact is used to communicate between my laptop and the robot . This USB-to-CAN provids a Linux driver called ECI and an EDS file for configuring CANopen devices.
  2. The robot uses Maxon motors and Copley driver boards(Accelnet Micro Module). Copley provides a Copley Motion Lib(CML).

ros_canopen seems only support socketcan![](

How can I set up my laptop to communicate with CAN bus. I use Ubuntu 14.04 with Indigo installed.

Many thanks.

edit retag flag offensive close merge delete


As JuliusGel pointed out, try to install the ixxat socketcan driver: (see the README!). The ros wiki pages on socketcan_interface and canopen_motor_node give some additional hints. Feel free to add what's missing.

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2016-05-06 06:59:09 -0600 )edit

Thank you for the repaid replies. The ixxat socketcan driver works. Thx again !

So i'm trying to configure canopen_motor_node. Here I found a repo using ros_canopen [ ] . I'm trying to write a launch file to start canopen_motor

Craig gravatar image Craig  ( 2016-05-06 23:11:30 -0600 )edit

with a can.yaml and a node.yaml. However it threw out a canopen::ParseException. Are there other projects that use ros_canopen? Maybe I could borrow some of their codes to launch canopen_motor.

Thank you very much.

Craig gravatar image Craig  ( 2016-05-06 23:15:23 -0600 )edit

Hi. I'm in the same situation with you. I use the same hardware and have no idea what to do next. Can we communicate by e-mail? I think that is more efficient and will save lots of time. My e-mail address is . Look forward to your letter.

Will gravatar image Will  ( 2016-05-18 07:44:17 -0600 )edit

Hi @Will... just wanted to let you know that I moved your answer to be a comment. Answers are specifically reserved for answers. Best of luck getting your situation resolved!

jarvisschultz gravatar image jarvisschultz  ( 2016-05-18 08:03:59 -0600 )edit

The Care-O-bot 4 uses ros_canopen for 27 motors (cob_hardware_config ). Some examples can be found in And schunk_robots works as well.

The ParseException is triggered from errors in the EDS (or bugs in the parser).

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2016-05-19 04:11:11 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2016-05-06 00:45:35 -0600

JuliusGel gravatar image

I assume you are using this USB-to-CAN device. You are right ros_canopen only supports SocketCAN interface. If you want to use another kernel driver i.e. ECI you will have to implement a custom driver plugin. You could have a look at how socketcan_interface is implemented in ros_canopen here.

That being said it seems that your USB-to-CAN device also supports SocketCAN. The driver is located here. So you could have a look at it.

Another question is does your robot use OpenCAN protocol? If it does not then ros_canopen package might not be suitable for you at all. And even if your robot does support OpenCAN you might have to implement additional profiles because ros_canopen for now only supports basic (301) and motion control (402) profiles. But I can not comment on that more without knowing what robot you are trying to control.

Hopefully that helps to clarify things a bit.

edit flag offensive delete link more



This answer sums it up pretty well! The CAN layer can be customized with a can::DriverInterface plugin. If your motor does not support the 402 profile you can provide a canopen::MotorBase::Allocator plugin and reuse the ros_control interfaces of canopen_motor_node.

Mathias Lüdtke gravatar image Mathias Lüdtke  ( 2016-05-06 03:53:06 -0600 )edit

Thx. The socketcan driver you gave did work! Now I'm trying to run the canopen_motor_node.There seems to be some problems in the code. Which branch of ros_canopen would you recommond? Indigo-devel or indigo-release-candidate?

Craig gravatar image Craig  ( 2016-05-09 02:26:16 -0600 )edit

I believe indigo-devel should be the most up to date code.

JuliusGel gravatar image JuliusGel  ( 2016-05-09 02:48:44 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-05-05 20:34:40 -0600

Seen: 5,440 times

Last updated: May 24 '16