Compatible ToF sensor setup with VOXL2 Mini
-
Additional debugging:
Moreover, we test some other configurations:
- J7 <-> M0135 (JL) <-> M0014
- J6 <-> M0172 (J1L) <-> M0170 <-> tof
We copied the files:
com.qti.sensormodule.ov7251_*.binandcom.qti.sensormodule.irs2975c_*.bininto the folder:/usr/lib/camera
We used the command:camera-server-config-helper tracking:ov7251:0 tof:pmd-tof:2giving the following output:successfully wrote this camera config to disk: ================================================================= configuration for 2 cameras: cam #0 name: tracking sensor type: ov7251 isEnabled: 1 camId: 0 camId2: -1 fps: 30 en_rotate: 0 en_rotate2: 0 en_preview: 1 pre_width: 640 pre_height: 480 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: lme_msv msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 1 independent_exposure:0 cam #1 name: tof sensor type: pmd-tof isEnabled: 1 camId: 2 camId2: -1 fps: 5 en_rotate: 1 en_rotate2: 0 en_preview: 1 pre_width: 224 pre_height: 1557 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: off msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 5 independent_exposure:0 fsync_en: 0 fsync_gpio: 109 ================================================================= camera_server_config_helper is doneThen we run
voxl-camera-servergiving the following output:existing instance of voxl-camera-server found, attempting to stop it ================================================================= configuration for 2 cameras: cam #0 name: tracking sensor type: ov7251 isEnabled: 1 camId: 0 camId2: -1 fps: 30 en_rotate: 0 en_rotate2: 0 en_preview: 1 pre_width: 640 pre_height: 480 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: lme_msv msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 1 independent_exposure:0 cam #1 name: tof sensor type: pmd-tof isEnabled: 1 camId: 2 camId2: -1 fps: 5 en_rotate: 1 en_rotate2: 0 en_preview: 1 pre_width: 224 pre_height: 1557 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: off msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 5 independent_exposure:0 fsync_en: 0 fsync_gpio: 109 ================================================================= thread is locked to cores: 4 5 6 7 connected to mavlink pipe Connected to cpu-monitor Starting Camera: tracking (id #0) gbm_create_device(156): Info: backend name is: msm_drm setting ov7251 BLC register for cam id 0 Starting Camera: tof (id #2) WARNING: cam tof (id 2) does not seem to be alive ------ voxl-camera-server: Started 1 of 2 cameras ------ voxl-camera-server: Camera server is now runningAnd running
voxl-inspect-cam -astill gives the following output:| Pipe Name | bytes | wide | hgt |exp(ms)| gain | frame id |latency(ms)| fps | mbps | format | tracking | 307200 | 640 | 480 | 2.28 | 51 | 294 | 11.5 | 30.0 | 73.7 | RAW8To be sure that all the parts were working, we tested two M0172 and 2 ToF sensors, which were actually working on VOXL 2. We also swapped the tracking camera and the ToF sensor (J6 <-> J7), copying the
.binfiles according to and adjusting the ID numbers. -
@Morten-Nissov , please only put one sensormodule with the correct slot number in
/usr/lib/camera. This will help eliminate any confusion.Also, does
voxl-camera-server -lactually detect your TOF module?It seems your camera id is actually incorrect. It should be 1. The slot id is 2 (which is tied to the hardware), but the software camera Id is assigned as the cameras are probed in each slot.
voxl-camera-server -lwill tell you (at the top) which cameras have been detected, which slot and camera ids.Alex
-
@Alex-Kushleyev Thanks for getting back to us so quickly.
We removed all the
com.qti.sensormodule.ov7251_*.binand thecom.qti.sensormodule.irs2975c_*.binfiles.
Then we ran, as you suggested, the command:voxl-camera-server -l. The output was:existing instance of voxl-camera-server found, attempting to stop it DEBUG: Attempting to open the hal module DEBUG: SUCCESS: Camera module opened on attempt 0 DEBUG: ----------- Number of cameras: 2 DEBUG: Cam idx: 0, Cam slot: 0, Slave Address: 0x00E2, Sensor Id: 0x7750 DEBUG: Cam idx: 1, Cam slot: 2, Slave Address: 0x007A, Sensor Id: 0x2975 DEBUG: Note: This list comes from the HAL module and may not be indicative DEBUG: of configurations that have full pipelines DEBUG: Number of cameras: 2 ==================================== Stats for camera: 0 ANDROID_SCALER_AVAILABLE_RAW_SIZES: These are likely supported by the sensor 640 x 480 640 x 480 640 x 480 ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS: These are NOT necessarily supported by the sensor 640 x 480 HAL_PIXEL_FORMAT_YCbCr_420_888 640 x 480 HAL_PIXEL_FORMAT_BLOB 640 x 400 HAL_PIXEL_FORMAT_YCbCr_420_888 640 x 400 HAL_PIXEL_FORMAT_BLOB 640 x 360 HAL_PIXEL_FORMAT_YCbCr_420_888 640 x 360 HAL_PIXEL_FORMAT_BLOB 352 x 288 HAL_PIXEL_FORMAT_YCbCr_420_888 352 x 288 HAL_PIXEL_FORMAT_BLOB 320 x 240 HAL_PIXEL_FORMAT_YCbCr_420_888 320 x 240 HAL_PIXEL_FORMAT_BLOB 240 x 320 HAL_PIXEL_FORMAT_YCbCr_420_888 240 x 320 HAL_PIXEL_FORMAT_BLOB 176 x 144 HAL_PIXEL_FORMAT_YCbCr_420_888 176 x 144 HAL_PIXEL_FORMAT_BLOB 640 x 480 HAL_PIXEL_FORMAT_RAW10 640 x 480 HAL_PIXEL_FORMAT_RAW12 640 x 480 HAL_PIXEL_FORMAT_RAW16 640 x 480 HAL_PIXEL_FORMAT_RAW_OPAQUE ANDROID_SENSOR_INFO_SENSITIVITY_RANGE min = 54 max = 3451 ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY 3451 ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE min = 0ns max = 1266732525ns ==================================== Stats for camera: 1 ANDROID_SCALER_AVAILABLE_RAW_SIZES: These are likely supported by the sensor 240 x 1629 ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS: These are NOT necessarily supported by the sensor 240 x 320 HAL_PIXEL_FORMAT_YCbCr_420_888 240 x 320 HAL_PIXEL_FORMAT_BLOB 176 x 144 HAL_PIXEL_FORMAT_YCbCr_420_888 176 x 144 HAL_PIXEL_FORMAT_BLOB 240 x 1629 HAL_PIXEL_FORMAT_RAW10 240 x 1629 HAL_PIXEL_FORMAT_RAW12 240 x 1629 HAL_PIXEL_FORMAT_RAW16 240 x 1629 HAL_PIXEL_FORMAT_RAW_OPAQUE ANDROID_SENSOR_INFO_SENSITIVITY_RANGE min = 54 max = 0 ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY 0 ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE min = 0ns max = 0ns ==================================== Number of cameras detected: 2 ====================================Given the output, we copied the files
com.qti.sensormodule.ov7251_0.binandcom.qti.sensormodule.irs2975c_2.bininto/usr/lib/camerafolder.
Then we ran:camera-server-config-helper tracking:ov7251:0 tof:pmd-tof:2and got the following output:successfully wrote this camera config to disk: ================================================================= configuration for 2 cameras: cam #0 name: tracking sensor type: ov7251 isEnabled: 1 camId: 0 camId2: -1 fps: 30 en_rotate: 0 en_rotate2: 0 en_preview: 1 pre_width: 640 pre_height: 480 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: lme_msv msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 1 independent_exposure:0 cam #1 name: tof sensor type: pmd-tof isEnabled: 1 camId: 2 camId2: -1 fps: 5 en_rotate: 1 en_rotate2: 0 en_preview: 1 pre_width: 224 pre_height: 1557 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: off msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 5 independent_exposure:0 fsync_en: 0 fsync_gpio: 109 ================================================================= camera_server_config_helper is doneFinally, we ran:
voxl-camera-server, and we got:existing instance of voxl-camera-server found, attempting to stop it ================================================================= configuration for 2 cameras: cam #0 name: tracking sensor type: ov7251 isEnabled: 1 camId: 0 camId2: -1 fps: 30 en_rotate: 0 en_rotate2: 0 en_preview: 1 pre_width: 640 pre_height: 480 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: lme_msv msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 1 independent_exposure:0 cam #1 name: tof sensor type: pmd-tof isEnabled: 1 camId: 2 camId2: -1 fps: 5 en_rotate: 1 en_rotate2: 0 en_preview: 1 pre_width: 224 pre_height: 1557 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: off msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 5 independent_exposure:0 fsync_en: 0 fsync_gpio: 109 ================================================================= thread is locked to cores: 4 5 6 7 connected to mavlink pipe Connected to cpu-monitor Starting Camera: tracking (id #0) gbm_create_device(156): Info: backend name is: msm_drm setting ov7251 BLC register for cam id 0 Starting Camera: tof (id #2) WARNING: cam tof (id 2) does not seem to be alive ------ voxl-camera-server: Started 1 of 2 cameras ------ voxl-camera-server: Camera server is now runningJust to make sure that only one camera was working, we ran:
voxl-inspect-cam -aand got:| Pipe Name | bytes | wide | hgt |exp(ms)| gain | frame id |latency(ms)| fps | mbt | tracking | 307200 | 640 | 480 | 5.04 | 111 | 179 | 11.6 | 30.0 | 73.7 | RAW8What do you think?
-
@Morten-Nissov said in Compatible ToF sensor setup with VOXL2 Mini:
DEBUG: Cam idx: 0, Cam slot: 0, Slave Address: 0x00E2, Sensor Id: 0x7750
DEBUG: Cam idx: 1, Cam slot: 2, Slave Address: 0x007A, Sensor Id: 0x2975Please use camera id 1 in your
voxl-camera-server.confinstead of 2. The slot # is 2 but camera id is 1.Alex
-
This post is deleted! -
Hi, I'm Luca, and I'm currently working on the ModalAI voxl2 mini. Thanks for your help and your quick answers.
To recap: I ran
voxl-camera-server -l, and I got:DEBUG: Attempting to open the hal module DEBUG: SUCCESS: Camera module opened on attempt 0 DEBUG: ----------- Number of cameras: 2 DEBUG: Cam idx: 0, Cam slot: 0, Slave Address: 0x00E2, Sensor Id: 0x7750 DEBUG: Cam idx: 1, Cam slot: 2, Slave Address: 0x007A, Sensor Id: 0x2975 DEBUG: Note: This list comes from the HAL module and may not be indicative DEBUG: of configurations that have full pipelines DEBUG: Number of cameras: 2 ==================================== Stats for camera: 0 ANDROID_SCALER_AVAILABLE_RAW_SIZES: These are likely supported by the sensor 640 x 480 640 x 480 640 x 480 ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS: These are NOT necessarily supported by the sensor 640 x 480 HAL_PIXEL_FORMAT_YCbCr_420_888 640 x 480 HAL_PIXEL_FORMAT_BLOB 640 x 400 HAL_PIXEL_FORMAT_YCbCr_420_888 640 x 400 HAL_PIXEL_FORMAT_BLOB 640 x 360 HAL_PIXEL_FORMAT_YCbCr_420_888 640 x 360 HAL_PIXEL_FORMAT_BLOB 352 x 288 HAL_PIXEL_FORMAT_YCbCr_420_888 352 x 288 HAL_PIXEL_FORMAT_BLOB 320 x 240 HAL_PIXEL_FORMAT_YCbCr_420_888 320 x 240 HAL_PIXEL_FORMAT_BLOB 240 x 320 HAL_PIXEL_FORMAT_YCbCr_420_888 240 x 320 HAL_PIXEL_FORMAT_BLOB 176 x 144 HAL_PIXEL_FORMAT_YCbCr_420_888 176 x 144 HAL_PIXEL_FORMAT_BLOB 640 x 480 HAL_PIXEL_FORMAT_RAW10 640 x 480 HAL_PIXEL_FORMAT_RAW12 640 x 480 HAL_PIXEL_FORMAT_RAW16 640 x 480 HAL_PIXEL_FORMAT_RAW_OPAQUE ANDROID_SENSOR_INFO_SENSITIVITY_RANGE min = 54 max = 3451 ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY 3451 ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE min = 0ns max = 1266732525ns ==================================== Stats for camera: 1 ANDROID_SCALER_AVAILABLE_RAW_SIZES: These are likely supported by the sensor 240 x 1629 ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS: These are NOT necessarily supported by the sensor 240 x 320 HAL_PIXEL_FORMAT_YCbCr_420_888 240 x 320 HAL_PIXEL_FORMAT_BLOB 176 x 144 HAL_PIXEL_FORMAT_YCbCr_420_888 176 x 144 HAL_PIXEL_FORMAT_BLOB 240 x 1629 HAL_PIXEL_FORMAT_RAW10 240 x 1629 HAL_PIXEL_FORMAT_RAW12 240 x 1629 HAL_PIXEL_FORMAT_RAW16 240 x 1629 HAL_PIXEL_FORMAT_RAW_OPAQUE ANDROID_SENSOR_INFO_SENSITIVITY_RANGE min = 54 max = 0 ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY 0 ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE min = 0ns max = 0ns ==================================== Number of cameras detected: 2 ====================================Instead of checking the Cam slot, I have to check Cam idx. So I ran the following command:
camera-server-config-helper tracking:ov7251:0 tof:pmd-tof:1and got the following output:successfully wrote this camera config to disk: ================================================================= configuration for 2 cameras: cam #0 name: tracking sensor type: ov7251 isEnabled: 1 camId: 0 camId2: -1 fps: 30 en_rotate: 0 en_rotate2: 0 en_preview: 1 pre_width: 640 pre_height: 480 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: lme_msv msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 1 independent_exposure:0 cam #1 name: tof sensor type: pmd-tof isEnabled: 1 camId: 1 camId2: -1 fps: 5 en_rotate: 1 en_rotate2: 0 en_preview: 1 pre_width: 224 pre_height: 1557 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: off msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 5 independent_exposure:0 fsync_en: 0 fsync_gpio: 109 ================================================================= camera_server_config_helper is doneFinally, I ran
voxl-camera-serverand got the following error:================================================================= configuration for 2 cameras: cam #0 name: tracking sensor type: ov7251 isEnabled: 1 camId: 0 camId2: -1 fps: 30 en_rotate: 0 en_rotate2: 0 en_preview: 1 pre_width: 640 pre_height: 480 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: lme_msv msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 1 independent_exposure:0 cam #1 name: tof sensor type: pmd-tof isEnabled: 1 camId: 1 camId2: -1 fps: 5 en_rotate: 1 en_rotate2: 0 en_preview: 1 pre_width: 224 pre_height: 1557 en_raw_preview: 1 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_misp: 0 misp_width: -1 misp_height: -1 en_snapshot: 0 snap_width: -1 snap_height: -1 exif_focal_length: 0.000000 exif_focal_len_35mm_format:0 exif_fnumber: 0.000000 ae_mode: off msv_exposure_min_us: 20 msv_exposure_max_us: 33000 gain_min : 54 gain_max : 8000 standby_enabled: 0 decimator: 5 independent_exposure:0 fsync_en: 0 fsync_gpio: 109 ================================================================= thread is locked to cores: 4 5 6 7 connected to mavlink pipe Connected to cpu-monitor Starting Camera: tracking (id #0) gbm_create_device(156): Info: backend name is: msm_drm setting ov7251 BLC register for cam id 0 Starting Camera: tof (id #1) ERROR: Camera 1 failed to find supported preview config: 224x1557 WARNING: Failed to start cam tof due to invalid resolution WARNING: assuming cam is missing and trying to compensate ------ voxl-camera-server: Started 1 of 2 cameras ------ voxl-camera-server: Camera server is now runningDo you have any suggestions?
Thanks for your help,
Luca -
@Luca-Zanatta , I believe your issue is that you are specifying the wrong type of TOF sensor. There are two types:
- pmd-tof (old, EOL)
- pmd-tof-liow2 (a.k.a
irs2975c)
Based on your sensor id (
Slave Address: 0x007A, Sensor Id: 0x2975), you have pmd-tof-liow2, so you should runcamera-server-config-helper tracking:ov7251:0 tof:pmd-tof-liow2:1).When you configured for
pmd-tof, the camera server config was incorrectly set for the old TOF sensor, which has resolution of 224x1557. The new TOF sensor has resolution of 240x1629Please try. Sorry i did not catch that earlier.
Alex
-
-
E erik referenced this topic on
-
@Alex-Kushleyev @Luca-Zanatta I am also facing the same issue, can you please tell how to solve resolution problem.
I have tried to manually add preview width and preview height in vim /etc/modalai/voxl-camera-server.conf But when i run voxl-camera-server it still gives previous resolution 240*1557 and hence pmd-tof is not detected. -
The preview width and height parameters are always in the camera config file, so if you added them, they are duplicates (and will be ignored).
Please read through this thread as it has pretty detailed explanation how to configure the correct tof sensor (old or new) for a custom configuration.
Camera-server-config-helper is indeed helpful. If you use it correctly, you should not have to manually modify the resolution in the config file.
If you still cannot get this to work, please let me know what cameras you have plugged in (and which camera ports) on your voxl 2 mini.
Alex