Rplidar and obstacle avoidance issue, mavlink alternative?

Hello, this is a bit simple. I have tested obstacle avoidance using an A3 rplidar andhave found that the pixhawk is getting all the bad readings of the LiDAR.

I want to know if using bendy ruler , it can accept data from mavlink instead of the lidar or if anyone has tried using your own custom obstacle message to send information to the obstacle detection on rover 4.0.