Ask Your Question

Nvidia Jetson GPIO with ROS

asked 2016-06-26 10:50:26 -0500

jacksonkr_ gravatar image

There are plenty of articles online about the Jetson GPIO but there's not much about using it with ROS.

Is there a simple way to integrate Jetson GPIO with ROS or do you have to control everything manually through your ROS cpp program?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-26 13:47:17 -0500

luketheduke gravatar image

You can do it both ways. You can directly access the pins from your program with C++. The other approach is to write a node that uses topics or services to access or set the pins. For reference you can look at these resources from the wiki:

Writing a Simple Service and Client (C++))

Writing a Simple Publisher and Subscriber (C++))

I don't know how you are managing permissions on your robot, but for me to access GPIO on my Beaglebone, I just made sudo passwordless and then when my node launched, I chmodded the /dev/class/gpio folder to allow my user to access it. Hope this helps! luketheduke

edit flag offensive delete link more



Great info! I'm glad you brought up permissions. I think I'll take your passwordless sudo approach. I have wifi / ssh on this machine but sudo won't apply unless someone is logged in so I should be good.

jacksonkr_ gravatar imagejacksonkr_ ( 2016-06-26 14:14:17 -0500 )edit

Also, another thing to note is that if you are using the robot_upstart package to launch your nodes on boot, then you want to modify the source code for it to use sudo -u USERNAME instead of the setuid that it uses itself. In the unmodified state, robot_upstart doesn't play nice with GPIO.

luketheduke gravatar imageluketheduke ( 2016-06-26 14:33:31 -0500 )edit

If this answer answers your question, please mark it solved by pressing the button below the upvote/downvote buttons. This helps improve the ROS community. Thanks, luketheduke

luketheduke gravatar imageluketheduke ( 2016-06-26 14:35:17 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-06-26 10:50:26 -0500

Seen: 504 times

Last updated: Jun 26 '16