# Dual tracking camera configuration in SDK 1.0

Source: https://forum.modalai.com/topic/2691/dual-tracking-camera-configuration-in-sdk-1-0
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2023-09-26 08:02:39 UTC by Anubhav
Replies: 3 · Views: 1118

## Anubhav · 2023-09-26 08:02:39 UTC

Hello Team, 
I am trying to configure dual tracking camera, hires and TOF in vox2 ( new SDK 1.0 ). 
I have connected both ov7251 tracking cameras on J7 port with the help of M-0084 y-connector. Hires Imx214 in J8 and tof on j6 port. (image is also inserted to show the hardware setup)

![20230926_130630 (1) (3).jpg](https://forum.modalai.com/assets/uploads/files/1695715143703-20230926_130630-1-3-resized.jpg)

Below is the output while running the camera server. Can you tell me where I am going wrong and how can I resolve the problem. 

```
voxl-camera-server -d 0
=================================================================
configuration for 4 cameras:

cam #0
    name:                tof
    sensor type:         pmd-tof
    isEnabled:           1
    camId:               0
    camId2:              -1
    fps:                 5

    en_preview:          1
    pre_width:           224
    pre_height:          1557
    pre_format:          tof

    en_small_video:      0
    small_video_width:   -1
    small_video_height:  -1

    en_large_video:      0
    large_video_width:   -1
    large_video_height:  -1

    en_snapshot:         0
    snap_width:          -1
    snap_height:         -1

    ae_mode:             off
    standby_enabled:     0
    decimator:           5
    independent_exposure:0

cam #1
    name:                tracking
    sensor type:         ov7251
    isEnabled:           1
    camId:               2
    camId2:              -1
    fps:                 30

    en_preview:          1
    pre_width:           640
    pre_height:          480
    pre_format:          raw8

    en_small_video:      0
    small_video_width:   -1
    small_video_height:  -1

    en_large_video:      0
    large_video_width:   -1
    large_video_height:  -1

    en_snapshot:         0
    snap_width:          -1
    snap_height:         -1

    ae_mode:             lme_msv
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

cam #2
    name:                tracking2
    sensor type:         ov7251
    isEnabled:           1
    camId:               3
    camId2:              -1
    fps:                 30

    en_preview:          1
    pre_width:           640
    pre_height:          480
    pre_format:          raw8

    en_small_video:      0
    small_video_width:   -1
    small_video_height:  -1

    en_large_video:      0
    large_video_width:   -1
    large_video_height:  -1

    en_snapshot:         0
    snap_width:          -1
    snap_height:         -1

    ae_mode:             lme_msv
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

cam #3
    name:                hires
    sensor type:         imx214
    isEnabled:           1
    camId:               4
    camId2:              -1
    fps:                 30

    en_preview:          0
    pre_width:           640
    pre_height:          480
    pre_format:          nv21

    en_small_video:      1
    small_video_width:   1024
    small_video_height:  768

    en_large_video:      1
    large_video_width:   4096
    large_video_height:  2160

    en_snapshot:         1
    snap_width:          4160
    snap_height:         3120

    ae_mode:             isp
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

=================================================================
DEBUG:   ------ voxl-camera-server: Starting 4 cameras
Starting Camera: tof
DEBUG:   Attempting to open the hal module
DEBUG:   SUCCESS: Camera module opened on attempt 0
DEBUG:   ----------- Number of cameras: 1

DEBUG:   Cam idx: 0, Cam slot: 0, Slave Address: 0x007A, Sensor Id: 0x003D
VERBOSE: Successfully found configuration match for camera 0: 224x1557
VERBOSE: Adding preview stream for camera: 0
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   ALIGNING HEIGHT FOR LARGE IMAGE
DEBUG:   Allocating img Buffer: width:  224 stride:  224 height: 1557 slice: 2048 size:  688128
DEBUG:   Successfully set up pipeline for stream: PREVIEW
DEBUG:   Started Camera: tof
Starting Camera: tracking
VERBOSE: Entered thread: cam0-request(tid: 2469)
VERBOSE: Entered thread: cam0-result(tid: 2470)

Segmentation fault:
Fault thread: voxl-camera-ser(tid: 2448)
Fault address: 0x564fc726cc
Address not mapped.
VERBOSE: Found Royale module config: imagerType 2, illuminationConfig.dutyCycle: 4 temp_sensor_type: 5
VERBOSE: Found Royale module config: maxImgW 224 maxImgH 172 frameTxMode 1 camName X1.1_850nm_2W
VERBOSE: Found Royale module config: tempLimitSoft 60.000000 tempLimitHard 65.000000 autoExpoSupported yes
VERBOSE: Found Royale usecase: MODE_9_5FPS - phases: 9 fps: 5
VERBOSE: Found Royale usecase: MODE_9_5FPS - exposure group[0] = gray
VERBOSE: Found Royale usecase: MODE_9_5FPS - exposure group[1] = mod1

```
Thanks!
Anubhav

## Reply by Moderator (ModalAI staff) · 2023-09-26 16:39:01 UTC

@Anubhav you need to be working with one of the supported configurations found here: https://docs.modalai.com/voxl2-camera-configs/#image-sensor-configurations---sdk-10

It is not plug and play

## Reply by Anubhav · 2023-09-27 07:32:17 UTC (in reply to Moderator)

@Moderator 
I have followed the link given by you, but it is very hard to understand the document you have mentioned. Under topic ``` 1.6.2 SUPPORTED SENSOR HARDWARE IDS ```
1. There is no where mentioned that a tracking camera is supported in JU of M0084  attached to J7 port, however the picture shows in c-16 configuration that tracking is attached to JU of M0084.
2. Also it's mentioned that hardware id 4 and 5 (port J8) doesn't support tracking. but the picture shows tracking is attached to J8 port with M0076 flex cable. 

I have tried c-16 configuration by following the configuration setup given in the image in the document. My setup is shown below in the table and image attached: 

![Screenshot from 2023-09-27 12-52-13.png](https://forum.modalai.com/assets/uploads/files/1695799383479-screenshot-from-2023-09-27-12-52-13.png) 

![20230927_124615 (1).jpg](https://forum.modalai.com/assets/uploads/files/1695799238656-20230927_124615-1-resized.jpg) 

Output from the camera-server is as follows: Tof, hires, and tracking didn't gave any problem but the camera server crashed due to tracking2.  
```
voxl2:/$ voxl-camera-server 
existing instance of voxl-camera-server found, attempting to stop it
=================================================================
configuration for 4 cameras:

cam #0
    name:                tof
    sensor type:         pmd-tof
    isEnabled:           1
    camId:               0
    camId2:              -1
    fps:                 5

    en_preview:          1
    pre_width:           224
    pre_height:          1557
    pre_format:          tof

    en_small_video:      0
    small_video_width:   -1
    small_video_height:  -1

    en_large_video:      0
    large_video_width:   -1
    large_video_height:  -1

    en_snapshot:         0
    snap_width:          -1
    snap_height:         -1

    ae_mode:             off
    standby_enabled:     0
    decimator:           5
    independent_exposure:0

cam #1
    name:                hires
    sensor type:         imx214
    isEnabled:           1
    camId:               1
    camId2:              -1
    fps:                 30

    en_preview:          0
    pre_width:           640
    pre_height:          480
    pre_format:          nv21

    en_small_video:      1
    small_video_width:   1024
    small_video_height:  768

    en_large_video:      1
    large_video_width:   4096
    large_video_height:  2160

    en_snapshot:         1
    snap_width:          4160
    snap_height:         3120

    ae_mode:             isp
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

cam #2
    name:                tracking
    sensor type:         ov7251
    isEnabled:           1
    camId:               2
    camId2:              -1
    fps:                 30

    en_preview:          1
    pre_width:           640
    pre_height:          480
    pre_format:          raw8

    en_small_video:      0
    small_video_width:   -1
    small_video_height:  -1

    en_large_video:      0
    large_video_width:   -1
    large_video_height:  -1

    en_snapshot:         0
    snap_width:          -1
    snap_height:         -1

    ae_mode:             lme_msv
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

cam #3
    name:                tracking2
    sensor type:         ov7251
    isEnabled:           1
    camId:               3
    camId2:              -1
    fps:                 30

    en_preview:          1
    pre_width:           640
    pre_height:          480
    pre_format:          raw8

    en_small_video:      0
    small_video_width:   -1
    small_video_height:  -1

    en_large_video:      0
    large_video_width:   -1
    large_video_height:  -1

    en_snapshot:         0
    snap_width:          -1
    snap_height:         -1

    ae_mode:             lme_msv
    standby_enabled:     0
    decimator:           1
    independent_exposure:0

=================================================================
Starting Camera: tof
Starting Camera: hires
WARNING: Port Def 0:
	Count Min: 8
	Count Actual: 16
	Size: 0x180000
	Buffers Contiguous: Yes
	Buffer Alignment: 0
WARNING: Port Def 1:
	Count Min: 4
	Count Actual: 16
	Size: 0x5a0000
	Buffers Contiguous: No
	Buffer Alignment: 0
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
WARNING: Port Def 0:
	Count Min: 8
	Count Actual: 16
	Size: 0xf00000
	Buffers Contiguous: Yes
	Buffer Alignment: 0
WARNING: Port Def 1:
	Count Min: 4
	Count Actual: 16
	Size: 0x7f8000
	Buffers Contiguous: No
	Buffer Alignment: 0
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
gbm_create_device(156): Info: backend name is: msm_drm
Starting Camera: tracking
Starting Camera: tracking2

Segmentation fault:
Fault thread: voxl-camera-ser(tid: 2411)
Segmentation fault
```

## Reply by Viswanadh Chegu · 2023-10-06 05:57:07 UTC (in reply to Anubhav)

Hi @Moderator, @modaltb 

Any update on the configuration of tracking camera in HW Sensor ID- 3. Camera Server crashes whenever i connect tracking camera in HW sensor ID-3 (J7U) but in the camera server configuration, SDK 1.0 (C-06, C-14 , C-16, C-17 ) configurations shows that the tracking camera is connected to J7U. 
Can you please give me update on this?
