How to rosrun a node as sudo or edit roslaunch file?

asked 2017-01-08 23:56:55 -0500

YingHua gravatar image

updated 2017-01-09 01:56:23 -0500

mgruhler gravatar image

Hi, I create a package which is about using multi VL53L0X sensors on Jetson TK1.

Click me to blog

Click me to Github

Because of using GPIO and I2C, I have to rosrun this node as super user.

Here is my rosrun steps:

termianl 1


terminal 2

sudo su
rosrun ranged_finder measure1sensor_node

How can I do to edit in a launch file or create a shell script to make steps less?

Thanks :)

edit retag flag offensive close merge delete


in general, you should avoid having a node run as sudo. Can't you change the permissions of GPIO and I2C to have read rights there? There are many similar questions about GPIOs (click the tag) and one about GPIO with jetson

mgruhler gravatar image mgruhler  ( 2017-01-09 01:54:55 -0500 )edit

GPIO is not used when I only use one sensor.I think my question is more about rosrun i2c at super user.Thanks for your response :)

YingHua gravatar image YingHua  ( 2017-01-09 02:37:05 -0500 )edit

Well, the same holds there: can't you get read access on the I2C?

mgruhler gravatar image mgruhler  ( 2017-01-09 02:44:56 -0500 )edit

Yes,my node works. I just want to make my steps less :)

YingHua gravatar image YingHua  ( 2017-01-09 02:58:51 -0500 )edit