Rosanswers logo

Hello everyone, I'd like to control (initialize and send can messages) to the Faulhaber motors.

I've downloaded the ros_canopen package and I've build it successfully in ubuntu kinetic OS.

I've run in cmd the following commands: 1)sudo modprobe peak_usb 2)sudo modprobe peak_pci 3)sudo modprobe pcan 4)sudo modprobe esd_usb2 5)sudo ip link set can0 up type can bitrate 500000 in the first cmd window.

the following command: 1) rosrun socketcan_bridge socketcan_bridge_node in a second cmd window

and: 1)rostopic echo /received_messages in a last cmd window.

I try to use the frames to initiate the motors. I'm not sure though how I can send the messages in the can.

I've tried: -cansend can0 (123#1122334455667788) can_id#data format for the frame but in the third cmd window the received message is not right.

In the data field I send the bytes in HEX, in the way I want the motors to receive them, but the data are returned differently. The motors aren't initiated.

So, here are my questions:

  1. Are EDS/DCF files necessary for only the motor?

  2. Can anyone guide me so that I can send the frame message correctly?

  3. What would be and how could I send the header?

4)Is a mask already by default running? If so, how do I have to send the data to initiate the motor?

5)Finally, the frame.id="", I know is the default value, but shouldn't I receive the frame I sent?

Thank you!

Thank you in advance! :)

Originally posted by nz on ROS Answers with karma: 3 on 2019-12-17

Post score: 0

Original comments

Comment by gvdhoorn on 2019-12-17:\

when this command was executed 'rosrun socketcan_interface socketcan_dump can0' errors popped out.

it would help readers here to know which particular errors you saw.

Comment by nz on 2019-12-17:
@gvdhoorn the errors were: ERROR: state=1 internal_error=0('OK') asio: system:0 ERROR: state=2 internal_error=0('OK') asio: system:0

Comment by gvdhoorn on 2019-12-17:
This is not for me specifically. It's for people reading your question.

Please also copy-paste the errors verbatim into your original question. Use the edit button/link for that.


1 Answer 1


Rosanswers logo

Actually, this is just a misleading output from https://github.com/ros-industrial/ros_canopen/blob/kinetic-devel/socketcan_interface/src/candump.cpp#L46

ERROR should better be STATE (I will fix that!).

In the first first line

ERROR: state=1 internal_error=0('OK') asio: system:0 

state=1 means that the device was opened successfully.

And in the second line

ERROR: state=2 internal_error=0('OK') asio: system:0

the driver switches to ready and can therefore receive and transmit data.

Originally posted by Mathias Lüdtke with karma: 1596 on 2019-12-17

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by nz on 2019-12-18:
okey! thank you for your answer

Comment by nz on 2019-12-18:
@Mathias could you please check my post again, as I've added some things and more specific questions?


Your Answer

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