# Getting Range finder information in ROS and more.

Source: https://forum.modalai.com/topic/4602/getting-range-finder-information-in-ros-and-more
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Tags: ros
Posted: 2025-07-17 07:19:20 UTC by Judoor 0
Replies: 5 · Views: 3562

## Judoor 0 · 2025-07-17 07:19:20 UTC

Hi,
I'd like to get the range finder data in ROS, right now it doesn't appear in mpa_to_ros, what should I change for it to appear?
I cannot get it from MAVROS either, the distance_sensor doesn't appear in my topics. But it appears on GQC and i've got the right value.
Is it cause I set it up wrong in voxl-px4.conf (right now the value is NONE).
Also, how can i get an idea of when the VIO / OV start to fail so I can activate a failsafe in my ROS Node?  

Setup : Starling 2 max, dual cam, with TOF

Have a good day 
Julien

## Reply by Judoor 0 · 2025-07-17 14:15:53 UTC

@Judoor-0 For the rangefinder part i've looked into the mpa_to_ros code and modified it to add rangefinder_data_t and republished it in a ros_topic. 

But for the covariance/error of the vio I still have no clue how to get it

Julien

## Reply by Judoor 0 · 2025-07-21 07:34:24 UTC (in reply to Judoor 0)

@Alex-Kushleyev I don't know who can help me on this one, I tried to modify the mpa_to_ros package and I think I did it successfully (adding range-sensor and some vins status). How can I share it, so someone from your team can verify it and then if it's good enough put it on the gitlab ?
Julien

## Reply by teddy.zaremba · 2025-07-21 21:42:19 UTC (in reply to Judoor 0)

Hi @Judoor-0,

Interesting I'm assuming you're looking at the rangefinders pipe. I can take a look at your code, or you can make a MR back into mpa-to-ros2. 

Also, something to consider is using microdds and subscribing to the "fmu/in/obstacle_distance" topic.

## Reply by Judoor 0 · 2025-07-22 07:21:33 UTC (in reply to teddy.zaremba)

@teddy-zaremba Hi teddy,
I'm on ROS 1 so it's just MPA_TO_ROS and not MPA_TO_ROS2.
Yes I looked at the rangefinder pipes and did get the rangefinder data and republished_it in ROS and same with the ov_status.
I don't have access to microdds in ROS1 unless I do a ROS2 to ROS1 bridge.
Julien

## Reply by teddy.zaremba · 2025-07-22 15:08:01 UTC (in reply to Judoor 0)

Hi @Judoor-0,

Cool! Feel free to make a MR or post the link to your code if you want someone to review it.
