Cannot initialize/control PWM when running ROS node (permission denied)

Hi, @djsuo
You can’t use sudo as your environment variables aren’t set for user root, therefore it’s impossible to run rosrun. You can login as root and source setup.bash. Then everything should work.