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

Revision history [back]

click to hide/show revision 1
initial version

Can I just use socketcan_bridge and socketcan_interface ROS packages, basically the CAN layer, to communicate with motor controllers using ROS?

While it is possible to use raw CAN messaging via socketcan_bridge, I would not recommend it. ROS messaging is not deterministic and this might result in timing-related problem during control.

As an alternative you could implement your own control (ROS) node, which uses socketcan_interface for low-level communication.

Or do I have to use a CAN protocol like CANopen?

You don't have to used CANopen, but it is widely adopted. canopen_master offers C++ classes for building your own CANopen master node.

canopen_chain_node even offers a ROS-based implementation for interfacing with CANopen nodes that is meant to be subclassed to support higher-level profiles (like canopen_402).

In the case that the motor controller I'm planning to use uses a different CAN protocol, like SAE J1939, or different CANopen profile than 402 which is the one that ros_canopen package implements.

canopen_motor_node uses canopen_402 by default, but you create your own CANopen-based motor plugin (canopen::MotorBase)

However, for SAE J1939 (not CANopen-based) you would need to write your custom implementation.