Can I just use socketcan_bridge and socketcan_interface ROS packages to communicate with motor controllers using ROS?
Hi,
Can I just use socketcanbridge and socketcaninterface ROS packages, basically the CAN layer, to communicate with motor controllers using ROS? Or do I have to use a CAN protocol like CANopen? 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.
Best,
Asked by Nochika on 2019-08-23 12:02:28 UTC
Answers
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.
Asked by Mathias Lüdtke on 2019-09-02 06:36:52 UTC
Comments