Voxl 2 DFS Server



  • How do you tell the DFS server that you only have one pair of stereo cameras. At no point when you run vox-dfs-configure does it ask you about your setup, and when I go to /etc/modalai/voxl-dfs-server.conf and manually get rid of one pair and change the extrinsics and intrinsics paths and save, running the server just reverts that file to have a "front" and "rear" pair. I've also tried editing this file, running the configurator, and selecting "no" when asking if I want to reset to factory defaults, and it still overwrites my changes in that file... What factors/scripts affect the generation of that conf file?


  • Dev Team

    If the software thinks the file is corrupted, it will reset to defaults.

    1. What are the exact steps you are trying? Are you calling any other configure after you edit the file?
    2. What symptom are you trying to fix if two stereo pair are configured?
    3. Do you have two stereo pair plugged in?


  • @Chad-Sweet first if I try to run voxl-dfs-server as is, I get the following,

    =================================================================
    min_disparity:   4
    max_disparity:   64
    min_threshold:   10
    cost_threshold:  10
    width:           640
    height:          480
    pc_skip_n_lines: 4
    dfs pair #0
        enable:             1
        input_pipe:         stereo_front
        skip_n_frames:      1
        blur_size:          0
        post_median_size:   0
        intrinsics_file:    /data/modalai/opencv_stereo_front_intrinsics.yml
        extrinsics_file:    /data/modalai/opencv_stereo_front_extrinsics.yml
    dfs pair #1
        enable:             1
        input_pipe:         stereo_rear
        skip_n_frames:      1
        blur_size:          0
        post_median_size:   0
        intrinsics_file:    /data/modalai/opencv_stereo_rear_intrinsics.yml
        extrinsics_file:    /data/modalai/opencv_stereo_rear_extrinsics.yml
    =================================================================
    loading calibration files
    ERROR: Failed to open calibration file: /data/modalai/opencv_stereo_front_intrinsics.yml
    

    And it fails because its looking for "stereo_front" and "stereo_rear" but I only have one pair that in the pipe is just "stereo". So I then go to etc/modalai/voxl-dfs-server.conf which currently looks like this (I'll exclude the comments in this file)

    {
    	"skip_n_frames":	5,
    	"n_disparity_levels":	48,
    	"sobel_cutoff":	5,
    	"first_median_filter_size":	17,
    	"en_second_median_filter":	true,
    	"second_median_filter_size":	7,
    	"min_disparity":	4,
    	"max_disparity":	64,
    	"min_threshold":	10,
    	"cost_threshold":	10,
    	"width":	640,
    	"height":	480,
    	"pc_skip_n_lines":	4,
    	"dfs_pair_0":	{
    		"enable":	true,
    		"input_pipe":	"stereo_front",
    		"skip_n_frames":	1,
    		"blur_size":	0,
    		"post_median_size":	0,
    		"intrinsics_file":	"/data/modalai/opencv_stereo_front_intrinsics.yml",
    		"extrinsics_file":	"/data/modalai/opencv_stereo_front_extrinsics.yml"
    	},
    	"dfs_pair_1":	{
    		"enable":	true,
    		"input_pipe":	"stereo_rear",
    		"skip_n_frames":	1,
    		"blur_size":	0,
    		"post_median_size":	0,
    		"intrinsics_file":	"/data/modalai/opencv_stereo_rear_intrinsics.yml",
    		"extrinsics_file":	"/data/modalai/opencv_stereo_rear_extrinsics.yml"
    	}
    }
    

    and remove the "rear" stereo and then edit the front stereo to just be "stereo", and save it to looks like the following

    {
    	"skip_n_frames":	5,
    	"n_disparity_levels":	48,
    	"sobel_cutoff":	5,
    	"first_median_filter_size":	17,
    	"en_second_median_filter":	true,
    	"second_median_filter_size":	7,
    	"min_disparity":	4,
    	"max_disparity":	64,
    	"min_threshold":	10,
    	"cost_threshold":	10,
    	"width":	640,
    	"height":	480,
    	"pc_skip_n_lines":	4,
    	"dfs_pair_0":	{
    		"enable":	true,
    		"input_pipe":	"stereo",
    		"skip_n_frames":	1,
    		"blur_size":	0,
    		"post_median_size":	0,
    		"intrinsics_file":	"/data/modalai/opencv_stereo_intrinsics.yml",
    		"extrinsics_file":	"/data/modalai/opencv_stereo_extrinsics.yml"
    	}
    }
    

    THEN I run voxl-configure-dfs and say NO to reset to defaults, YES to enable the server. If i try to run voxl-dfs-server again, I get the same

    ERROR: Failed to open calibration file: /data/modalai/opencv_stereo_rear_intrinsics.yml
    

    And I get this because somehow the voxl-dfs-server.conf file was reset to its factory state


  • Dev Team

    @bendraper said in Voxl 2 DFS Server:

    voxl-configure-dfs

    OK, thanks. It sounds like a bug.

    Instead of running voxl-configure-dfs the second time, just run systemctl enable voxl-dfs-server



  • @Chad-Sweet said in Voxl 2 DFS Server:

    systemctl enable voxl-dfs-server

    That doesn't seem to fix the issue. I can issue that command after editing the file, but the inspect-services just says its enabled but not running. Then when I run voxl-dfs-server, it repopulates that conf file to have a "stereo_rear" and fails because the path its looking for the extrinsics obviously does not exist. Is the naming convention I'm using when I edit that file correct? if I only have one stereo pair, should it still be "dfs_pair_0" or should it be something else. The naming convention for this file also differs to that of what is shown on the DFS-Server wiki page.


  • Dev Team

    Looking at the code here, maybe you just need to set dfs_pair_1 enable to false instead of deleting it?



  • @Chad-Sweet That seems to have done the trick! Thanks


Log in to reply