Problem with voxl-camera-server



  • Hi Team,

    I am facing following problems with the camera-server:

    1. voxl-camera-server is stopping after enabling and starting voxl-dfs-server.

    output of voxl-camera-server -d 0 after starting voxl-dfs-server.

    voxl:~$ voxl-camera-server -d 0
    ------ voxl-camera-server INFO: Port J2
    
    ------ voxl-camera-server: Done configuring tof camera
    	 Port       : port_J2
    	 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 J3
    
    ------ voxl-camera-server: Done configuring stereo camera
    	 Port       : port_J3
    	 Name       : stereo
    	 Enabled    : 1
    	 Type       : stereo
    	 Api        : hal3
    	 P-W        : 1280
    	 P-H        : 480
    	 P-Fmt      : nv21
    	 FPS        : 30
    	 OverrideId : -1
    	 AEAlgo     : modalai
    =================MODALAI Auto Exposure Settings==================
    gain_min:                        0
    gain_max:                        1000
    exposure_min_us:                 20
    exposure_max_us:                 33000
    desired_msv:                     58.000000
    k_p_ns:                          32000.000000
    k_i_ns:                          20.000000
    max_i:                           250.000000
    p_good_thresh:                   3
    exposure_period:                 1
    gain_period:                     2
    display_debug:                   no
    exposure_offset_for_gain_calc:   8000
    =================================================================
    
    ------ 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:                        0
    gain_max:                        1000
    exposure_min_us:                 20
    exposure_max_us:                 33000
    desired_msv:                     58.000000
    k_p_ns:                          32000.000000
    k_i_ns:                          20.000000
    max_i:                           250.000000
    p_good_thresh:                   3
    exposure_period:                 1
    gain_period:                     2
    display_debug:                   no
    exposure_offset_for_gain_calc:   8000
    =================================================================
    
    Writing new configuration to /etc/modalai/voxl-camera-server.conf
    Created pipe: tof channel: 5
    Created pipe: stereo channel: 6
    Created pipe: tracking channel: 7
    Starting Camera: tracking
    SUCCESS: Camera module opened
    ----------- Number of cameras: 3
    
    ------ voxl-camera-server ERROR: Client connected to invalid channel: 6
    ----------- ToF    camera id: 0
    ----------- Stereo camera id: 2
    ----------- Mono   camera id: 1
    Available resolutions for camera: tracking:
    640 x 480
    320 x 240
    Resolution: 640 x 480 Found!
    ------ voxl-camera-server INFO: Client: voxl-tag-detector0 connected to channel: 7
    ------ voxl-camera-server ERROR: Client connected to invalid channel: 5
    ------ voxl-camera-server: Preview buffer allocations
    Internal Exposure for: tracking 7
    /builds/voxl-public/modal-pipe-architecture/voxl-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:                        0
    gain_max:                        1000
    exposure_min_us:                 20
    exposure_max_us:                 33000
    desired_msv:                     58.000000
    k_p_ns:                          32000.000000
    k_i_ns:                          20.000000
    max_i:                           250.000000
    p_good_thresh:                   3
    exposure_period:                 1
    gain_period:                     2
    display_debug:                   no
    exposure_offset_for_gain_calc:   8000
    =================================================================
    
    Starting Camera: tof
    ------ voxl-camera-server INFO: Client: qvio-server0 connected to channel: 7
    ------ 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 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    
    =========== 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.Internal AE new val:exposure 0 gain 0
    	 Port       : port_J2
    	 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: stereo
    Available resolutions for camera: stereo:
    1280 x 480
    848 x 480
    858 x 480
    864 x 480
    800 x 480
    720 x 480
    640 x 480
    640 x 240
    640 x 360
    480 x 480
    480 x 360
    480 x 320
    432 x 240
    352 x 288
    320 x 240
    Resolution: 1280 x 480 Found!
    Internal AE new val:exposure 0 gain 0
    ------ voxl-camera-server: Preview buffer allocations
    Internal Exposure for: stereo 6
    /builds/voxl-public/modal-pipe-architecture/voxl-camera-server/src/expgain_interface/expgain_interface_factory.cpp 45 Creating exposure interface
    Creating ModalAI exposure interface
    Initialize
    Initialize
    	 Port       : port_J3
    	 Name       : stereo
    	 Enabled    : 1
    	 Type       : stereo
    	 Api        : hal3
    	 P-W        : 1280
    	 P-H        : 480
    	 P-Fmt      : nv21
    	 FPS        : 30
    	 OverrideId : -1
    	 AEAlgo     : modalai
    =================MODALAI Auto Exposure Settings==================
    gain_min:                        0
    gain_max:                        1000
    exposure_min_us:                 20
    exposure_max_us:                 33000
    desired_msv:                     58.000000
    k_p_ns:                          32000.000000
    k_i_ns:                          20.000000
    max_i:                           250.000000
    p_good_thresh:                   3
    exposure_period:                 1
    gain_period:                     2
    display_debug:                   no
    exposure_offset_for_gain_calc:   8000
    =================================================================
    
    ------ voxl-camera-server: Camera server is now running
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    voxl-camera-server ERROR: Framenumber: 63 ErrorCode: 4
    voxl-camera-server ERROR: Framenumber: 64 ErrorCode: 4
    Internal AE new val:exposure 0 gain 0
    voxl-camera-server ERROR: Framenumber: 65 ErrorCode: 4
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    voxl-camera-server ERROR: Framenumber: 86 ErrorCode: 4
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    voxl-camera-server ERROR: Framenumber: 95 ErrorCode: 4
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    voxl-camera-server ERROR: Error sending request 62, ErrorCode: -19
    
    voxl-camera-server FATAL: Recieved Fatal error from camera: tof
                              Camera server will be stopped
    ------ voxl-camera-server WARNING: Thread: tof request thread recieved ESTOP
    ------ voxl-camera-server WARNING: Thread: stereo result thread recieved ESTOP
    ------ voxl-camera-server WARNING: Thread: tracking result thread recieved ESTOP
    ------ voxl-camera-server WARNING: Thread: tof result thread recieved ESTOP
    ------ voxl-camera-server WARNING: Thread: tracking request thread recieved ESTOP
    
    ------ 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
    ------ voxl-camera-server INFO: tracking camera stopped successfully
    
    ------ voxl-camera-server INFO: Stopping tof camera
    ------ voxl-camera-server INFO: tof camera stopped successfully
    
    ------ voxl-camera-server INFO: Stopping stereo camera
    Camera Server failed to close cleanly, applying estop
    Waiting 10 more seconds before kill
    Critial Error: Camera Server ESTOP failed, forcing exit
    

    after disabling and stopping dfs-server.

    voxl:~$ systemctl disable voxl-dfs-server 
    Removed symlink /etc/systemd/system/multi-user.target.wants/voxl-dfs-server.service.
    ^[[Avoxl:~$ systemctl stop voxl-dfs-server 
    voxl:~$ voxl-camera-server -d 0
    ------ voxl-camera-server INFO: Port J2
    
    ------ voxl-camera-server: Done configuring tof camera
    	 Port       : port_J2
    	 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 J3
    
    ------ voxl-camera-server: Done configuring stereo camera
    	 Port       : port_J3
    	 Name       : stereo
    	 Enabled    : 1
    	 Type       : stereo
    	 Api        : hal3
    	 P-W        : 1280
    	 P-H        : 480
    	 P-Fmt      : nv21
    	 FPS        : 30
    	 OverrideId : -1
    	 AEAlgo     : modalai
    =================MODALAI Auto Exposure Settings==================
    gain_min:                        0
    gain_max:                        1000
    exposure_min_us:                 20
    exposure_max_us:                 33000
    desired_msv:                     58.000000
    k_p_ns:                          32000.000000
    k_i_ns:                          20.000000
    max_i:                           250.000000
    p_good_thresh:                   3
    exposure_period:                 1
    gain_period:                     2
    display_debug:                   no
    exposure_offset_for_gain_calc:   8000
    =================================================================
    
    ------ 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:                        0
    gain_max:                        1000
    exposure_min_us:                 20
    exposure_max_us:                 33000
    desired_msv:                     58.000000
    k_p_ns:                          32000.000000
    k_i_ns:                          20.000000
    max_i:                           250.000000
    p_good_thresh:                   3
    exposure_period:                 1
    gain_period:                     2
    display_debug:                   no
    exposure_offset_for_gain_calc:   8000
    =================================================================
    
    Writing new configuration to /etc/modalai/voxl-camera-server.conf
    Created pipe: tof channel: 5
    Created pipe: stereo channel: 6
    Created pipe: tracking channel: 7
    Starting Camera: tracking
    SUCCESS: Camera module opened
    ----------- Number of cameras: 3
    
    ------ voxl-camera-server ERROR: Client connected to invalid channel: 5
    ------ voxl-camera-server INFO: Client: voxl-tag-detector0 connected to channel: 7
    ------ voxl-camera-server INFO: Client: qvio-server0 connected to channel: 7
    ----------- ToF    camera id: 0
    ----------- Stereo camera id: 2
    ----------- Mono   camera id: 1
    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/modal-pipe-architecture/voxl-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:                        0
    gain_max:                        1000
    exposure_min_us:                 20
    exposure_max_us:                 33000
    desired_msv:                     58.000000
    k_p_ns:                          32000.000000
    k_i_ns:                          20.000000
    max_i:                           250.000000
    p_good_thresh:                   3
    exposure_period:                 1
    gain_period:                     2
    display_debug:                   no
    exposure_offset_for_gain_calc:   8000
    =================================================================
    
    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 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    
    =========== modalai  Royale3.31, Spectre4.7 CameraDevice::activateUseCase() : return SUCCESS!!
    Setting use case: mode=9, fps = 15Internal AE new val:exposure 0 gain 0
    
    =========== 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_J2
    	 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: stereo
    Available resolutions for camera: stereo:
    1280 x 480
    848 x 480
    858 x 480
    864 x 480
    800 x 480
    720 x 480
    640 x 480
    640 x 240
    640 x 360
    480 x 480
    480 x 360
    480 x 320
    432 x 240
    352 x 288
    320 x 240
    Resolution: 1280 x 480 Found!
    Internal AE new val:exposure 0 gain 0
    ------ voxl-camera-server: Preview buffer allocations
    Internal Exposure for: stereo 6
    /builds/voxl-public/modal-pipe-architecture/voxl-camera-server/src/expgain_interface/expgain_interface_factory.cpp 45 Creating exposure interface
    Creating ModalAI exposure interface
    Initialize
    Initialize
    Internal AE new val:exposure 0 gain 0
    	 Port       : port_J3
    	 Name       : stereo
    	 Enabled    : 1
    	 Type       : stereo
    	 Api        : hal3
    	 P-W        : 1280
    	 P-H        : 480
    	 P-Fmt      : nv21
    	 FPS        : 30
    	 OverrideId : -1
    	 AEAlgo     : modalai
    =================MODALAI Auto Exposure Settings==================
    gain_min:                        0
    gain_max:                        1000
    exposure_min_us:                 20
    exposure_max_us:                 33000
    desired_msv:                     58.000000
    k_p_ns:                          32000.000000
    k_i_ns:                          20.000000
    max_i:                           250.000000
    p_good_thresh:                   3
    exposure_period:                 1
    gain_period:                     2
    display_debug:                   no
    exposure_offset_for_gain_calc:   8000
    =================================================================
    
    ------ voxl-camera-server: Camera server is now running
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    Internal AE new val:exposure 0 gain 0
    
    
    1. stereo cameras are not getting rotated after giving the command voxl-configure-cameras 7 rotate_stereo.Screenshot from 2022-10-04 16-56-33.png

    How can I rectify this?

    Thanks!
    Anubhav


  • Dev Team

    Hi,

    The first issue appears to be coming from the TOF camera, the camera server is receiving errorcode 19 (no device) from the tof camera, this usually occurs when the cable connecting the camera to the board has a kink or tear in it and can't keep up once the load starts.

    For the second issue, you need to restart the board after applying the rotate stereo flag, and if the cameras are still upside down after that, it means the cameras were already rotated and you need to run the command without the rotate flag to set them back to normal.



  • Hi Alex,

    I have noticed following things:

    1. When I am using camera-configuration of stereo+tracking, camera server is not stopping after enabling and starting dfs server.
    2. When I am using camera-configuration of tof+stereo+tracking, camera server is stopping after enabling and starting dfs server. Tof sensor is working fine when not using dfs server.
    • So, the problem of camera server getting stop with the configuration of tof+stereo+tracking and after enabling and starting dfs server a hardware issue?

    • Does collision prevention works without the depth from stereo server instead just with the depth from tof sensor?

    Thanks!
    Anubhav


Log in to reply