How to access GPIO with ROS-MELODIC?

JetPack 4.3
Ros-Melodic

Greetings,

I have a Jetson Nano and Adafruit Motor Shield v3. After looking over the documentation for the Motor Shield it appear that you can talk to it with 3/5V I2C. So I thought about going down the rabbit hole to try and access the GPIO from a ROS package.

Is there a file that I can include like a header file (e.g. gpio.h) that would facilitate such an endeavor?

I think it would be neat to send commands directly instead of using ROS Serial and an arduino with a shield installed.

Cheers,

Coach

hello CoachAllen,

you might refer to Topic 1030443 for tutorials showing how to use GPIO.
please access L4T sources via download center. you should check the gpio definition as below.
for example,
$l4t-r32.3.1/TX1_Nano/Linux_for_Tegra/source/public/kernel/kernel-4.9/include/dt-bindings/gpio/tegra-gpio.h