@Alex-Gardner Thanks for your support a few months ago.
Having a strange issue on a VOXL 1 with the camera configuration and latest released VOXL system image. This is a Starling with ToF, Tracking, and HiRES camera all connected. I am running VOXL Platform 3.8.0-0.7
and voxl-camera-server 0.9.1
.
When I run voxl-configure-cameras 5
and start the server all is well. I get good outputs from the ToF and the tracking camera. However, when I configure with voxl-configure-cameras 6
to enable the HIRES camera, I get a segfault as shown below. I've tried reseating the camera a few times to see if that made a difference. I've also tried now on two devices with the same result since upgrading to 3.8.0 system image. I'm sure I'm missing something silly or maybe a dependency is off?
Here's the output from the camera server before it crashes.
root@apq8096:~# voxl-camera-server -d 0
------ voxl-camera-server INFO: Port J2
------ voxl-camera-server: Done configuring hires camera
Port : port_J2
Name : hires
Enabled : 1
Type : hires
Api : hal3
P-W : 640
P-H : 480
P-Fmt : nv21
FPS : 30
OverrideId : -1
AEAlgo : isp
------ voxl-camera-server INFO: Port J3
------ voxl-camera-server: Done configuring tof camera
Port : port_J3
Name : tof
Enabled : 1
Type : tof
Api : hal3
P-W : 224
P-H : 1557
P-Fmt : blob
FPS : 15
Tof Mode : 9
OverrideId : -1
AEAlgo : isp
------ voxl-camera-server INFO: Port J4
------ voxl-camera-server: Done configuring tracking camera
Port : port_J4
Name : tracking
Enabled : 1
Type : tracking
Api : hal3
P-W : 640
P-H : 480
P-Fmt : raw8
FPS : 30
OverrideId : -1
AEAlgo : modalai
=================MODALAI Auto Exposure Settings==================
gain_min: 100
gain_max: 1000
exposure_min_us: 20
exposure_max_us: 30000
desired_msv: 68.000000
k_p_ns: 6000.000000
k_i_ns: 20.000000
max_i: 250.000000
p_good_thresh: 3
exposure_period: 2
gain_period: 4
display_debug: no
exposure_offset_for_gain_calc: 3000
=================================================================
Writing new configuration to /etc/modalai/voxl-camera-server.conf
Created pipe: hires channel: 0
Created pipe: tof channel: 6
Created pipe: tracking channel: 7
Starting Camera: tracking
SUCCESS: Camera module opened
----------- Number of cameras: 2
----------- ToF camera id: 0
----------- Mono camera id: 1
------ voxl-camera-server INFO: Client: qvio-server0 connected to channel: 7
Available resolutions for camera: tracking:
640 x 480
320 x 240
Resolution: 640 x 480 Found!
------ voxl-camera-server: Preview buffer allocations
Internal Exposure for: tracking 7
/builds/voxl-public/voxl-sdk/services/apq8096-camera-server/src/expgain_interface/expgain_interface_factory.cpp 45 Creating exposure interface
Creating ModalAI exposure interface
Initialize
Initialize
Port : port_J4
Name : tracking
Enabled : 1
Type : tracking
Api : hal3
P-W : 640
P-H : 480
P-Fmt : raw8
FPS : 30
OverrideId : -1
AEAlgo : modalai
=================MODALAI Auto Exposure Settings==================
gain_min: 100
gain_max: 1000
exposure_min_us: 20
exposure_max_us: 30000
desired_msv: 68.000000
k_p_ns: 6000.000000
k_i_ns: 20.000000
max_i: 250.000000
p_good_thresh: 3
exposure_period: 2
gain_period: 4
display_debug: no
exposure_offset_for_gain_calc: 3000
=================================================================
Starting Camera: tof
------ voxl-camera-server: Preview buffer allocations
SUCCESS: TOF interface created!
Received raw10 frame, checking to see if is actually raw8
Frame was actually 8 bit, sending as is
Internal AE new val:exposure 20000 gain 100
Internal AE new val:exposure 406225 gain 100
Internal AE new val:exposure 804255 gain 100
=========== modalai Royale3.31, Spectre4.7 CameraDevice::activateUseCase() : return SUCCESS!!
Setting use case: mode=9, fps = 15
=========== modalai Royale3.31, Spectre4.7 CameraDevice::activateUseCase() : return SUCCESS!!SUCCESS: TOF interface initialized!
Libcamera sending RAW16 TOF data. App calling the PMD libs to postprocess the RAW16 data
Loading lens parameters from /data/misc/camera/irs10x0c_lens.cal. Port : port_J3
Name : tof
Enabled : 1
Type : tof
Api : hal3
P-W : 224
P-H : 1557
P-Fmt : blob
FPS : 15
Tof Mode : 9
OverrideId : -1
AEAlgo : isp
Starting Camera: hires
------ voxl-camera-server INFO: Camera server is now stopping
There is a chance that it may segfault here, this is a mmqcamera bug, ignore it
------ voxl-camera-server INFO: Stopping tracking camera
------ Result thread on camera: tracking recieved stop command, exiting
------ voxl-camera-server INFO: tracking camera stopped successfully
------ voxl-camera-server INFO: Stopping hires camera
Here is my config file:
{
"version": 0.2,
"port_J2": {
"name": "hires",
"enabled": true,
"type": "hires",
"api": "hal3",
"frame_rate": 30,
"override_id": -1,
"auto_exposure_mode": "isp",
"preview": {
"enabled": true,
"width": 640,
"height": 480,
"format": "nv21"
},
"video": {
"enabled": false,
"width": 1024,
"height": 768,
"format": "h265"
},
"snapshot": {
"enabled": false,
"width": 1024,
"height": 768,
"format": "jpg"
}
},
"port_J3": {
"name": "tof",
"enabled": true,
"type": "tof",
"api": "hal3",
"tof_mode": 9,
"frame_rate": 15,
"override_id": -1,
"auto_exposure_mode": "isp",
"preview": {
"enabled": true,
"width": 224,
"height": 1557,
"format": "blob"
}
},
"port_J4": {
"name": "tracking",
"enabled": true,
"type": "tracking",
"api": "hal3",
"frame_rate": 30,
"override_id": -1,
"auto_exposure_mode": "modalai",
"manual_gain": 1000,
"modal_ae_gain_min": 100,
"modal_ae_gain_max": 1000,
"modal_ae_gain_period": 4,
"modal_ae_exposure_min_us": 20,
"modal_ae_exposure_max_us": 30000,
"modal_ae_exposure_period": 2,
"modal_ae_exposure_offset": 3000,
"modal_ae_desired_msv": 68,
"modal_ae_k_p_ns": 6000,
"modal_ae_k_i_ns": 20,
"modal_ae_max_i": 250,
"modal_ae_good_thresh": 3,
"modal_ae_display_debug": false,
"preview": {
"enabled": true,
"width": 640,
"height": 480,
"format": "raw8"
}
}
}