@Eric-Katzfey
I did. The issue is that the drone is supposed to be autonomous at the end. and I would like to avoid constantly checking whether the px4 service is alive or not.
from my understanding the service is supposed to be alive on boot so it seems to be a bag that I would want to fix.
Latest posts made by giladWDS
-
RE: px4 service issue
-
RE: px4 service issue
@Eric-Katzfey
never knew that there are services outside of/etc/systemd/system
andsystemctl status voxl-px4
gives disable. I will bring the full argument as soon as I have access to the machine -
px4 service issue
I have an issue with the px4 service where the px4 service starts at stop status on the drone boot. In my short time debugging this I looked at the body of the service and I see it requires another service to end:
[Unit] Description=px4 After=sscrpcd.service Requires=sscrpcd.service [Service] ExecStartPre=/bin/sleep 2 ExecStart=/usr/bin/voxl-px4 Restart=on-failure [Install] WantedBy=multi-user.target
but I can't find this service on the system nor can I find it online.
Am I missing something?
I would love some help with this. -
RE: cam does not seem to be alive issue
@Alex-Kushleyev
sorry for the delay,
this sounds about right.
I'm not sure about the 15 fps but we do use raw preview only for our application and no other stream
this is my camera conf file:cat /etc/modalai/voxl-camera-server.conf /** * voxl-camera-server Configuration File * * Each camera has configurations for up to 4 HAL3 streams: * - `preview` stream for raw unprocessed images from CV cameras * - `small_video` 720p (ish) h264/h265 compressed for fpv video streaming * - `large_video` 4k (ish) h264/h265 for onboard video recording to disk * - `snapshot` ISP-processed JPG snapshots that get saved to disk * * on QRB5165 platforms (VOXL2 and VOXL2 mini) you can only have 3 of the 4 enabled * * This file is generated from default values by voxl-configure-cameras. * Do not expect arbitrary resolutions to work, the ISP and video compression * pipelines only support very specific resolutions. * * The default video compression mode is cqp or Constant Quantization Parameter * * * */ { "version": 0.1, "cameras": [{ "type": "ov7251", "name": "stereo", "enabled": true, "camera_id": 0, "camera_id_second": 1, "independent_exposure": false, "fps": 30, "en_rotate": false, "en_rotate_second": false, "en_preview": true, "preview_width": 640, "preview_height": 480, "en_raw_preview": true, "ae_mode": "lme_msv", "ae_desired_msv": 60, "exposure_min_us": 20, "exposure_max_us": 33000, "gain_min": 54, "gain_max": 8000, "exposure_soft_min_us": 5000, "ae_filter_alpha": 0.600000023841858, "ae_ignore_fraction": 0.20000000298023224, "ae_slope": 0.05000000074505806, "ae_exposure_period": 1, "ae_gain_period": 1 }, { "type": "imx412", "name": "hires2", "enabled": true, "camera_id": 2, "fps": 3, "en_rotate": true, "en_preview": true, "preview_width": 4056, "preview_height": 3040, "en_raw_preview": false, "en_small_video": false, "small_video_width": 1024, "small_video_height": 768, "small_venc_mode": "h265", "small_venc_br_ctrl": "cqp", "small_venc_Qfixed": 30, "small_venc_Qmin": 15, "small_venc_Qmax": 40, "small_venc_nPframes": 9, "small_venc_mbps": 2, "en_large_video": false, "large_video_width": 2048, "large_video_height": 1536, "large_venc_mode": "h265", "large_venc_br_ctrl": "cqp", "large_venc_Qfixed": 38, "large_venc_Qmin": 15, "large_venc_Qmax": 50, "large_venc_nPframes": 29, "large_venc_mbps": 30, "en_snapshot": false, "en_snapshot_width": 4056, "en_snapshot_height": 3040, "ae_mode": "lme_msv", "ae_desired_msv": 65, "exposure_min_us": 20, "exposure_max_us": 33000, "gain_min": 20, "gain_max": 250, "exposure_soft_min_us": 3000, "ae_filter_alpha": 0.700000023841858, "ae_ignore_fraction": 0.20000000298023224, "ae_slope": 0.05000000074505806, "ae_exposure_period": 1, "ae_gain_period": 0.5 }, { "type": "imx412", "name": "hires", "enabled": true, "camera_id": 3, "fps": 3, "en_preview": true, "preview_width": 4056, "preview_height": 3040, "en_raw_preview": false, "en_small_video": false, "small_video_width": 1024, "small_video_height": 768, "small_venc_mode": "h265", "small_venc_br_ctrl": "cqp", "small_venc_Qfixed": 30, "small_venc_Qmin": 15, "small_venc_Qmax": 40, "small_venc_nPframes": 9, "small_venc_mbps": 2, "en_large_video": false, "large_video_width": 4056, "large_video_height": 3040, "large_venc_mode": "h265", "large_venc_br_ctrl": "cqp", "large_venc_Qfixed": 38, "large_venc_Qmin": 15, "large_venc_Qmax": 50, "large_venc_nPframes": 29, "large_venc_mbps": 30, "en_snapshot": false, "en_snapshot_width": 4056, "en_snapshot_height": 3040, "ae_mode": "lme_msv", "ae_desired_msv": 65, "exposure_min_us": 20, "exposure_max_us": 33000, "gain_min": 20, "gain_max": 250, "exposure_soft_min_us": 3000, "ae_filter_alpha": 0.700000023841858, "ae_ignore_fraction": 0.20000000298023224, "ae_slope": 0.05000000074505806, "ae_exposure_period": 1, "ae_gain_period": 0.5 }, { "type": "ov7251", "name": "tracking", "enabled": true, "camera_id": 4, "fps": 30, "en_rotate": false, "en_preview": true, "preview_width": 640, "preview_height": 480, "en_raw_preview": true, "ae_mode": "lme_msv", "ae_desired_msv": 60, "exposure_min_us": 20, "exposure_max_us": 33000, "gain_min": 54, "gain_max": 8000, "exposure_soft_min_us": 5000, "ae_filter_alpha": 0.600000023841858, "ae_ignore_fraction": 0.20000000298023224, "ae_slope": 0.05000000074505806, "ae_exposure_period": 1, "ae_gain_period": 1 }] }
hope this helps
-
RE: cam does not seem to be alive issue
@Alex-Kushleyev
I will test it with the flight deck and let you know as soon as I can -
RE: cam does not seem to be alive issue
@Alex-Kushleyev
the flight-deck is a voxl2 unit (qrb chip)
with voxl-camera-server 1.8.9 on 1.1.2 SDK
other than that one imx412 is enough for the server to crash but let me know if you want the full config and/or driver list -
RE: cam does not seem to be alive issue
@Alex-Kushleyev hi
I just stumbled upon the same bug with our voxl-flight-deck module that also refuses to downscale the fps. -
RE: cam does not seem to be alive issue
@Alex-Kushleyev
It would take some time to do this since I found a workaround compiling the camera server from source with a small fix:
I changed the hal3_camera_mgr.cpp
from:
int32_t frame_rate_rate[] = {fps,fps};
into:
int32_t frame_rate_rate[] = {1,30};
I know this is hacky and will probably bite me if I try to put higher fps for low fps cameras like a tof or something but it works for now.
I will get back to it and update. -
RE: cam does not seem to be alive issue
@Alex-Kushleyev
I have tested different layouts with different cameras disabled and it didn't work either.
for some reason, the voxl won't accept any other frame rate in the config file other than 30. -
RE: cam does not seem to be alive issue
@Alex-Kushleyev
Hi, after I had to work on other projects I have finally come back to this and I managed to make the voxl read all cameras when I moved the tracking camera to j8-lower.
now the issue I'm facing is with a frame rate reduction.
it seems that whenever I try to change the frame rate of one of the high-res cameras the server crashes.
this is the server log:Oct 27 12:35:13 root systemd[1]: Started voxl-camera-server. Oct 27 12:35:13 root voxl-camera-server[14170]: detected system image 1.7.6 Oct 27 12:35:13 root voxl-camera-server[14170]: using new imx412 defaults Oct 27 12:35:13 root voxl-camera-server[14170]: detected system image 1.7.6 Oct 27 12:35:14 root voxl-camera-server[14170]: using new imx412 defaults Oct 27 12:35:14 root voxl-camera-server[14170]: ================================================================= Oct 27 12:35:14 root voxl-camera-server[14170]: configuration for 3 cameras: Oct 27 12:35:14 root voxl-camera-server[14170]: cam #0 Oct 27 12:35:14 root voxl-camera-server[14170]: name: hires2 Oct 27 12:35:14 root voxl-camera-server[14170]: sensor type: imx412 Oct 27 12:35:14 root voxl-camera-server[14170]: isEnabled: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: camId: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: camId2: -1 Oct 27 12:35:14 root voxl-camera-server[14170]: fps: 10 Oct 27 12:35:14 root voxl-camera-server[14170]: en_rotate: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: en_rotate2: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: en_preview: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: pre_width: 4056 Oct 27 12:35:14 root voxl-camera-server[14170]: pre_height: 3040 Oct 27 12:35:14 root voxl-camera-server[14170]: en_raw_preview: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: en_small_video: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: small_video_width: 1024 Oct 27 12:35:14 root voxl-camera-server[14170]: small_video_height: 768 Oct 27 12:35:14 root voxl-camera-server[14170]: en_large_video: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: large_video_width: 4056 Oct 27 12:35:14 root voxl-camera-server[14170]: large_video_height: 3040 Oct 27 12:35:14 root voxl-camera-server[14170]: en_snapshot: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: snap_width: 4056 Oct 27 12:35:14 root voxl-camera-server[14170]: snap_height: 3040 Oct 27 12:35:14 root voxl-camera-server[14170]: ae_mode: isp Oct 27 12:35:14 root voxl-camera-server[14170]: standby_enabled: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: decimator: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: independent_exposure:0 Oct 27 12:35:14 root voxl-camera-server[14170]: cam #1 Oct 27 12:35:14 root voxl-camera-server[14170]: name: hires Oct 27 12:35:14 root voxl-camera-server[14170]: sensor type: imx412 Oct 27 12:35:14 root voxl-camera-server[14170]: isEnabled: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: camId: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: camId2: -1 Oct 27 12:35:14 root voxl-camera-server[14170]: fps: 10 Oct 27 12:35:14 root voxl-camera-server[14170]: en_rotate: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: en_rotate2: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: en_preview: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: pre_width: 4056 Oct 27 12:35:14 root voxl-camera-server[14170]: pre_height: 3040 Oct 27 12:35:14 root voxl-camera-server[14170]: en_raw_preview: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: en_small_video: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: small_video_width: 1024 Oct 27 12:35:14 root voxl-camera-server[14170]: small_video_height: 768 Oct 27 12:35:14 root voxl-camera-server[14170]: en_large_video: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: large_video_width: 4056 Oct 27 12:35:14 root voxl-camera-server[14170]: large_video_height: 3040 Oct 27 12:35:14 root voxl-camera-server[14170]: en_snapshot: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: snap_width: 4056 Oct 27 12:35:14 root voxl-camera-server[14170]: snap_height: 3040 Oct 27 12:35:14 root voxl-camera-server[14170]: ae_mode: isp Oct 27 12:35:14 root voxl-camera-server[14170]: standby_enabled: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: decimator: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: independent_exposure:0 Oct 27 12:35:14 root voxl-camera-server[14170]: cam #2 Oct 27 12:35:14 root voxl-camera-server[14170]: name: tracking Oct 27 12:35:14 root voxl-camera-server[14170]: sensor type: ar0144 Oct 27 12:35:14 root voxl-camera-server[14170]: isEnabled: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: camId: 2 Oct 27 12:35:14 root voxl-camera-server[14170]: camId2: -1 Oct 27 12:35:14 root voxl-camera-server[14170]: fps: 30 Oct 27 12:35:14 root voxl-camera-server[14170]: en_rotate: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: en_rotate2: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: en_preview: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: pre_width: 1280 Oct 27 12:35:14 root voxl-camera-server[14170]: pre_height: 800 Oct 27 12:35:14 root voxl-camera-server[14170]: en_raw_preview: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: en_small_video: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: small_video_width: -1 Oct 27 12:35:14 root voxl-camera-server[14170]: small_video_height: -1 Oct 27 12:35:14 root voxl-camera-server[14170]: en_large_video: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: large_video_width: -1 Oct 27 12:35:14 root voxl-camera-server[14170]: large_video_height: -1 Oct 27 12:35:14 root voxl-camera-server[14170]: en_snapshot: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: snap_width: -1 Oct 27 12:35:14 root voxl-camera-server[14170]: snap_height: -1 Oct 27 12:35:14 root voxl-camera-server[14170]: ae_mode: lme_msv Oct 27 12:35:14 root voxl-camera-server[14170]: standby_enabled: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: decimator: 1 Oct 27 12:35:14 root voxl-camera-server[14170]: independent_exposure:0 Oct 27 12:35:14 root voxl-camera-server[14170]: fsync_en: 0 Oct 27 12:35:14 root voxl-camera-server[14170]: fsync_gpio: 111 Oct 27 12:35:14 root voxl-camera-server[14170]: ================================================================= Oct 27 12:35:14 root voxl-camera-server[14170]: connected to GPS mavlink pipe Oct 27 12:35:14 root voxl-camera-server[14170]: Starting Camera: hires2 (id #0) Oct 27 12:35:14 root voxl-camera-server[14170]: Connected to cpu-monitor Oct 27 12:35:14 root voxl-camera-server[14170]: Using gain limits min: 100 max: 1600 Oct 27 12:35:14 root voxl-camera-server[14170]: gbm_create_device(156): Info: backend name is: msm_drm Oct 27 12:35:14 root voxl-camera-server[14170]: Starting Camera: hires (id #1) Oct 27 12:35:14 root voxl-camera-server[14170]: Using gain limits min: 100 max: 1600 Oct 27 12:35:14 root voxl-camera-server[14170]: ERROR: Received "Result" error from camera: hires2 Oct 27 12:35:14 root systemd[1]: voxl-camera-server.service: Main process exited, code=killed, status=6/ABRT Oct 27 12:35:14 root systemd[1]: voxl-camera-server.service: Failed with result 'signal'. Oct 27 12:35:16 root systemd[1]: voxl-camera-server.service: Service hold-off time over, scheduling restart. Oct 27 12:35:16 root systemd[1]: voxl-camera-server.service: Scheduled restart job, restart counter is at 1.
and this is the config file:
cat /etc/modalai/voxl-camera-server.conf /** * voxl-camera-server Configuration File * * Each camera has configurations for up to 4 HAL3 streams: * - `preview` stream for raw unprocessed images from CV cameras * - `small_video` 720p (ish) h264/h265 compressed for fpv video streaming * - `large_video` 4k (ish) h264/h265 for onboard video recording to disk * - `snapshot` ISP-processed JPG snapshots that get saved to disk * * on QRB5165 platforms (VOXL2 and VOXL2 mini) you can only have 3 of the 4 enabled * * This file is generated from default values by voxl-configure-cameras. * Do not expect arbitrary resolutions to work, the ISP and video compression * pipelines only support very specific resolutions. * * The default video compression mode is cqp or Constant Quantization Parameter * * * */ { "version": 0.1, "fsync_en": false, "fsync_gpio": 111, "cameras": [{ "type": "imx412", "name": "hires2", "enabled": true, "camera_id": 0, "fps": 10, "en_preview": true, "preview_width": 4056, "preview_height": 3040, "en_raw_preview": false, "en_small_video": false, "small_video_width": 1024, "small_video_height": 768, "small_venc_mode": "h265", "small_venc_br_ctrl": "cqp", "small_venc_Qfixed": 30, "small_venc_Qmin": 15, "small_venc_Qmax": 40, "small_venc_nPframes": 9, "small_venc_mbps": 2, "en_large_video": false, "large_video_width": 4056, "large_video_height": 3040, "large_venc_mode": "h265", "large_venc_br_ctrl": "cqp", "large_venc_Qfixed": 38, "large_venc_Qmin": 15, "large_venc_Qmax": 50, "large_venc_nPframes": 29, "large_venc_mbps": 30, "en_snapshot": false, "en_snapshot_width": 4056, "en_snapshot_height": 3040, "ae_mode": "isp" }, { "type": "imx412", "name": "hires", "enabled": true, "camera_id": 1, "fps": 10, "en_preview": true, "preview_width": 4056, "preview_height": 3040, "en_raw_preview": false, "en_small_video": false, "small_video_width": 1024, "small_video_height": 768, "small_venc_mode": "h265", "small_venc_br_ctrl": "cqp", "small_venc_Qfixed": 30, "small_venc_Qmin": 15, "small_venc_Qmax": 40, "small_venc_nPframes": 9, "small_venc_mbps": 2, "en_large_video": false, "large_video_width": 4056, "large_video_height": 3040, "large_venc_mode": "h265", "large_venc_br_ctrl": "cqp", "large_venc_Qfixed": 38, "large_venc_Qmin": 15, "large_venc_Qmax": 50, "large_venc_nPframes": 29, "large_venc_mbps": 30, "en_snapshot": false, "en_snapshot_width": 4056, "en_snapshot_height": 3040, "ae_mode": "isp" }, { "type": "ar0144", "name": "tracking", "enabled": true, "camera_id": 2, "fps": 30, "en_rotate": false, "en_preview": true, "preview_width": 1280, "preview_height": 800, "en_raw_preview": true, "ae_mode": "lme_msv", "ae_desired_msv": 60, "exposure_min_us": 20, "exposure_max_us": 33000, "gain_min": 54, "gain_max": 8000, "exposure_soft_min_us": 5000, "ae_filter_alpha": 0.600000023841858, "ae_ignore_fraction": 0.20000000298023224, "ae_slope": 0.05000000074505806, "ae_exposure_period": 1, "ae_gain_period": 1 }] }
And when I change it back to 30 fps it works. the problem is the CPU toll 30 takes.