0
$\begingroup$

Rosanswers logo

Newbie here. I have installed ROS Hydro and I have run through all the ROS basic tutorials but I have no practical experience yet. I have an ELMO motor controller and motor set up on a workbench with a CAN bus interface. I'm ready to try to write some code to send commands over the CAN bus to turn the motor on and off, but I don't really know where to start.

Are there any CAN bus libraries included with ROS or something that I can download as a plugin? Any other advise for a newbie? Thanks in advance!


Originally posted by Kurt Leucht on ROS Answers with karma: 486 on 2014-01-27

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

AFAIK there is no really 'generic CAN driver node' available, but some packages that interface to CAN do exist. For instance the cob_generic_can package:

The package cob_generic_can provides an interface for nodes on a can-bus and examplary wrappers for two PeakSys-can-libs. When a can-bus-device is generated (for an example see cob_base_drive_chain) you can use generic_can to create as many itfs as there will be components communicating via this can-bus. Assign type of the can communication device (e.g. usb-to-can or can-card of a specific vendor) and can-address of the target device. This package comes with wrappers for PeakSys and PeakSysUSB adapters.

I'm not sure you can directly use this for your specific setup, but it should provide you with enough pointers to get something going.


Originally posted by gvdhoorn with karma: 86574 on 2014-01-27

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Kurt Leucht on 2014-02-01:
Thanks! I'll check it out!

Comment by Ryan Steindl on 2014-04-07:
Just curious if you got this working i am looking at using it to control some maxon EPOS controllers and was wondering if you had some pointers?

Comment by Kurt Leucht on 2014-04-09:
I have not had the opportunity yet. My machine has the can-utils installed: https://gitorious.org/linux-can/can-utils/source/67a2bdcd336e6becfa5784742e18c88dbeddc973: So I borrowed some of that code and tweaked it and wrote a node that sends CAN commands based on the cansend.c file that works fine.

$\endgroup$

Your Answer

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