micro_ros_raspberrypi_pico_sdk icon indicating copy to clipboard operation
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.

Open DaCa123444 opened this issue 1 year ago • 0 comments

Issue template

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 :)

DaCa123444 avatar Apr 16 '24 03:04 DaCa123444