This week the main focus on the robot side was getting the full Nav2-to-motor-control pipeline working on the Elegoo Smart Car V4. The Arduino UNO was reflashed with a custom serial listener that parses L<int>,R<int> commands over USB, replacing the stock Elegoo Bluetooth firmware. The V4-specific TB6612FNG motor driver pin mappings (PWMA=5, PWMB=6, AIN=7, BIN=8, STBY=3) were confirmed and wired up. A Python ROS2 bridge node on the Pi 5 subscribes to Nav2’s /cmd_vel topic, computes differential drive kinematics, and sends the resulting left/right motor values over serial to the Arduino. Debugging covered serial port conflicts between the RPLiDAR (/dev/ttyUSB0) and Arduino (/dev/ttyUSB1), fixing the DTR reset delay caused by the UNO bootloader hanging for about 2 seconds on serial connect, setting up a static IP on the Pi via netplan for reliable SSH, and manually testing motor response with ros2 topic pub. The full Nav2 stack is now confirmed running with Cartographer, RPLiDAR, velocity smoother, controller server, and the OTOS odometry node all active.
On the Kria KR260 FPGA side, the YOLOX-Nano post-processing and NMS pipeline was worked through in detail for the HLS implementation. The post-processing stage decodes raw DPU outputs into pixel-space bounding boxes by applying grid offsets and stride scaling, then computes detection confidence as sigmoid(objectness) multiplied by softmax(class logits). The NMS stage runs class-agnostic greedy non-maximum suppression with an IoU threshold of 0.45, using fixed-point arithmetic for hardware efficiency. An HLS C++ testbench was written with 8 test vectors covering edge cases like empty predictions, threshold saturation, injected person detections, multiple classes, and different image dimensions, with tolerances set at 2 pixels for bounding boxes and 0.05 for scores to account for fixed-point quantization error. The detection output pipeline was also switched from serial to TCP over WiFi, with the Kria sending JSON-formatted person detections to a listener node on the Pi that publishes them to the ROS2 person_detections topic.
