Ros2 run and can bus error

Hello, we are a Korean university student who is making a Solo8ti robot by referring to your github site.
I haven’t confirmed that I connected the can bus properly, but I connected can0 and can1 using the canable device.
First, I ran the code ‘demo_1_motor_everything’ using the ros2rus command, but there seems to be a realtime related error, so I would like to ask for your help. If you have any advice, I don’t mind a little bit, so please.
Thank you.

From the error you are getting, I assume you already installed either a preempt_rt or lowlatency kernel?
In order to be able to run real-time threads without root permission, some additional setup is necessary, see Real Time Setup — robot_interfaces 1.2.0 documentation.

It appears you are running a real-time Linux kernel. The error messages mean exactly what they say, you either need to run as root by preceding the command with “sudo” (this changes you to “Super-User” for the durection of the one command.) or you can add yourself to the groups as it says. Use “usermod” command to do that. (See “man usermod” for details)

Thank you both for your quick reply.
This enabled us to execute code ‘demo_1_motor_print_everything’.

However, there was a problem executing the code ‘const_torque_control’.
No executable found error occurred.

I searched through Google, but I couldn’t find a satisfactory answer. If you know anything about this, even a small one is fine, so I hope you can help us


Thank you.

There is no executable const_torque_control, however, there is demo_const_torque_1_motor, maybe you are looking for that one?
Not all files in the demos/ folder directly correspond to an executable, some of them are only helper files included in some of the demos. For an actual list of the executable demos that are build, see the CMakeLists.txt (there is unfortunately no better documentation for this at the moment).

1 Like