Calling the ultrasonic sensor directly from the Jetson Nano may not be ideal as the Jetson Nano does not do real time processing. This causes your distance measurement to become unreliable.
You’re probably better off adding a small Arduino Nano or Adafruit Feather microcontroller (the latter fits nicely under the Adafruit motor controller) to measure the distance. You can then use I2C communication to instruct the microcontroller to make a measurement and return the result via I2C.