Using the pololu VL53L5CX (can be powered via 5v directly, connect VIN, SCL, SDA, & ground to the jetson GPIO.
Clone this repo into a ROS 2 overlay workspace alongside px4_msgs:
colcon build --packages-select px4_msgs jetson_obs_distance
Source the overlay:
. install/setup.bash
I2C bus index depends on the Jetson i2c port (and the jetson board used). Usually it is either bus 0, bus 1, or bus 7. For example on bus 0:
ros2 run jetson_obs_distance jetson_obs_distance --ros-args -p i2c_bus:=0
Built and tested on ROS 2 Foxy. Built package in ROS 2 humble without issues but not tested.