0
$\begingroup$

Rosanswers logo

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 wiki.org .

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![](http://wiki.ros.org/ros_canopen?

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

Many thanks.


Originally posted by Craig on ROS Answers with karma: 78 on 2016-05-05

Post score: 3


Original comments

Comment by Mathias Lüdtke on 2016-05-06:
As JuliusGel pointed out, try to install the ixxat socketcan driver: http://www.ixxat.com/support/file-and-documents-download/drivers/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.

Comment by Craig on 2016-05-06:
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 [https://github.com/jlarraez/schunk_lwa4p/blob/master/launch/robot.launch] . I'm trying to write a launch file to start canopen_motor

Comment by Craig on 2016-05-06:
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.

Comment by Will on 2016-05-18:
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 [email protected]. Look forward to your letter.

Comment by jarvisschultz on 2016-05-18:
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!

Comment by Mathias Lüdtke on 2016-05-19:
The Care-O-bot 4 uses ros_canopen for 27 motors (cob_hardware_config). Some examples can be found in https://github.com/ipa320/canopen_test_utils And schunk_robots works as well.

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

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by JuliusGel with karma: 433 on 2016-05-06

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by Mathias Lüdtke on 2016-05-06:
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.

Comment by Craig on 2016-05-09:
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?

Comment by JuliusGel on 2016-05-09:
I believe indigo-devel should be the most up to date code.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.