I am currently testing a drone with a rangefinder installed on board (Teraranger 60m EVO). I want to filter out data that is out of range (> 60m). I could do this by modifying the PX4 autopilot firmware (as I believe is done in this case), but I would prefer to do it by filtering the data in software.
I know that I can get the incoming data from the rangefinder at the topic
fmu/distance_sensor/out. I can then filter this data and send it back to the autopilot with the ROS2 topic
fmu/distance_sensor/in. Would this be possible?
My other question is, will this create a duplicate reading of the distance sensor at the autopilot?
Thank you in advance for your help.