Robotics StackExchange | Archived questions

Run node as sudo in ROS 2?

I am trying to activate an open-source master Ethercat. Previously, I started my EtherCAT master from bash. However, now it shows the following error:

Failed to open /dev/EtherCAT0: Permission denied. 

On the other side, if I do not create this master manually from bash, it reports that the directory I am searching for does not exist.

How can I launch my EtherCAT0 master with sudo permission, or do you have other solutions that may be more suitable for that case?

Asked by errixerri on 2022-09-20 01:43:02 UTC

Comments

How about you assign proper permissions to /dev/EtherCAT0 from terminal once? You need to make sure that the current user have permissions to run /dev/EtherCAT0. For example, look for a group ethercat and make the current user a member of that group, etc.

Asked by ravijoshi on 2022-09-20 03:59:44 UTC

Answers