# No option for dual TOF sensor on voxl2

Source: https://forum.modalai.com/topic/1736/no-option-for-dual-tof-sensor-on-voxl2
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2023-01-24 11:08:24 UTC by Tamas Pal 0
Replies: 8 · Views: 1612

## Tamas Pal 0 · 2023-01-24 11:08:24 UTC

I am trying to run dual TOF with tracking and hires cam on voxl2. I am currently using voxl-camera-server version -1.3.7-202301202318. There is no option for that -
```
0  None
1  Tracking + Stereo(OV7251)
2  Tracking Only
3  Hires + Stereo(OV7251) + Tracking
4  Hires + Tracking
5  TOF + Tracking
6  Hires + TOF + Tracking
7  TOF + Stereo(OV7251) + Tracking
8  Hires Only
9  TOF Only
10 Stereo(OV7251) only
11 Tracking + Hires + Dual Stereo(OV7251) Pairs
12 Stereo(OV9782) only
13 Hires + Stereo(OV7251)
14 Stereo(OV9782) + TOF + Tracking
```
How to get dual TOF running with hires and tracking cam? Please help

## Reply by modaltb (ModalAI staff) · 2023-01-25 03:21:38 UTC

Hi @Tamas-Pal-0 ,

I think we have a util that can be used as a work around....

Are all 4 image sensors showing up when you run `voxl-camera-server -l` ?

If so, then use those IDs and try running this helper which can get the config file setup:

```camera-server-config-helper vio0:ov7251:0 fpv:imx214:1 tof_front:pmd-tof:2 tof_rear:pmd-tof:3```

Note, the last values there are the IDs from your setup and might be different.

Let me know if this works, I only have a single ToF with me to test so I'm not positive!

## Reply by Tamas Pal 0 · 2023-01-25 09:21:25 UTC (in reply to modaltb)

@modaltb It's working !!! Thanks. 
By the way when will we get the update for voxl-camera-server for this ?

## Reply by Tamas Pal 0 · 2023-02-01 12:18:04 UTC (in reply to modaltb)

@modaltb I am able to get the sensor data, but unable to use it in qgc side. What should be topic name for TOF sesnsors to get front and rear object distance data on qgc side like front and rear stereo pairs?

## Reply by modaltb (ModalAI staff) · 2023-02-13 16:57:52 UTC

Hi @Tamas-Pal-0 ,

I'm not totally sure, we normally use voxl-portal for this [like here](https://docs.modalai.com/voxl-tof-sensor-user-guide/#viewing-the-data-with-voxl-portal).

## Reply by msberk · 2023-03-06 17:26:08 UTC

Hey there - I am facing a similar issue where I would like to use 3 or 4 ToF sensors to provide nearly complete vision around the drone. Is there a limit to only having 2 ToF sensors at the same time? When I try to run 3 ToFs then I get preview errors upon start of `voxl-camera-server` and it crashes. On `1.4.1-M0054-14.1a-perf`

I am trying to use the cameras in this ordering:
HW0: ToF
HW1: ToF
HW2: Tracking
HW3: HiRes
HW4: ToF

But when I do that I get an error on either the ToF or the Tracking (depending on the order I arrange them in `voxl-camera-server.conf` about not being able to find the correct preview upon starting the camera server. See configuration below:
```
{
        "version":      0.1,
        "cameras":      [{
                        "name": "tof_backright",
                        "enabled":      true,
                        "frame_rate":   5,
                        "type": "pmd-tof",
                        "camera_id":    0
                }, {
                        "name": "tof_backleft",
                        "enabled":      true,
                        "frame_rate":   5,
                        "type": "pmd-tof",
                        "camera_id":    1
                }, {
                        "name": "tracking",
                        "enabled":      true,
                        "frame_rate":   30,
                        "type": "ov7251",
                        "camera_id":    2,
                        "ae_desired_msv":       60,
                        "ae_filter_alpha":      0.600000023841858,
                        "ae_ignore_fraction":   0.20000000298023224,
                        "ae_slope":     0.05000000074505806,
                        "ae_exposure_period":   1,
                        "ae_gain_period":       1
                }, {
                        "name": "hires",
                        "enabled":      true,
                        "frame_rate":   30,
                        "type": "imx214",
                        "camera_id":    3,
                        "preview_width":        640,
                        "preview_height":       480,
                        "snapshot_width":       3840,
                        "snapshot_height":      2160
                }, {
                        "name": "tof_front",
                        "enabled":      true,
                        "frame_rate":   5,
                        "type": "pmd-tof",
                        "camera_id":    4
                }, ]
}
```

## Reply by modaltb (ModalAI staff) · 2023-03-07 17:15:51 UTC

At this point only two have been proven to work at a single time, see tested configurations here, https://docs.modalai.com/voxl2-camera-configs/#available-configurations

We do want to have more than 2 going but there's some effort involved and I don't have a timeline at this point, but it's something we do want to do.

## Reply by afdrus · 2023-04-05 11:20:19 UTC

Is it possible to use 2 tofs + stereo + tracking + hires?

## Reply by afdrus · 2023-04-05 14:05:21 UTC

Because on my voxl2 it seems that neither this configuration nor the 2TOF2 configuration is possible...
![Screenshot from 2023-04-05 16-02-47.png](https://forum.modalai.com/assets/uploads/files/1680703429182-screenshot-from-2023-04-05-16-02-47.png)
