ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Unable to get accurate depth and camera_info from TOF on Starling 2 Max

    Ask your questions right here!
    2
    2
    47
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jing YuJ
      Jing Yu
      last edited by

      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!

      Alex KushleyevA 1 Reply Last reply Reply Quote 0
      • Alex KushleyevA
        Alex Kushleyev ModalAI Team @Jing Yu
        last edited by Alex Kushleyev

        @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 ( RoyaleDataDone function).

        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-ros library, 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=heads

        Alex

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB | Contributors