Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. ToF sensor

ToF sensor

Scheduled Pinned Locked Moved Ask your questions right here!
rostof
29 Posts 4 Posters 7.5k Views 6 Watching
  • 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.
  • Chad SweetC Offline
    Chad SweetC Offline
    Chad Sweet
    ModalAI Team
    wrote on last edited by
    #15

    OK, good the tracking sensor is working. Sorry about this, the tof setup is still in beta. We clearly need to document the setup way better.

    Can you please print which version of system image you are using (voxl-version)? The error implies an older system image which does not support that hal3_tof_cam_ros.

    ERROR: Libcamera sending post-processed TOF data. App does NOT get RAW16 TOF camera data

    The error above implies an older version of libcamera which would use tof_cam_ros instead

    Just FYI, the TOF_CAM_ID needs to match what is in the launch file. This message shows what is in the launch file:
    /tof/voxl_hal3_tof_cam_ros_node/camera_id: 0

    G 1 Reply Last reply
    0
    • Chad SweetC Chad Sweet

      OK, good the tracking sensor is working. Sorry about this, the tof setup is still in beta. We clearly need to document the setup way better.

      Can you please print which version of system image you are using (voxl-version)? The error implies an older system image which does not support that hal3_tof_cam_ros.

      ERROR: Libcamera sending post-processed TOF data. App does NOT get RAW16 TOF camera data

      The error above implies an older version of libcamera which would use tof_cam_ros instead

      Just FYI, the TOF_CAM_ID needs to match what is in the launch file. This message shows what is in the launch file:
      /tof/voxl_hal3_tof_cam_ros_node/camera_id: 0

      G Offline
      G Offline
      gauravshukla914
      Regular
      wrote on last edited by
      #16

      @Chad-Sweet

      --------------------------------------------------------------------------------
      system-image:    ModalAI 3.1.0 BUILDER: ekatzfey BUILD_TIME: 2020-12-23_19:41
      kernel:          #1 SMP PREEMPT Wed Dec 23 19:50:23 UTC 2020 3.18.71-perf
      factory-bundle:  1.0.1 (Yocto installation)
      --------------------------------------------------------------------------------
      architecture:    aarch64
      processor:       apq8096
      os:              GNU/Linux
      --------------------------------------------------------------------------------
      voxl-suite:
      Package: voxl-suite
      Version: 0.2.0
      Depends: docker, imu_app (= 0.0.6), libvoxl_io (= 0.5.2), voxl-cam-manager (= 0.2.2), voxl-docker-support (= 1.1.1), voxl-hal3-tof-cam-ros (= 0.0.2), voxl-modem (= 0.10.0), voxl-nodes (= 0.0.8), voxl-rtsp (= 1.0.2), voxl-utils (= 0.5.2), voxl-vision-px4 (= 0.6.8), voxl_imu (= 0.0.4), voxl-time-sync (= 0.0.1), voxl-vpn (= 0.0.2), librc_math (= 1.1.2), libmodal_pipe (= 1.2.2), modalai-vl (= 0.1.3)
      Status: install user installed
      Section: base
      Architecture: armv7a
      Maintainer: james@modalai.com
      MD5Sum: af706cd3c1ea59f274f2ed9b93141f1d
      Size: 870
      Filename: voxl-suite_0.2.0.ipk
      Description: meta-package to install all of the voxl-suite
      Installed-Time: 3126
      
      --------------------------------------------------------------------------------
      

      according to git repository launch file is taking tof cam id from environment variable and we select option 5 from voxl-configure-camera which sets accordingly

      1 Reply Last reply
      0
      • Chad SweetC Offline
        Chad SweetC Offline
        Chad Sweet
        ModalAI Team
        wrote on last edited by Chad Sweet
        #17

        that all looks good. Will investigate further

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gauravshukla914
          Regular
          wrote on last edited by
          #18

          Okay. Looking forward to your solution asap!

          1 Reply Last reply
          0
          • Chad SweetC Offline
            Chad SweetC Offline
            Chad Sweet
            ModalAI Team
            wrote on last edited by
            #19

            Can you please type and report the output?
            opkg list-installed | grep royal

            G 1 Reply Last reply
            0
            • Chad SweetC Offline
              Chad SweetC Offline
              Chad Sweet
              ModalAI Team
              wrote on last edited by
              #20

              Assuming the ipk is installed, can you please then run this command and then try the ROS node again?

              setprop persist.camera.modalai.tof 1

              G 1 Reply Last reply
              1
              • Chad SweetC Chad Sweet

                Can you please type and report the output?
                opkg list-installed | grep royal

                G Offline
                G Offline
                gauravshukla914
                Regular
                wrote on last edited by
                #21

                @Chad-Sweet
                this is the version of royal sdk installed
                royale-331-spectre-4-7 - 0.0.1

                1 Reply Last reply
                0
                • Chad SweetC Chad Sweet

                  Assuming the ipk is installed, can you please then run this command and then try the ROS node again?

                  setprop persist.camera.modalai.tof 1

                  G Offline
                  G Offline
                  gauravshukla914
                  Regular
                  wrote on last edited by
                  #22

                  @Chad-Sweet
                  Thanks for the solution it worked!
                  but after a minute or so it started throwing error

                  DEPTH_IMAGE
                  	IR: 1 ..... Cloud: 1 ..... Laser: 1
                  Camera id: 0
                  Image width: 224
                  Image height: 1557
                  Number of frames to dump: 0
                  Camera mode: preview
                  SUCCESS: Camera module opened
                  Camera Id: 0 Facing: 1
                  Camera Id: 1 Facing: 1
                  SUCCESS: TOF interface created!
                  =========== modalai  Royale3.31, Spectre4.7 CameraDevice::activateUseCase() : return SUCCESS!!
                  =========== modalai  Royale3.31, Spectre4.7 CameraDevice::activateUseCase() : return SUCCESS!!
                  Libcamera sending RAW16 TOF data. App calling the PMD libs to postprocess the RAW16 data
                  [ INFO] [1610561725.908936828]: Loading lens parameters from /data/misc/camera/irs10x0c_lens.cal.
                  [ INFO] [1610561725.913180926]: 
                  cx/cy     114.822 89.022
                  fx/fy     111.394 111.394
                  tan coeff -0.00222965 -0.00368372
                  rad coeff -0.261745 0.098178 -0.0166875
                  
                  
                  
                  
                  
                  Camera HAL3 ToF camera test is now running
                  Frame: 0 SensorTimestamp = 	 213139865341
                  Frame: 30 SensorTimestamp = 	 214139747341
                  Frame: 60 SensorTimestamp = 	 215139847341
                  Frame: 90 SensorTimestamp = 	 216139794341
                  Frame: 120 SensorTimestamp = 	 217139814341
                  Frame: 150 SensorTimestamp = 	 218139859341
                  Frame: 180 SensorTimestamp = 	 219139889341
                  Frame: 210 SensorTimestamp = 	 220139917341
                  Frame: 240 SensorTimestamp = 	 221139905341
                  Frame: 270 SensorTimestamp = 	 222139941341
                  Frame: 300 SensorTimestamp = 	 223139931341
                  Frame: 330 SensorTimestamp = 	 224139999341
                  .
                  .
                  .
                  .
                  .
                  Frame: 2430 SensorTimestamp = 	 294139985341
                  HELLOCAMERA-ERROR: Error sending request 2449
                  HELLOCAMERA-ERROR: Framenumber: 2446 ErrorCode: 4
                  HELLOCAMERA-ERROR: Framenumber: 2447 ErrorCode: 2
                  HELLOCAMERA-ERROR: Framenumber: 2448 ErrorCode: 2
                  HELLOCAMERA-ERROR: Framenumber: 2449 ErrorCode: 2
                  HELLOCAMERA-ERROR: Framenumber: 0 ErrorCode: 1
                  HELLOCAMERA-ERROR: Error sending request 2450
                  HELLOCAMERA-ERROR: Error sending request 2451
                  HELLOCAMERA-ERROR: Error sending request 2452
                  HELLOCAMERA-ERROR: Error sending request 2453
                  HELLOCAMERA-ERROR: Error sending request 2454
                  ^C[tof/voxl_hal3_tof_cam_ros_node-4] killing on exit
                  [base_link_laser_scan-3] killing on exit
                  [base_link_tof_cam-2] killing on exit
                  HELLOCAMERA-ERROR: Error sending request 2455
                  [tof/voxl_hal3_tof_cam_ros_node-4] escalating to SIGTERM
                  [rosout-1] killing on exit
                  [master] killing on exit
                  shutting down processing monitor...
                  ... shutting down processing monitor complete
                  done
                  
                  1 Reply Last reply
                  0
                  • Chad SweetC Offline
                    Chad SweetC Offline
                    Chad Sweet
                    ModalAI Team
                    wrote on last edited by
                    #23

                    OK, good progress. That should be working. Can you give it a full power cycle and see if it says up?

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      gauravshukla914
                      Regular
                      wrote on last edited by
                      #24

                      I am not sure if I understood that. Can you please elaborate.

                      1 Reply Last reply
                      0
                      • Chad SweetC Offline
                        Chad SweetC Offline
                        Chad Sweet
                        ModalAI Team
                        wrote on last edited by
                        #25

                        Unplug power from the VOXL and plug it back in. Then try the test over. You look like you're in a working state.

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          gauravshukla914
                          Regular
                          wrote on last edited by
                          #26

                          can you please explain this setprop persist.camera.modalai.tof 1

                          1 Reply Last reply
                          0
                          • Chad SweetC Offline
                            Chad SweetC Offline
                            Chad Sweet
                            ModalAI Team
                            wrote on last edited by
                            #27

                            It is the way for software to tell which TOF driver should be used. Setting to 1 supports the HAL3 method you are using, setting to 0 supports the older libCamera method using tof_cam_ros

                            The HAL3 method is intended to give the developer more control over the pipeline

                            G 1 Reply Last reply
                            1
                            • Chad SweetC Chad Sweet

                              It is the way for software to tell which TOF driver should be used. Setting to 1 supports the HAL3 method you are using, setting to 0 supports the older libCamera method using tof_cam_ros

                              The HAL3 method is intended to give the developer more control over the pipeline

                              G Offline
                              G Offline
                              gauravshukla914
                              Regular
                              wrote on last edited by
                              #28

                              @Chad-Sweet
                              Thanks a lot its been a great help.

                              1 Reply Last reply
                              0
                              • modaltbM Offline
                                modaltbM Offline
                                modaltb
                                ModalAI Team
                                wrote on last edited by modaltb
                                #29

                                Hi @gauravshukla914 ,

                                Thanks for the help with this. We've released a new beta version of the voxl-hal3-tof-cam-ros that supports auto detection of ToF and defaults the persist.camera.modalai.tof setting properly.

                                It will be in out next voxl-suite release, but is available from our dev channel here if you are interested in using this link

                                The updated readme is here.

                                Thanks!

                                1 Reply Last reply
                                1

                                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                With your input, this post could be even better 💗

                                Register Login
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                ModalAI
                                Categories Recent Tags ModalAI.com Docs
                                © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups