Unable to get accurate depth and camera_info from TOF on Starling 2 Max
-
Hi,
I’m using the Starling 2 Max with VOXL 2 and I’m trying to access depth information from the onboard TOF sensor.I am subscribing to /tof_depth, which publishes sensor_msgs/Image in mono8 format. However:
I don’t know how to convert the 8-bit gray value to actual depth in meters. Is there a LUT or scale factor available for this sensor?
The topic /tof_depth/camera_info returns zero intrinsics (all zeros in the K matrix), so I cannot project the depth image into a point cloud.
I couldn’t find any calibration or intrinsics related to the TOF sensor in /etc/modalai .
Could you please advise how to:
Obtain the proper depth scale or conversion formula from mono8
Get or generate accurate camera_info for the TOF sensor
Thanks in advance!
-
Hi,
I’m using the Starling 2 Max with VOXL 2 and I’m trying to access depth information from the onboard TOF sensor.I am subscribing to /tof_depth, which publishes sensor_msgs/Image in mono8 format. However:
I don’t know how to convert the 8-bit gray value to actual depth in meters. Is there a LUT or scale factor available for this sensor?
The topic /tof_depth/camera_info returns zero intrinsics (all zeros in the K matrix), so I cannot project the depth image into a point cloud.
I couldn’t find any calibration or intrinsics related to the TOF sensor in /etc/modalai .
Could you please advise how to:
Obtain the proper depth scale or conversion formula from mono8
Get or generate accurate camera_info for the TOF sensor
Thanks in advance!
@Jing-Yu , the tof_depth image is a 8-bit image where each pixel represents a scaled depth. this may not be the best way to use the output of TOF sensor.
You can subscribe to the point cloud directly.
Here is the code that handles the output of the TOF sensor and publishes it to MPA clients. This shows how the different images are generated, including how the TOF depth is scaled to produce an image : https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/blob/dev/src/hal3_camera_mgr.cpp?ref_type=heads#L3214 (
RoyaleDataDonefunction).Here is an example for receiving the TOF point cloud using an MPA client. it is very basic, but you can update it. The data that is sent out is an array of XYZ float points : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/blob/master/tools/voxl-inspect-points.c?ref_type=heads
and finally here is another example in voxl
mpa-to-roslibrary, which handles conversion from the MPA messages to ROS. It has a few point cloud formats, but the one you need is the XYZ : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros/-/blob/master/catkin_ws/src/src/interfaces/point_cloud_interface.cpp?ref_type=headsAlex
-
@Jing-Yu , the tof_depth image is a 8-bit image where each pixel represents a scaled depth. this may not be the best way to use the output of TOF sensor.
You can subscribe to the point cloud directly.
Here is the code that handles the output of the TOF sensor and publishes it to MPA clients. This shows how the different images are generated, including how the TOF depth is scaled to produce an image : https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/blob/dev/src/hal3_camera_mgr.cpp?ref_type=heads#L3214 (
RoyaleDataDonefunction).Here is an example for receiving the TOF point cloud using an MPA client. it is very basic, but you can update it. The data that is sent out is an array of XYZ float points : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/blob/master/tools/voxl-inspect-points.c?ref_type=heads
and finally here is another example in voxl
mpa-to-roslibrary, which handles conversion from the MPA messages to ROS. It has a few point cloud formats, but the one you need is the XYZ : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros/-/blob/master/catkin_ws/src/src/interfaces/point_cloud_interface.cpp?ref_type=headsAlex
Thanks for the explanation — I now understand how to use the TOF sensor.
I’ll use the ROS point cloud directly for my research.
Reading along? Create a free ModalAI Forum account to join in.
With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.
Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.
Register Login