micro_ros_raspberrypi_pico_sdk
micro_ros_raspberrypi_pico_sdk copied to clipboard
I'm using Pico to read LiDAR values, but the return value of uart_is_readable is inconsistent.
Issue template
- Hardware description: tf-luna - pico ( uart1 )
- RTOS:
- Installation type: micro_ros_raspberrypi_pico_sdk
- Version or commit hash: humble
Steps to reproduce the issue
TF-Luna tutorial Tutorial in this repository Build pico_micro_ros_example.c as the main Added conditions for cases where 0 is intermittently returned in the data.
if(!uart_is_enabled(uart)) return 3;
if(!uart_is_readable(uart)) return 2;
Expected behavior
Actual behavior
The result is as follows: the connection failed with a 1/2 ratio.
--
data: 2
---
data: 2
---
data: 40
---
data: 45
---
data: 2
---
data: 2
---
2 : failed // 40,45 : lidar dist value
Upon further consideration, I realized that the Pico supports two UART communications. Given that micro-ROS communicates over UART, there might be a correlation. Could this be related to the issue? Thanks for reading :)