Last active
August 10, 2023 15:29
-
-
Save valgur/e54e39b6a8931b58cc1776515104c828 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "4ef14f58-8e44-4254-a068-afb08f884aa7", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from pathlib import Path\n", | |
"from pprint import pprint\n", | |
"import re\n", | |
"\n", | |
"source_path = Path.home() / \".conan2/p/pcle09d790c61d8a/s/src\"" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "ef764b70-b052-4358-a231-63858775db84", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"exclude_dirs = {\"doc\", \"examples\", \"test\", \"benchmarks\"}\n", | |
"cmakelists = sorted(p for p in source_path.rglob(\"CMakeLists.txt\") if not set(p.parts) & exclude_dirs)\n", | |
"cmakelists.remove(source_path / \"CMakeLists.txt\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"id": "4754b848-883b-485c-ae3b-a2731ea14a05", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def _correct_deps(deps):\n", | |
" return {{\n", | |
" \"${qtx}\": \"qt\",\n", | |
" \"opengl_glu\": \"opengl\",\n", | |
" \"glew\": \"opengl\",\n", | |
" \"glut\": \"opengl\",\n", | |
" }.get(d.lower(), d.lower()) for d in deps}\n", | |
"\n", | |
"def read_props(cmake_file):\n", | |
" content = Path(cmake_file).read_text()\n", | |
" subsys_params = re.findall(r'set\\(SUB(?:SUB)?SYS_(\\w+) +\"?([^\")]+)\"?\\)', content)\n", | |
" all_params = dict(re.findall(r\"^set\\((\\S+) ([^)]+?)\\)\", content, re.I | re.M))\n", | |
" subsys_depend = re.findall(r\"PCL_SUBSYS_DEPEND\\(([^)]+)\\)\", content, re.I | re.M)\n", | |
" d = {prop.lower(): val for prop, val in subsys_params}\n", | |
" d[\"deps\"] = set(d.pop(\"deps\", \"\").split())\n", | |
" d[\"deps\"] |= set(d.pop(\"ext_deps\", \"\").split())\n", | |
" d[\"opt_deps\"] = set(d.pop(\"opt_deps\", \"\").split())\n", | |
" if subsys_depend:\n", | |
" subsys_depend = re.sub(r\"\\$\\{(SUB|EXT)[^}]+\\} ?\", \"\", subsys_depend[0])\n", | |
" deps = [set(x.strip().split()) for x in re.split(r\"\\b[A-Z_]+ \", subsys_depend)[1:]]\n", | |
" if len(deps) >= 1:\n", | |
" d[\"deps\"] |= deps[0]\n", | |
" if len(deps) >= 2:\n", | |
" d[\"opt_deps\"] |= deps[1]\n", | |
" if len(deps) >= 3:\n", | |
" d[\"opt_deps\"] |= deps[2]\n", | |
" d[\"opt_deps\"] |= set(re.findall(r\"(\\w+)_FOUND\", content))\n", | |
" d[\"opt_deps\"] |= set(re.findall(r\"WITH_(\\w+)\", content))\n", | |
" d[\"opt_deps\"] |= set(re.findall(r\"HAVE_(\\w+)\", content))\n", | |
" d[\"deps\"] = _correct_deps(d[\"deps\"])\n", | |
" d[\"opt_deps\"] = _correct_deps(d[\"opt_deps\"]) - d[\"deps\"]\n", | |
" m = re.search(r\"PCL_MAKE_PKGCONFIG\\([^)]+?\\)\", content)\n", | |
" d[\"export_pkgconfig\"] = m is not None\n", | |
" d[\"header_only\"] = m and \"HEADER_ONLY\" in m[0]\n", | |
" d[\"enabled_by_default\"] = (all_params.get(\"DEFAULT\") or all_params.get(\"build\")) in [\"TRUE\", None]\n", | |
" libs = re.findall(r\"^\\w*add_library\\((\\S+) [^)]+?\\)\", content, re.I | re.M)\n", | |
" d[\"libs\"] = [l.replace(\"${LIB_NAME}\", f\"pcl_{d['name']}\") for l in libs]\n", | |
" d[\"is_subcomponent\"] = any(p.startswith(\"SUBSUB\") for p in all_params)\n", | |
" d.pop(\"target_name\", None)\n", | |
" d.pop(\"path\", None)\n", | |
" reasons = re.findall(r'set\\(REASON (\"[^)]+?\")\\)', content, re.I | re.M)\n", | |
" if any(\"VTK\" in r and (\"Qt\" in r or \"QVTK\" in r) for r in reasons):\n", | |
" d[\"opt_deps\"] -= {\"qvtk\"}\n", | |
" d[\"deps\"] |= {\"qvtk\"}\n", | |
" elif any(\"VTK\" in r for r in reasons):\n", | |
" d[\"opt_deps\"] -= {\"vtk\"}\n", | |
" d[\"deps\"] |= {\"vtk\"}\n", | |
" elif reasons:\n", | |
" print(f\"'{cmake_file.parent.name}' might be disabled because {', '.join(reasons)}\")\n", | |
" return d" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"id": "1e649df2-a89c-4f6c-8253-fdc9a146d9b7", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"'apps' might be disabled because \"Disabled by default\"\n", | |
"'kinfu' might be disabled because \"Kinfu uses textures which was removed in CUDA 12\"\n", | |
"'kinfu_large_scale' might be disabled because \"Kinfu_large_scale uses textures which was removed in CUDA 12\"\n", | |
"{('2d',): {'deps': {'common', 'filters'},\n", | |
" 'desc': 'Point cloud 2d',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': True,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': [],\n", | |
" 'name': '2d',\n", | |
" 'opt_deps': {'vtk'}},\n", | |
" ('apps',): {'deps': {'2d',\n", | |
" 'common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'keypoints',\n", | |
" 'ml',\n", | |
" 'octree',\n", | |
" 'recognition',\n", | |
" 'registration',\n", | |
" 'sample_consensus',\n", | |
" 'search',\n", | |
" 'segmentation',\n", | |
" 'stereo',\n", | |
" 'surface',\n", | |
" 'tracking',\n", | |
" 'visualization'},\n", | |
" 'desc': 'Application examples/samples that show how PCL works',\n", | |
" 'enabled_by_default': False,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_apps'],\n", | |
" 'name': 'apps',\n", | |
" 'opt_deps': {'libusb',\n", | |
" 'opengl',\n", | |
" 'openni',\n", | |
" 'png',\n", | |
" 'qhull',\n", | |
" 'qt',\n", | |
" 'qvtk',\n", | |
" 'vtk'}},\n", | |
" ('apps', '3d_rec_framework'): {'deps': {'common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'keypoints',\n", | |
" 'ml',\n", | |
" 'octree',\n", | |
" 'openni',\n", | |
" 'recognition',\n", | |
" 'registration',\n", | |
" 'sample_consensus',\n", | |
" 'search',\n", | |
" 'segmentation',\n", | |
" 'surface',\n", | |
" 'tracking',\n", | |
" 'visualization',\n", | |
" 'vtk'},\n", | |
" 'desc': '3D recognition framework',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': True,\n", | |
" 'libs': ['pcl_3d_rec_framework'],\n", | |
" 'name': '3d_rec_framework',\n", | |
" 'opt_deps': {'qhull'}},\n", | |
" ('apps', 'cloud_composer'): {'deps': {'apps',\n", | |
" 'common',\n", | |
" 'filters',\n", | |
" 'io',\n", | |
" 'qt',\n", | |
" 'qvtk',\n", | |
" 'visualization',\n", | |
" 'vtk'},\n", | |
" 'desc': 'Cloud Composer - Application for '\n", | |
" 'Manipulating Point Clouds',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': True,\n", | |
" 'libs': ['pcl_cc_tool_interface'],\n", | |
" 'name': 'cloud_composer',\n", | |
" 'opt_deps': set()},\n", | |
" ('apps', 'in_hand_scanner'): {'deps': {'apps',\n", | |
" 'common',\n", | |
" 'features',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'opengl',\n", | |
" 'openni',\n", | |
" 'qt'},\n", | |
" 'desc': 'In-hand scanner for small objects',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': True,\n", | |
" 'libs': [],\n", | |
" 'name': 'in_hand_scanner',\n", | |
" 'opt_deps': set()},\n", | |
" ('apps', 'modeler'): {'deps': {'apps',\n", | |
" 'common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'keypoints',\n", | |
" 'octree',\n", | |
" 'qt',\n", | |
" 'qvtk',\n", | |
" 'registration',\n", | |
" 'sample_consensus',\n", | |
" 'search',\n", | |
" 'segmentation',\n", | |
" 'surface',\n", | |
" 'tracking',\n", | |
" 'visualization',\n", | |
" 'vtk'},\n", | |
" 'desc': 'PCLModeler: PCL based reconstruction platform',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': True,\n", | |
" 'libs': [],\n", | |
" 'name': 'modeler',\n", | |
" 'opt_deps': set()},\n", | |
" ('apps', 'point_cloud_editor'): {'deps': {'apps',\n", | |
" 'common',\n", | |
" 'filters',\n", | |
" 'io',\n", | |
" 'opengl',\n", | |
" 'qt',\n", | |
" 'vtk'},\n", | |
" 'desc': 'Point Cloud Editor - Simple editor '\n", | |
" 'for 3D point clouds',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': True,\n", | |
" 'libs': [],\n", | |
" 'name': 'point_cloud_editor',\n", | |
" 'opt_deps': set()},\n", | |
" ('common',): {'deps': {'eigen', 'boost'},\n", | |
" 'desc': 'Point cloud common library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_common'],\n", | |
" 'name': 'common',\n", | |
" 'opt_deps': {'eigen', 'boost'}},\n", | |
" ('cuda', 'apps'): {'deps': {'common',\n", | |
" 'cuda',\n", | |
" 'cuda_common',\n", | |
" 'cuda_features',\n", | |
" 'cuda_io',\n", | |
" 'cuda_sample_consensus',\n", | |
" 'cuda_segmentation',\n", | |
" 'geometry',\n", | |
" 'io',\n", | |
" 'visualization',\n", | |
" 'vtk'},\n", | |
" 'desc': 'Point cloud library CUDA apps',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': False,\n", | |
" 'header_only': None,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': [],\n", | |
" 'name': 'cuda_apps',\n", | |
" 'opt_deps': {'openni'}},\n", | |
" ('cuda', 'common'): {'deps': {'cuda'},\n", | |
" 'desc': 'Point cloud CUDA common library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': True,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': [],\n", | |
" 'name': 'cuda_common',\n", | |
" 'opt_deps': set()},\n", | |
" ('cuda', 'features'): {'deps': {'cuda_common', 'io', 'cuda', 'common'},\n", | |
" 'desc': 'Point Cloud CUDA Feature Estimation library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_cuda_features'],\n", | |
" 'name': 'cuda_features',\n", | |
" 'opt_deps': set()},\n", | |
" ('cuda', 'io'): {'deps': {'cuda_common', 'openni', 'common', 'cuda', 'io'},\n", | |
" 'desc': 'Point cloud CUDA IO library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_cuda_io'],\n", | |
" 'name': 'cuda_io',\n", | |
" 'opt_deps': set()},\n", | |
" ('cuda', 'sample_consensus'): {'deps': {'cuda_common', 'io', 'cuda', 'common'},\n", | |
" 'desc': 'Point Cloud CUDA Sample Consensus '\n", | |
" 'library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_cuda_sample_consensus'],\n", | |
" 'name': 'cuda_sample_consensus',\n", | |
" 'opt_deps': set()},\n", | |
" ('cuda', 'segmentation'): {'deps': {'cuda_common', 'io', 'cuda', 'common'},\n", | |
" 'desc': 'Point cloud CUDA Segmentation library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_cuda_segmentation'],\n", | |
" 'name': 'cuda_segmentation',\n", | |
" 'opt_deps': set()},\n", | |
" ('features',): {'deps': {'2d',\n", | |
" 'common',\n", | |
" 'filters',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search'},\n", | |
" 'desc': 'Point cloud features library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_features'],\n", | |
" 'name': 'features',\n", | |
" 'opt_deps': set()},\n", | |
" ('filters',): {'deps': {'common',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'sample_consensus',\n", | |
" 'search'},\n", | |
" 'desc': 'Point cloud filters library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_filters'],\n", | |
" 'name': 'filters',\n", | |
" 'opt_deps': set()},\n", | |
" ('geometry',): {'deps': {'common'},\n", | |
" 'desc': 'Point cloud geometry library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': True,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_geometry'],\n", | |
" 'name': 'geometry',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'containers'): {'deps': {'common', 'cuda'},\n", | |
" 'desc': 'Containers with reference counting for GPU '\n", | |
" 'memory. This module can be compiled without '\n", | |
" 'Cuda Toolkit.',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_containers'],\n", | |
" 'name': 'gpu_containers',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'features'): {'deps': {'common',\n", | |
" 'cuda',\n", | |
" 'geometry',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_octree',\n", | |
" 'gpu_utils'},\n", | |
" 'desc': 'Temporary GPU_common module. Weak CUDA '\n", | |
" 'dependency: a code that use this module '\n", | |
" 'requires CUDA Toolkit installed, but should be '\n", | |
" 'compiled without nvcc',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_features'],\n", | |
" 'name': 'gpu_features',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'kinfu'): {'deps': {'common',\n", | |
" 'cuda',\n", | |
" 'geometry',\n", | |
" 'gpu_containers',\n", | |
" 'io',\n", | |
" 'search'},\n", | |
" 'desc': 'Kinect Fusion implementation',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_kinfu'],\n", | |
" 'name': 'gpu_kinfu',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'kinfu', 'tools'): {'deps': {'cuda', 'visualization', 'gpu_kinfu'},\n", | |
" 'desc': 'Kinfu tools',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': False,\n", | |
" 'header_only': None,\n", | |
" 'is_subcomponent': True,\n", | |
" 'libs': [],\n", | |
" 'name': 'tools',\n", | |
" 'opt_deps': {'opencv'}},\n", | |
" ('gpu', 'kinfu_large_scale'): {'deps': {'common',\n", | |
" 'cuda',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_utils',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search',\n", | |
" 'surface'},\n", | |
" 'desc': 'Kinect Fusion implementation, with '\n", | |
" 'volume shifting',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_kinfu_large_scale'],\n", | |
" 'name': 'gpu_kinfu_large_scale',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'kinfu_large_scale', 'tools'): {'deps': {'cuda',\n", | |
" 'gpu_kinfu_large_scale',\n", | |
" 'visualization'},\n", | |
" 'desc': 'Kinfu large scale tools',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': False,\n", | |
" 'header_only': None,\n", | |
" 'is_subcomponent': True,\n", | |
" 'libs': [],\n", | |
" 'name': 'tools',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'octree'): {'deps': {'gpu_containers', 'cuda', 'common', 'gpu_utils'},\n", | |
" 'desc': 'Octree GPU',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_octree'],\n", | |
" 'name': 'gpu_octree',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'people'): {'deps': {'common',\n", | |
" 'cuda',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_utils',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search',\n", | |
" 'segmentation',\n", | |
" 'surface',\n", | |
" 'visualization'},\n", | |
" 'desc': 'Point cloud people library',\n", | |
" 'enabled_by_default': False,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_people'],\n", | |
" 'name': 'gpu_people',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'people', 'tools'): {'deps': {'vtk', 'cuda'},\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': False,\n", | |
" 'header_only': None,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': [],\n", | |
" 'name': 'tools',\n", | |
" 'opt_deps': {'openni'}},\n", | |
" ('gpu', 'segmentation'): {'deps': {'common',\n", | |
" 'cuda',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_octree',\n", | |
" 'gpu_utils'},\n", | |
" 'desc': 'Point cloud GPU segmentation library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_segmentation'],\n", | |
" 'name': 'gpu_segmentation',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'surface'): {'deps': {'common',\n", | |
" 'cuda',\n", | |
" 'geometry',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_utils'},\n", | |
" 'desc': 'Surface algorithms with GPU',\n", | |
" 'enabled_by_default': False,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_surface'],\n", | |
" 'name': 'gpu_surface',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'tracking'): {'deps': {'common',\n", | |
" 'cuda',\n", | |
" 'filters',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_octree',\n", | |
" 'gpu_utils',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search',\n", | |
" 'tracking'},\n", | |
" 'desc': 'Tracking with GPU',\n", | |
" 'enabled_by_default': False,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_tracking'],\n", | |
" 'name': 'gpu_tracking',\n", | |
" 'opt_deps': set()},\n", | |
" ('gpu', 'utils'): {'deps': {'gpu_containers', 'cuda', 'common'},\n", | |
" 'desc': 'Device layer functions.',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_gpu_utils'],\n", | |
" 'name': 'gpu_utils',\n", | |
" 'opt_deps': set()},\n", | |
" ('io',): {'deps': {'octree', 'common'},\n", | |
" 'desc': 'Point cloud IO library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_io_ply', 'pcl_io'],\n", | |
" 'name': 'io',\n", | |
" 'opt_deps': {'davidsdk',\n", | |
" 'dssdk',\n", | |
" 'ensenso',\n", | |
" 'fzapi',\n", | |
" 'libusb',\n", | |
" 'openni',\n", | |
" 'openni2',\n", | |
" 'pcap',\n", | |
" 'png',\n", | |
" 'rssdk',\n", | |
" 'rssdk2',\n", | |
" 'vtk'}},\n", | |
" ('kdtree',): {'deps': {'common'},\n", | |
" 'desc': 'Point cloud kd-tree library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_kdtree'],\n", | |
" 'name': 'kdtree',\n", | |
" 'opt_deps': {'flann'}},\n", | |
" ('keypoints',): {'deps': {'common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search'},\n", | |
" 'desc': 'Point cloud keypoints library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_keypoints'],\n", | |
" 'name': 'keypoints',\n", | |
" 'opt_deps': set()},\n", | |
" ('ml',): {'deps': {'common'},\n", | |
" 'desc': 'Point cloud machine learning library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_ml'],\n", | |
" 'name': 'ml',\n", | |
" 'opt_deps': set()},\n", | |
" ('octree',): {'deps': {'common'},\n", | |
" 'desc': 'Point cloud octree library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_octree'],\n", | |
" 'name': 'octree',\n", | |
" 'opt_deps': set()},\n", | |
" ('outofcore',): {'deps': {'common',\n", | |
" 'filters',\n", | |
" 'io',\n", | |
" 'octree',\n", | |
" 'visualization'},\n", | |
" 'desc': 'Point cloud outofcore library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_outofcore'],\n", | |
" 'name': 'outofcore',\n", | |
" 'opt_deps': set()},\n", | |
" ('outofcore', 'tools'): {'deps': {'vtk'},\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': False,\n", | |
" 'header_only': None,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': [],\n", | |
" 'name': 'tools',\n", | |
" 'opt_deps': set()},\n", | |
" ('people',): {'deps': {'common',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'sample_consensus',\n", | |
" 'search',\n", | |
" 'segmentation',\n", | |
" 'visualization',\n", | |
" 'vtk'},\n", | |
" 'desc': 'Point cloud people library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_people'],\n", | |
" 'name': 'people',\n", | |
" 'opt_deps': {'openni'}},\n", | |
" ('recognition',): {'deps': {'common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'ml',\n", | |
" 'octree',\n", | |
" 'registration',\n", | |
" 'sample_consensus',\n", | |
" 'search'},\n", | |
" 'desc': 'Point cloud recognition library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_recognition'],\n", | |
" 'name': 'recognition',\n", | |
" 'opt_deps': {'metslib'}},\n", | |
" ('registration',): {'deps': {'common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'sample_consensus',\n", | |
" 'search'},\n", | |
" 'desc': 'Point cloud registration library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_registration'],\n", | |
" 'name': 'registration',\n", | |
" 'opt_deps': set()},\n", | |
" ('sample_consensus',): {'deps': {'common', 'search'},\n", | |
" 'desc': 'Point cloud sample consensus library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_sample_consensus'],\n", | |
" 'name': 'sample_consensus',\n", | |
" 'opt_deps': set()},\n", | |
" ('search',): {'deps': {'common', 'octree', 'kdtree'},\n", | |
" 'desc': 'Point cloud generic search library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_search'],\n", | |
" 'name': 'search',\n", | |
" 'opt_deps': {'flann'}},\n", | |
" ('segmentation',): {'deps': {'common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'kdtree',\n", | |
" 'ml',\n", | |
" 'octree',\n", | |
" 'sample_consensus',\n", | |
" 'search'},\n", | |
" 'desc': 'Point cloud segmentation library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_segmentation'],\n", | |
" 'name': 'segmentation',\n", | |
" 'opt_deps': set()},\n", | |
" ('simulation',): {'deps': {'common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search',\n", | |
" 'surface',\n", | |
" 'visualization'},\n", | |
" 'desc': 'Point Cloud Library Simulation',\n", | |
" 'enabled_by_default': False,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_simulation'],\n", | |
" 'name': 'simulation',\n", | |
" 'opt_deps': {'opengl'}},\n", | |
" ('simulation', 'tools'): {'deps': set(),\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': False,\n", | |
" 'header_only': None,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_tools'],\n", | |
" 'name': 'tools',\n", | |
" 'opt_deps': {'opengl'}},\n", | |
" ('stereo',): {'deps': {'io', 'common'},\n", | |
" 'desc': 'Point cloud stereo library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_stereo'],\n", | |
" 'name': 'stereo',\n", | |
" 'opt_deps': set()},\n", | |
" ('surface',): {'deps': {'common', 'octree', 'kdtree', 'search'},\n", | |
" 'desc': 'Point cloud surface library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_surface'],\n", | |
" 'name': 'surface',\n", | |
" 'opt_deps': {'vtk', 'qhull'}},\n", | |
" ('tools',): {'deps': {'io'},\n", | |
" 'desc': 'Useful PCL-based command line tools',\n", | |
" 'enabled_by_default': False,\n", | |
" 'export_pkgconfig': False,\n", | |
" 'header_only': None,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': [],\n", | |
" 'name': 'tools',\n", | |
" 'opt_deps': {'davidsdk',\n", | |
" 'dssdk',\n", | |
" 'ensenso',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'kdtree',\n", | |
" 'keypoints',\n", | |
" 'ml',\n", | |
" 'octree',\n", | |
" 'openni',\n", | |
" 'openni2',\n", | |
" 'qhull',\n", | |
" 'recognition',\n", | |
" 'registration',\n", | |
" 'rssdk',\n", | |
" 'sample_consensus',\n", | |
" 'search',\n", | |
" 'segmentation',\n", | |
" 'surface',\n", | |
" 'visualization',\n", | |
" 'vtk'}},\n", | |
" ('tracking',): {'deps': {'common', 'filters', 'search', 'octree', 'kdtree'},\n", | |
" 'desc': 'Point cloud tracking library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_tracking'],\n", | |
" 'name': 'tracking',\n", | |
" 'opt_deps': set()},\n", | |
" ('visualization',): {'deps': {'common',\n", | |
" 'geometry',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search',\n", | |
" 'vtk'},\n", | |
" 'desc': 'Point cloud visualization library',\n", | |
" 'enabled_by_default': True,\n", | |
" 'export_pkgconfig': True,\n", | |
" 'header_only': False,\n", | |
" 'is_subcomponent': False,\n", | |
" 'libs': ['pcl_visualization'],\n", | |
" 'name': 'visualization',\n", | |
" 'opt_deps': {'davidsdk',\n", | |
" 'dssdk',\n", | |
" 'ensenso',\n", | |
" 'opengl',\n", | |
" 'openni',\n", | |
" 'openni2',\n", | |
" 'qvtk',\n", | |
" 'rssdk'}}}\n" | |
] | |
} | |
], | |
"source": [ | |
"props = {}\n", | |
"for cmake_file in cmakelists:\n", | |
" name = tuple(cmake_file.relative_to(source_path).parent.parts)\n", | |
" if name in [(\"cuda\",), (\"gpu\",)]:\n", | |
" continue\n", | |
" props[name] = read_props(cmake_file)\n", | |
" if \"gpu\" in name or \"cuda\" in name:\n", | |
" props[name][\"deps\"] |= {\"cuda\"}\n", | |
"props[(\"common\",)][\"deps\"] |= {\"boost\", \"eigen\"}\n", | |
"props[(\"io\",)][\"deps\"] -= {\"boost\", \"eigen\"}\n", | |
"pprint(props)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"id": "93c5fdad-f78e-4247-bdfd-b534991aeecf", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"[('2d', True),\n", | |
" ('common', True),\n", | |
" ('cuda_common', True),\n", | |
" ('cuda_features', True),\n", | |
" ('cuda_io', True),\n", | |
" ('cuda_sample_consensus', True),\n", | |
" ('cuda_segmentation', True),\n", | |
" ('features', True),\n", | |
" ('filters', True),\n", | |
" ('geometry', True),\n", | |
" ('gpu_containers', True),\n", | |
" ('gpu_features', True),\n", | |
" ('gpu_kinfu', True),\n", | |
" ('gpu_kinfu_large_scale', True),\n", | |
" ('gpu_octree', True),\n", | |
" ('gpu_people', False),\n", | |
" ('gpu_segmentation', True),\n", | |
" ('gpu_surface', False),\n", | |
" ('gpu_tracking', False),\n", | |
" ('gpu_utils', True),\n", | |
" ('io', True),\n", | |
" ('kdtree', True),\n", | |
" ('keypoints', True),\n", | |
" ('ml', True),\n", | |
" ('octree', True),\n", | |
" ('outofcore', True),\n", | |
" ('people', True),\n", | |
" ('recognition', True),\n", | |
" ('registration', True),\n", | |
" ('sample_consensus', True),\n", | |
" ('search', True),\n", | |
" ('segmentation', True),\n", | |
" ('simulation', False),\n", | |
" ('stereo', True),\n", | |
" ('surface', True),\n", | |
" ('tools', False),\n", | |
" ('tracking', True),\n", | |
" ('visualization', True)]" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Components to add options for\n", | |
"sorted({d[\"name\"]: d[\"enabled_by_default\"] for k, d in props.items() if \"apps\" not in k and k not in {(\"cuda\",), (\"gpu\",)}}.items())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"id": "736ef76f-13ef-4381-9487-15c4bcfdb858", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"root_components = {p[0] for p in props if len(p) == 1}\n", | |
"all_components = {d[\"name\"] for d in props.values()}\n", | |
"dep_map = {}\n", | |
"opt_dep_map = {}\n", | |
"int_dep_map = {}\n", | |
"int_opt_dep_map = {}\n", | |
"for name, d in props.items():\n", | |
" feat = {d[\"name\"]}\n", | |
" if d[\"name\"] == \"tools\":\n", | |
" feat = {name[0], \"tools\"}\n", | |
" elif \"apps\" in name:\n", | |
" feat = {name[0], \"apps\"}\n", | |
" feat = tuple(sorted(feat))\n", | |
" if feat not in dep_map:\n", | |
" dep_map[feat] = set()\n", | |
" if feat not in opt_dep_map:\n", | |
" opt_dep_map[feat] = set()\n", | |
" if feat not in int_dep_map:\n", | |
" int_dep_map[feat] = set()\n", | |
" if feat not in int_opt_dep_map:\n", | |
" int_opt_dep_map[feat] = set()\n", | |
" opt_dep_map[feat] |= d[\"opt_deps\"] - all_components\n", | |
" int_opt_dep_map[feat] |= d[\"opt_deps\"] & all_components\n", | |
" if len(name) > 1 and name[0] == \"apps\":\n", | |
" # All app deps are optional\n", | |
" opt_dep_map[feat] |= d[\"opt_deps\"] - all_components\n", | |
" int_opt_dep_map[feat] |= d[\"opt_deps\"] & all_components\n", | |
" else:\n", | |
" dep_map[feat] |= d[\"deps\"] - all_components\n", | |
" int_dep_map[feat] |= d[\"deps\"] & all_components" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"id": "3e777015-f664-4f16-a5f2-28da58fb7676", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['boost',\n", | |
" 'cuda',\n", | |
" 'davidsdk',\n", | |
" 'dssdk',\n", | |
" 'eigen',\n", | |
" 'ensenso',\n", | |
" 'flann',\n", | |
" 'fzapi',\n", | |
" 'libusb',\n", | |
" 'metslib',\n", | |
" 'opencv',\n", | |
" 'opengl',\n", | |
" 'openni',\n", | |
" 'openni2',\n", | |
" 'pcap',\n", | |
" 'png',\n", | |
" 'qhull',\n", | |
" 'qt',\n", | |
" 'qvtk',\n", | |
" 'rssdk',\n", | |
" 'rssdk2',\n", | |
" 'vtk']" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# All external deps\n", | |
"all_deps = set()\n", | |
"for deps in dep_map.values():\n", | |
" all_deps |= deps\n", | |
"for deps in opt_dep_map.values():\n", | |
" all_deps |= deps\n", | |
"sorted(all_deps)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"id": "62fea229-c7aa-421c-b6b7-7f90a9c3fc7a", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"{'common': ['boost', 'eigen'],\n", | |
" 'cuda_common': ['cuda'],\n", | |
" 'cuda_features': ['cuda'],\n", | |
" 'cuda_io': ['cuda', 'openni'],\n", | |
" 'cuda_sample_consensus': ['cuda'],\n", | |
" 'cuda_segmentation': ['cuda'],\n", | |
" 'gpu_containers': ['cuda'],\n", | |
" 'gpu_features': ['cuda'],\n", | |
" 'gpu_kinfu': ['cuda'],\n", | |
" 'gpu_kinfu_large_scale': ['cuda'],\n", | |
" 'gpu_octree': ['cuda'],\n", | |
" 'gpu_people': ['cuda'],\n", | |
" 'gpu_segmentation': ['cuda'],\n", | |
" 'gpu_surface': ['cuda'],\n", | |
" 'gpu_tracking': ['cuda'],\n", | |
" 'gpu_utils': ['cuda'],\n", | |
" 'people': ['vtk'],\n", | |
" 'visualization': ['vtk']}\n" | |
] | |
} | |
], | |
"source": [ | |
"# Required external deps by component\n", | |
"pprint({k[0]: sorted(v) for k, v in dep_map.items() if v if v if \"apps\" not in k and \"tools\" not in k})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"id": "8d9c7380-1dc7-4097-9c1f-d0c1a045f223", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"{'2d': ['vtk'],\n", | |
" 'common': ['boost', 'eigen'],\n", | |
" 'io': ['davidsdk',\n", | |
" 'dssdk',\n", | |
" 'ensenso',\n", | |
" 'fzapi',\n", | |
" 'libusb',\n", | |
" 'openni',\n", | |
" 'openni2',\n", | |
" 'pcap',\n", | |
" 'png',\n", | |
" 'rssdk',\n", | |
" 'rssdk2',\n", | |
" 'vtk'],\n", | |
" 'kdtree': ['flann'],\n", | |
" 'people': ['openni'],\n", | |
" 'recognition': ['metslib'],\n", | |
" 'search': ['flann'],\n", | |
" 'simulation': ['opengl'],\n", | |
" 'surface': ['qhull', 'vtk'],\n", | |
" 'visualization': ['davidsdk',\n", | |
" 'dssdk',\n", | |
" 'ensenso',\n", | |
" 'opengl',\n", | |
" 'openni',\n", | |
" 'openni2',\n", | |
" 'qvtk',\n", | |
" 'rssdk']}\n" | |
] | |
} | |
], | |
"source": [ | |
"# Optional external deps by component\n", | |
"pprint({k[0]: sorted(v) for k, v in opt_dep_map.items() if v if \"apps\" not in k and \"tools\" not in k})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"id": "9e2eed03-040c-4102-897d-9d0869aa77af", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"{'2d': ['common', 'filters'],\n", | |
" 'cuda_features': ['common', 'cuda_common', 'io'],\n", | |
" 'cuda_io': ['common', 'cuda_common', 'io'],\n", | |
" 'cuda_sample_consensus': ['common', 'cuda_common', 'io'],\n", | |
" 'cuda_segmentation': ['common', 'cuda_common', 'io'],\n", | |
" 'features': ['2d', 'common', 'filters', 'kdtree', 'octree', 'search'],\n", | |
" 'filters': ['common', 'kdtree', 'octree', 'sample_consensus', 'search'],\n", | |
" 'geometry': ['common'],\n", | |
" 'gpu_containers': ['common'],\n", | |
" 'gpu_features': ['common',\n", | |
" 'geometry',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_octree',\n", | |
" 'gpu_utils'],\n", | |
" 'gpu_kinfu': ['common', 'geometry', 'gpu_containers', 'io', 'search'],\n", | |
" 'gpu_kinfu_large_scale': ['common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_utils',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search',\n", | |
" 'surface'],\n", | |
" 'gpu_octree': ['common', 'gpu_containers', 'gpu_utils'],\n", | |
" 'gpu_people': ['common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_utils',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search',\n", | |
" 'segmentation',\n", | |
" 'surface',\n", | |
" 'visualization'],\n", | |
" 'gpu_segmentation': ['common', 'gpu_containers', 'gpu_octree', 'gpu_utils'],\n", | |
" 'gpu_surface': ['common', 'geometry', 'gpu_containers', 'gpu_utils'],\n", | |
" 'gpu_tracking': ['common',\n", | |
" 'filters',\n", | |
" 'gpu_containers',\n", | |
" 'gpu_octree',\n", | |
" 'gpu_utils',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search',\n", | |
" 'tracking'],\n", | |
" 'gpu_utils': ['common', 'gpu_containers'],\n", | |
" 'io': ['common', 'octree'],\n", | |
" 'kdtree': ['common'],\n", | |
" 'keypoints': ['common', 'features', 'filters', 'kdtree', 'octree', 'search'],\n", | |
" 'ml': ['common'],\n", | |
" 'octree': ['common'],\n", | |
" 'outofcore': ['common', 'filters', 'io', 'octree', 'visualization'],\n", | |
" 'people': ['common',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'sample_consensus',\n", | |
" 'search',\n", | |
" 'segmentation',\n", | |
" 'visualization'],\n", | |
" 'recognition': ['common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'ml',\n", | |
" 'octree',\n", | |
" 'registration',\n", | |
" 'sample_consensus',\n", | |
" 'search'],\n", | |
" 'registration': ['common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'sample_consensus',\n", | |
" 'search'],\n", | |
" 'sample_consensus': ['common', 'search'],\n", | |
" 'search': ['common', 'kdtree', 'octree'],\n", | |
" 'segmentation': ['common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'kdtree',\n", | |
" 'ml',\n", | |
" 'octree',\n", | |
" 'sample_consensus',\n", | |
" 'search'],\n", | |
" 'simulation': ['common',\n", | |
" 'features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'io',\n", | |
" 'kdtree',\n", | |
" 'octree',\n", | |
" 'search',\n", | |
" 'surface',\n", | |
" 'visualization'],\n", | |
" 'stereo': ['common', 'io'],\n", | |
" 'surface': ['common', 'kdtree', 'octree', 'search'],\n", | |
" 'tracking': ['common', 'filters', 'kdtree', 'octree', 'search'],\n", | |
" 'visualization': ['common', 'geometry', 'io', 'kdtree', 'octree', 'search']}\n" | |
] | |
} | |
], | |
"source": [ | |
"# Required internal deps by component\n", | |
"pprint({k[0]: sorted(v) for k, v in int_dep_map.items() if v if \"apps\" not in k and \"tools\" not in k})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"id": "0aa99b44-dc8a-47e4-8d06-1972510ac311", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"{('tools',): ['features',\n", | |
" 'filters',\n", | |
" 'geometry',\n", | |
" 'kdtree',\n", | |
" 'keypoints',\n", | |
" 'ml',\n", | |
" 'octree',\n", | |
" 'recognition',\n", | |
" 'registration',\n", | |
" 'sample_consensus',\n", | |
" 'search',\n", | |
" 'segmentation',\n", | |
" 'surface',\n", | |
" 'visualization']}\n" | |
] | |
} | |
], | |
"source": [ | |
"# Required internal deps by component\n", | |
"pprint({k: sorted(v) for k, v in int_opt_dep_map.items() if v})" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"id": "34f90c4b-2242-46f4-940f-c233c1dd3627", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"['cuda', 'libusb', 'opengl', 'openni', 'png', 'qhull', 'qt', 'qvtk', 'vtk'] ['2d', 'common', 'cuda_common', 'cuda_features', 'cuda_io', 'cuda_sample_consensus', 'cuda_segmentation', 'features', 'filters', 'geometry', 'io', 'kdtree', 'keypoints', 'ml', 'octree', 'recognition', 'registration', 'sample_consensus', 'search', 'segmentation', 'stereo', 'surface', 'tracking', 'visualization']\n", | |
"['cuda', 'davidsdk', 'dssdk', 'ensenso', 'opencv', 'opengl', 'openni', 'openni2', 'qhull', 'rssdk', 'vtk'] ['features', 'filters', 'geometry', 'gpu_kinfu', 'gpu_kinfu_large_scale', 'io', 'kdtree', 'keypoints', 'ml', 'octree', 'recognition', 'registration', 'sample_consensus', 'search', 'segmentation', 'surface', 'visualization']\n" | |
] | |
} | |
], | |
"source": [ | |
"apps_ext_opt_deps = set()\n", | |
"apps_int_opt_deps = set()\n", | |
"tools_ext_opt_deps = set()\n", | |
"tools_int_opt_deps = set()\n", | |
"for k, v in dep_map.items():\n", | |
" if \"apps\" in k:\n", | |
" apps_ext_opt_deps |= v\n", | |
"for k, v in opt_dep_map.items():\n", | |
" if \"apps\" in k:\n", | |
" apps_ext_opt_deps |= v\n", | |
"for k, v in int_dep_map.items():\n", | |
" if \"apps\" in k:\n", | |
" apps_int_opt_deps |= v\n", | |
"for k, v in int_opt_dep_map.items():\n", | |
" if \"apps\" in k:\n", | |
" apps_int_opt_deps |= v\n", | |
" \n", | |
"for k, v in dep_map.items():\n", | |
" if \"tools\" in k:\n", | |
" tools_ext_opt_deps |= v\n", | |
"for k, v in opt_dep_map.items():\n", | |
" if \"tools\" in k:\n", | |
" tools_ext_opt_deps |= v\n", | |
"for k, v in int_dep_map.items():\n", | |
" if \"tools\" in k:\n", | |
" tools_int_opt_deps |= v\n", | |
"for k, v in int_opt_dep_map.items():\n", | |
" if \"tools\" in k:\n", | |
" tools_int_opt_deps |= v\n", | |
"\n", | |
"print(sorted(apps_ext_opt_deps), sorted(apps_int_opt_deps))\n", | |
"print(sorted(tools_ext_opt_deps), sorted(tools_int_opt_deps))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"id": "2f48ee50-b816-442a-a699-3f68d21c8890", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'2d', 'cuda_common', 'geometry'}" | |
] | |
}, | |
"execution_count": 13, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# All header-only components\n", | |
"{d[\"name\"] for path, d in props.items() if d[\"header_only\"]}" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"id": "f7a49918-1408-4322-aa98-328a9153c3b2", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"{'cloud_composer': {'pcl_cc_tool_interface'}, 'io': {'pcl_io_ply'}}" | |
] | |
}, | |
"execution_count": 14, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# All extra libs\n", | |
"extra_libs = {d[\"name\"]: set(d[\"libs\"]) - {f\"pcl_{d['name']}\"} for path, d in props.items()}\n", | |
"{k: v for k, v in extra_libs.items() if v}" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "6f4dcd94-8a11-44f3-b109-6094bd3ab996", | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3 (ipykernel)", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.8.10" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment