ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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