Giter VIP home page Giter VIP logo

Comments (20)

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

Hi @RamanaBotta, welcome to the project :)
Just with the make install log I don't have enough data to debug the problem. Could you please remove the build folder, create a new one, enter into the new build folder and show me the results of: cmake -DBUILD_PYTHON=ON ..?

from fields2cover.

RamanaBotta avatar RamanaBotta commented on June 8, 2024

Hi @Gonzalo-Mier, Thank you. This project is amazing. Thank you so much for open-sourcing it.

Following are logs are of Compilation with python interface(https://github.com/Fields2Cover/Fields2Cover#compilation-with-python-interface)

 $ cmake -DBUILD_PYTHON=ON ..
-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using the single-header code from /home/boson/Fields2Cover/build/_deps/json-src/single_include/
-- The C compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter Development 
-- Found Python3: /home/boson/.local/lib/python3.8/site-packages/numpy/core/include (found version "3.8.10") found components: NumPy Interpreter Development 
-- Found GDAL: /usr/lib/libgdal.so (found suitable version "3.3.2", minimum required is "3.0") 
-- Found SWIG: /usr/bin/swig4.0 (found version "4.0.1") 
-- Found Python: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter Development 
-- Found GTest: /usr/lib/x86_64-linux-gnu/libgtest.a  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/boson/Fields2Cover/build
$ make -j$(nproc);
Scanning dependencies of target steering_functions
Scanning dependencies of target fields2cover_python_swig_compilation
Scanning dependencies of target tinyxml2
[  1%] Building CXX object _deps/tinyxml2-build/CMakeFiles/tinyxml2.dir/tinyxml2.cpp.o
[  1%] Swig compile ../Fields2Cover.i for python
[  2%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/dubins_state_space/dubins_state_space.cpp.o
[  3%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/utilities/utilities.cpp.o
[  4%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/cc00_dubins_state_space.cpp.o
[  5%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/reeds_shepp_state_space/reeds_shepp_state_space.cpp.o
[  7%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/cc00_reeds_shepp_state_space.cpp.o
[  7%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/cc_dubins_state_space.cpp.o
[  8%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/cc0pm_dubins_state_space.cpp.o
[  8%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/ccpmpm_dubins_state_space.cpp.o
[  9%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/ccpm0_dubins_state_space.cpp.o
[ 11%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/hc_cc_circle.cpp.o
[ 11%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/configuration.cpp.o
[ 11%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/hc00_reeds_shepp_state_space.cpp.o
[ 12%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/hc_cc_state_space.cpp.o
[ 13%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/hc0pm_reeds_shepp_state_space.cpp.o
[ 14%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/hc_reeds_shepp_state_space.cpp.o
[ 14%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/hcpm0_reeds_shepp_state_space.cpp.o
[ 15%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/hcpmpm_reeds_shepp_state_space.cpp.o
[ 16%] Building CXX object _deps/steering_functions-build/CMakeFiles/steering_functions.dir/src/hc_cc_state_space/paths.cpp.o
[ 16%] Linking CXX static library libtinyxml2.a
[ 16%] Built target tinyxml2
Scanning dependencies of target xmltest
[ 17%] Building CXX object _deps/tinyxml2-build/CMakeFiles/xmltest.dir/xmltest.cpp.o
/home/boson/Fields2Cover/build/_deps/tinyxml2-src/xmltest.cpp: In function β€˜int main(int, const char**)’:
/home/boson/Fields2Cover/build/_deps/tinyxml2-src/xmltest.cpp:711:10: warning: ignoring return value of β€˜char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
  711 |     fgets( savedBuf, 256, saved );
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/boson/Fields2Cover/build/_deps/tinyxml2-src/xmltest.cpp:1195:9: warning: ignoring return value of β€˜char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
 1195 |    fgets( buf, 1024, textfile );
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
[ 18%] Linking CXX static library libsteering_functions.a
[ 18%] Built target steering_functions
Scanning dependencies of target Fields2Cover
[ 19%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/direct_dist_path_obj.cpp.o
[ 21%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/path_length.cpp.o
[ 22%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/n_swath.cpp.o
[ 22%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/headland_generator/constant_headland.cpp.o
[ 24%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/field_coverage.cpp.o
[ 23%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/overlaps.cpp.o
[ 24%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/hg_objective.cpp.o
[ 25%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/pp_objective.cpp.o
[ 26%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/rem_area.cpp.o
[ 26%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/rp_objective.cpp.o
[ 27%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/swath_length.cpp.o
[ 28%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/path_planning/dubins_curves.cpp.o
[ 29%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/objectives/sg_objective.cpp.o
[ 29%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/path_planning/dubins_curves_cc.cpp.o
[ 30%] Linking CXX executable xmltest
[ 30%] Built target xmltest
[ 31%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/path_planning/path_planning.cpp.o
[ 32%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/path_planning/reeds_shepp_curves.cpp.o
[ 33%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/path_planning/reeds_shepp_curves_hc.cpp.o
[ 34%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/path_planning/turning_base.cpp.o
[ 35%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/route_planning/boustrophedon_order.cpp.o
[ 35%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/route_planning/custom_order.cpp.o
[ 36%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/route_planning/single_cell_swaths_order_base.cpp.o
[ 37%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/route_planning/snake_order.cpp.o
[ 38%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/route_planning/spiral_order.cpp.o
[ 39%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/swath_generator/brute_force.cpp.o
[ 39%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/Cell.cpp.o
[ 40%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/Cells.cpp.o
[ 41%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/Field.cpp.o
[ 42%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/LineString.cpp.o
[ 43%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/LinearRing.cpp.o
[ 43%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/MultiLineString.cpp.o
[ 44%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/MultiPoint.cpp.o
[ 45%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/Path.cpp.o
[ 46%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/Point.cpp.o
[ 46%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/Strip.cpp.o
[ 47%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/Route.cpp.o
[ 48%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/Swath.cpp.o
[ 49%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/types/Swaths.cpp.o
[ 50%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/utils/parser.cpp.o
[ 51%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/utils/random.cpp.o
[ 51%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/utils/transformation.cpp.o
[ 52%] Building CXX object CMakeFiles/Fields2Cover.dir/src/fields2cover/utils/visualizer.cpp.o
[ 52%] Built target fields2cover_python_swig_compilation
[ 53%] Linking CXX shared library lib/libFields2Cover.so
[ 53%] Built target Fields2Cover
Scanning dependencies of target 4_swath_generator_tutorial
Scanning dependencies of target 3_headland_generator_tutorial
Scanning dependencies of target 1_basic_types_tutorial
Scanning dependencies of target 5_route_planning_tutorial
Scanning dependencies of target 6_path_planning_tutorial
Scanning dependencies of target fields2cover_python
Scanning dependencies of target 2_objective_functions_tutorial
Scanning dependencies of target unittests
[ 53%] Building CXX object tutorials/CMakeFiles/1_basic_types_tutorial.dir/1_basic_types.cpp.o
[ 54%] Building CXX object tutorials/CMakeFiles/4_swath_generator_tutorial.dir/4_swath_generator.cpp.o
[ 55%] Building CXX object tutorials/CMakeFiles/5_route_planning_tutorial.dir/5_route_planning.cpp.o
[ 56%] Building CXX object tutorials/CMakeFiles/3_headland_generator_tutorial.dir/3_headland_generator.cpp.o
[ 57%] Building CXX object tutorials/CMakeFiles/2_objective_functions_tutorial.dir/2_objective_functions.cpp.o
[ 57%] Building CXX object tutorials/CMakeFiles/6_path_planning_tutorial.dir/6_path_planning.cpp.o
[ 58%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/headland_generator/const_hl_test.cpp.o
[ 60%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/complete_turn_path_obj_test.cpp.o
[ 60%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/field_coverage_test.cpp.o
[ 61%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/direct_dist_path_obj_test.cpp.o
[ 61%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/n_swath_test.cpp.o
[ 63%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/pp_obj_test.cpp.o
[ 63%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/overlaps_test.cpp.o
[ 64%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/path_length_test.cpp.o
[ 65%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/rem_area_test.cpp.o
[ 66%] Building CXX object swig/python/CMakeFiles/fields2cover_python.dir/CMakeFiles/fields2cover_python.dir/Fields2CoverPYTHON_wrap.cxx.o
[ 66%] Linking CXX executable 3_headland_generator_tutorial
[ 67%] Linking CXX executable 1_basic_types_tutorial
[ 68%] Linking CXX executable 2_objective_functions_tutorial
[ 69%] Linking CXX executable 4_swath_generator_tutorial
[ 69%] Built target 3_headland_generator_tutorial
[ 69%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/rp_obj_test.cpp.o
[ 70%] Linking CXX executable 6_path_planning_tutorial
[ 70%] Built target 1_basic_types_tutorial
[ 70%] Built target 2_objective_functions_tutorial
[ 71%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/sg_obj_test.cpp.o
[ 72%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/objectives/swath_length_test.cpp.o
[ 72%] Built target 4_swath_generator_tutorial
[ 73%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/path_planning/dubins_cc_test.cpp.o
[ 74%] Linking CXX executable 5_route_planning_tutorial
[ 75%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/path_planning/dubins_test.cpp.o
[ 75%] Built target 6_path_planning_tutorial
[ 76%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/path_planning/path_planning_test.cpp.o
[ 76%] Built target 5_route_planning_tutorial
[ 76%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/path_planning/reeds_shepp_hc_test.cpp.o
[ 77%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/path_planning/reeds_shepp_test.cpp.o
[ 78%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/route_planning/boustrophedon_order_test.cpp.o
[ 79%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/route_planning/custom_order.cpp.o
[ 80%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/route_planning/snake_order_test.cpp.o
[ 80%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/route_planning/spiral_order_test.cpp.o
[ 81%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/swath_generator/brute_force_test.cpp.o
[ 82%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Cell_test.cpp.o
[ 83%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Cells_test.cpp.o
[ 84%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Field_test.cpp.o
[ 84%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Geometries_test.cpp.o
[ 85%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Geometry_test.cpp.o
[ 86%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/LineString_test.cpp.o
[ 87%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/LinearRing_test.cpp.o
[ 88%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/MultiLineString_test.cpp.o
[ 88%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/MultiPoint_test.cpp.o
[ 89%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Path_test.cpp.o
[ 90%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Point_test.cpp.o
[ 91%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Robot_test.cpp.o
[ 92%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Route_test.cpp.o
[ 92%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Strip_test.cpp.o
[ 93%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Swath_test.cpp.o
[ 94%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/types/Swaths_test.cpp.o
[ 95%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/utils/parser_test.cpp.o
[ 96%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/utils/random_test.cpp.o
[ 96%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/utils/transform_test.cpp.o
[ 97%] Building CXX object tests/CMakeFiles/unittests.dir/cpp/utils/visualizer_test.cpp.o
[ 98%] Building CXX object tests/CMakeFiles/unittests.dir/unittests.cpp.o
[ 99%] Linking CXX executable unittests
[ 99%] Built target unittests
[100%] Linking CXX shared module ../../lib/_fields2cover_python.so
[100%] Built target fields2cover_python
$ sudo make install;
[ 16%] Built target steering_functions
[ 17%] Built target tinyxml2
[ 51%] Built target Fields2Cover
[ 53%] Built target xmltest
[ 54%] Built target 1_basic_types_tutorial
[ 56%] Built target 4_swath_generator_tutorial
[ 57%] Built target 3_headland_generator_tutorial
[ 59%] Built target 5_route_planning_tutorial
[ 60%] Built target 6_path_planning_tutorial
[ 62%] Built target 2_objective_functions_tutorial
[ 62%] Built target fields2cover_python_swig_compilation
[ 64%] Built target fields2cover_python
[100%] Built target unittests
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libtinyxml2.a
-- Installing: /usr/local/lib/cmake/tinyxml2/tinyxml2-static-targets.cmake
-- Installing: /usr/local/lib/cmake/tinyxml2/tinyxml2-static-targets-release.cmake
-- Up-to-date: /usr/local/lib/cmake/tinyxml2/tinyxml2-config.cmake
-- Installing: /usr/local/lib/cmake/tinyxml2/tinyxml2-config-version.cmake
-- Up-to-date: /usr/local/include/tinyxml2.h
-- Installing: /usr/local/lib/pkgconfig/tinyxml2.pc
-- Installing: /usr/local/lib/libsteering_functions.a
-- Installing: /usr/local/cmake/spline/splineTargets.cmake
-- Installing: /usr/local/cmake/spline/splineConfig.cmake
-- Installing: /usr/local/include/spline.h
-- Installing: /usr/local/cmake/matplotlib_cpp/matplotlib_cppTargets.cmake
-- Installing: /usr/local/cmake/matplotlib_cpp/matplotlib_cppConfig.cmake
-- Installing: /usr/local/include/matplotlibcpp.h
-- Installing: /usr/local/lib/libFields2Cover.so
-- Up-to-date: /usr/local/include/fields2cover.h
-- Installing: /usr/local/cmake/fields2cover/Fields2CoverTargets.cmake
-- Installing: /usr/local/cmake/fields2cover/Fields2CoverTargets-release.cmake
-- Installing: /usr/local/cmake/fields2cover/Fields2CoverConfig.cmake
-- Installing: /usr/local/cmake/fields2cover/Fields2CoverConfigVersion.cmake
-- Up-to-date: /usr/local/share/Fields2Cover/package.xml
-- Up-to-date: /usr/local/include
-- Up-to-date: /usr/local/include/fields2cover
-- Up-to-date: /usr/local/include/fields2cover/objectives
-- Up-to-date: /usr/local/include/fields2cover/objectives/overlaps.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/complete_turn_path_obj.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/field_coverage.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/direct_dist_path_obj.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/n_swath.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/sg_objective.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/path_length.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/pp_objective.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/rp_objective.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/base_objective.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/hg_objective.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/rem_area.h
-- Up-to-date: /usr/local/include/fields2cover/objectives/swath_length.h
-- Up-to-date: /usr/local/include/fields2cover/route_planning
-- Up-to-date: /usr/local/include/fields2cover/route_planning/boustrophedon_order.h
-- Up-to-date: /usr/local/include/fields2cover/route_planning/single_cell_swaths_order_base.h
-- Up-to-date: /usr/local/include/fields2cover/route_planning/custom_order.h
-- Up-to-date: /usr/local/include/fields2cover/route_planning/spiral_order.h
-- Up-to-date: /usr/local/include/fields2cover/route_planning/snake_order.h
-- Up-to-date: /usr/local/include/fields2cover/types
-- Up-to-date: /usr/local/include/fields2cover/types/Point.h
-- Up-to-date: /usr/local/include/fields2cover/types/Robot.h
-- Up-to-date: /usr/local/include/fields2cover/types/Swaths.h
-- Up-to-date: /usr/local/include/fields2cover/types/LineString.h
-- Up-to-date: /usr/local/include/fields2cover/types/LinearRing.h
-- Up-to-date: /usr/local/include/fields2cover/types/Geometry_impl.hpp
-- Up-to-date: /usr/local/include/fields2cover/types/Swath.h
-- Up-to-date: /usr/local/include/fields2cover/types/Cell.h
-- Up-to-date: /usr/local/include/fields2cover/types/Geometries.h
-- Up-to-date: /usr/local/include/fields2cover/types/MultiPoint.h
-- Up-to-date: /usr/local/include/fields2cover/types/MultiLineString.h
-- Up-to-date: /usr/local/include/fields2cover/types/Route.h
-- Up-to-date: /usr/local/include/fields2cover/types/Field.h
-- Up-to-date: /usr/local/include/fields2cover/types/Geometries_impl.hpp
-- Up-to-date: /usr/local/include/fields2cover/types/OptimizationParams.h
-- Up-to-date: /usr/local/include/fields2cover/types/Geometry.h
-- Up-to-date: /usr/local/include/fields2cover/types/Strip.h
-- Up-to-date: /usr/local/include/fields2cover/types/Cells.h
-- Up-to-date: /usr/local/include/fields2cover/types/Path.h
-- Up-to-date: /usr/local/include/fields2cover/swath_generator
-- Up-to-date: /usr/local/include/fields2cover/swath_generator/swath_generator_base_impl.hpp
-- Up-to-date: /usr/local/include/fields2cover/swath_generator/swath_generator_base.h
-- Up-to-date: /usr/local/include/fields2cover/swath_generator/brute_force.h
-- Up-to-date: /usr/local/include/fields2cover/path_planning
-- Up-to-date: /usr/local/include/fields2cover/path_planning/reeds_shepp_curves.h
-- Up-to-date: /usr/local/include/fields2cover/path_planning/turning_base.h
-- Up-to-date: /usr/local/include/fields2cover/path_planning/dubins_curves_cc.h
-- Up-to-date: /usr/local/include/fields2cover/path_planning/reeds_shepp_curves_hc.h
-- Up-to-date: /usr/local/include/fields2cover/path_planning/path_planning.h
-- Up-to-date: /usr/local/include/fields2cover/path_planning/dubins_curves.h
-- Up-to-date: /usr/local/include/fields2cover/path_planning/steer_to_path.hpp
-- Up-to-date: /usr/local/include/fields2cover/headland_generator
-- Up-to-date: /usr/local/include/fields2cover/headland_generator/constant_headland.h
-- Up-to-date: /usr/local/include/fields2cover/headland_generator/headland_generator_base.h
-- Up-to-date: /usr/local/include/fields2cover/utils
-- Up-to-date: /usr/local/include/fields2cover/utils/visualizer.h
-- Up-to-date: /usr/local/include/fields2cover/utils/transformation.h
-- Up-to-date: /usr/local/include/fields2cover/utils/random.h
-- Up-to-date: /usr/local/include/fields2cover/utils/parser.h
-- Up-to-date: /usr/local/include/fields2cover/types.h
-- Up-to-date: /usr/local/include/fields2cover.h
running install
/usr/local/lib/python3.8/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
$ python3
Python 3.8.10 (default, Nov 14 2022, 12:59:47) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fields2cover
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'fields2cover'
$ pytest-3 tests/python/
/home/boson/.local/lib/python3.8/site-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 1.13.1-unknown is an invalid version and will not be supported in a future release
  warnings.warn(
/home/boson/.local/lib/python3.8/site-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(
/home/boson/.local/lib/python3.8/site-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 0.3.11py3 is an invalid version and will not be supported in a future release
  warnings.warn(
/home/boson/.local/lib/python3.8/site-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(
=========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.8.10, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
rootdir: /home/boson/Fields2Cover
plugins: mock-1.10.4, cov-2.8.1, colcon-core-0.11.0, timeout-1.3.3, rerunfailures-10.3, anyio-3.4.0, repeat-0.9.1
collected 0 items / 37 errors                                                                                                                                                                             

================================================================================================= ERRORS ==================================================================================================
____________________________________________________________________________ ERROR collecting tests/python/import_f2c_test.py _____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/import_f2c_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/import_f2c_test.py:9: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________ ERROR collecting tests/python/headland_generator/const_hl_test.py ____________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/headland_generator/const_hl_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/headland_generator/const_hl_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_________________________________________________________________ ERROR collecting tests/python/objectives/complete_turn_path_obj_test.py _________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/objectives/complete_turn_path_obj_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/objectives/complete_turn_path_obj_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
__________________________________________________________________ ERROR collecting tests/python/objectives/direct_dist_path_obj_test.py __________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/objectives/direct_dist_path_obj_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/objectives/direct_dist_path_obj_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_____________________________________________________________________ ERROR collecting tests/python/objectives/field_coverage_test.py _____________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/objectives/field_coverage_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/objectives/field_coverage_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
________________________________________________________________________ ERROR collecting tests/python/objectives/n_swath_test.py _________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/objectives/n_swath_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/objectives/n_swath_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
________________________________________________________________________ ERROR collecting tests/python/objectives/overlaps_test.py ________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/objectives/overlaps_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/objectives/overlaps_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
______________________________________________________________________ ERROR collecting tests/python/objectives/swath_length_test.py ______________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/objectives/swath_length_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/objectives/swath_length_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
______________________________________________________________________ ERROR collecting tests/python/path_planning/dubins_cc_test.py ______________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/path_planning/dubins_cc_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/path_planning/dubins_cc_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_______________________________________________________________________ ERROR collecting tests/python/path_planning/dubins_test.py ________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/path_planning/dubins_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/path_planning/dubins_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________ ERROR collecting tests/python/path_planning/path_planning_test.py ____________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/path_planning/path_planning_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/path_planning/path_planning_test.py:9: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
___________________________________________________________________ ERROR collecting tests/python/path_planning/reeds_shepp_hc_test.py ____________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/path_planning/reeds_shepp_hc_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/path_planning/reeds_shepp_hc_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_____________________________________________________________________ ERROR collecting tests/python/path_planning/reeds_shepp_test.py _____________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/path_planning/reeds_shepp_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/path_planning/reeds_shepp_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
________________________________________________________________ ERROR collecting tests/python/route_planning/boustrophedon_order_test.py _________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/route_planning/boustrophedon_order_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/route_planning/boustrophedon_order_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________ ERROR collecting tests/python/route_planning/custom_order_test.py ____________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/route_planning/custom_order_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/route_planning/custom_order_test.py:2: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________ ERROR collecting tests/python/route_planning/snake_order_test.py _____________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/route_planning/snake_order_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/route_planning/snake_order_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________ ERROR collecting tests/python/route_planning/spiral_order_test.py ____________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/route_planning/spiral_order_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/route_planning/spiral_order_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________ ERROR collecting tests/python/swath_generator/brute_force_test.py ____________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/swath_generator/brute_force_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/swath_generator/brute_force_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________________ ERROR collecting tests/python/types/Cell_test.py _____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Cell_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Cell_test.py:9: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________________ ERROR collecting tests/python/types/Cells_test.py ____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Cells_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Cells_test.py:9: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________________ ERROR collecting tests/python/types/Field_test.py ____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Field_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Field_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_________________________________________________________________________ ERROR collecting tests/python/types/Geometries_test.py __________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Geometries_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Geometries_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
__________________________________________________________________________ ERROR collecting tests/python/types/Geometry_test.py ___________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Geometry_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Geometry_test.py:9: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_________________________________________________________________________ ERROR collecting tests/python/types/LineString_test.py __________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/LineString_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/LineString_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_________________________________________________________________________ ERROR collecting tests/python/types/LinearRing_test.py __________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/LinearRing_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/LinearRing_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_______________________________________________________________________ ERROR collecting tests/python/types/MultiLineString_test.py _______________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/MultiLineString_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/MultiLineString_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_________________________________________________________________________ ERROR collecting tests/python/types/MultiPoint_test.py __________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/MultiPoint_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/MultiPoint_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________________ ERROR collecting tests/python/types/Path_test.py _____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Path_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Path_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________________ ERROR collecting tests/python/types/Point_test.py ____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Point_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Point_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________________ ERROR collecting tests/python/types/Robot_test.py ____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Robot_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Robot_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________________ ERROR collecting tests/python/types/Route_test.py ____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Route_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Route_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
____________________________________________________________________________ ERROR collecting tests/python/types/Swath_test.py ____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Swath_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Swath_test.py:9: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
___________________________________________________________________________ ERROR collecting tests/python/types/Swaths_test.py ____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/types/Swaths_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/types/Swaths_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_________________________________________________________________________ ERROR collecting tests/python/utils/geometryOp_test.py __________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/utils/geometryOp_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/utils/geometryOp_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
___________________________________________________________________________ ERROR collecting tests/python/utils/parser_test.py ____________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/utils/parser_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/utils/parser_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
__________________________________________________________________________ ERROR collecting tests/python/utils/transform_test.py __________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/utils/transform_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/utils/transform_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
_________________________________________________________________________ ERROR collecting tests/python/utils/visualizer_test.py __________________________________________________________________________
ImportError while importing test module '/home/boson/Fields2Cover/tests/python/utils/visualizer_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/python/utils/visualizer_test.py:8: in <module>
    import fields2cover as f2c
E   ModuleNotFoundError: No module named 'fields2cover'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 37 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================================== 37 error in 1.02 seconds =========================================================================================

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

On the configuration, cmake gets your local Python version.

-- Found Python3: /home/boson/.local/lib/python3.8/site-packages/numpy/core/include (found version "3.8.10") found components: NumPy Interpreter Development

And I have something like:

-- Found Python3: /usr/include/python3.8 (found version "3.8.10") found components: NumPy Interpreter Development.Module

This is the only difference I have found, but not sure if that's the reason.

You can install the library manually from build/swig/python running sudo python3 setup.py install. Tell me if that works for you :)

from fields2cover.

xluo6688 avatar xluo6688 commented on June 8, 2024

Hello @Gonzalo-Mier, I have the similar issue when run import fields2cover. Below are the message:

Command 'import' not found, but can be installed with:
sudo apt install graphicsmagick-imagemagick-compat  # version 1.4+really1.3.35-1, or
sudo apt install imagemagick-6.q16                  # version 8:6.9.10.23+dfsg-2.1ubuntu11.4
sudo apt install imagemagick-6.q16hdri              # version 8:6.9.10.23+dfsg-2.1ubuntu11.4

Below is the message after run cmake -DBUILD_PYTHON=ON .. which is similar to @RamanaBotta's on -- Found Python3: /home/wen/.local/lib/python3.8/site-packages/numpy/core/include (found version "3.8.10") found components: NumPy Interpreter Development

wen@wen-ubuntu:~/algorithms/path/Fields2Cover/build$ cmake -DBUILD_PYTHON=ON ..
-- Using the single-header code from /home/wen/algorithms/path/Fields2Cover/build/_deps/json-src/single_include/
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter Development 
-- Found Python3: /home/wen/.local/lib/python3.8/site-packages/numpy/core/include (found version "3.8.10") found components: NumPy Interpreter Development 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wen/algorithms/path/Fields2Cover/build

Thanks!

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

Hi @xluo6688, your error is quite different.
Command 'import' not found makes me think you are running import fields2cover directly on the command terminal. Try to run it inside a python terminal. So first do python and then import fields2cover.

from fields2cover.

xluo6688 avatar xluo6688 commented on June 8, 2024

Thank you @Gonzalo-Mier ! I can import fields2cover successfully after run python3 first. But I cannot run pytest-3 tests/python/ successfully in the main fold.

The following may give you some hint:

I added the following two lines to CMakeLists.txt as instructed,

find_package(Fields2Cover REQUIRED)
target_link_libraries(myFields2Cover Fields2Cover)

then run

cd build;
cmake -DBUILD_PYTHON=ON ..;
make -j$(nproc);
sudo make install;

but got the following errors: -- cannot find the target myFields2Cover which I added. Seems something wrong with the configuration of the CMakeLists.txt file.

wen@wen-ubuntu:~/algorithms/path/Fields2Cover$ cd build;
wen@wen-ubuntu:~/algorithms/path/Fields2Cover/build$ cmake -DBUILD_PYTHON=ON ..;
-- Using the single-header code from /home/wen/algorithms/path/Fields2Cover/build/_deps/json-src/single_include/
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter Development 
-- Found Python3: /home/wen/.local/lib/python3.8/site-packages/numpy/core/include (found version "3.8.10") found components: NumPy Interpreter Development 
CMake Error at CMakeLists.txt:227 (target_link_libraries):
  Cannot specify link libraries for target "myFields2Cover" which is not
  built by this project.


-- Configuring incomplete, errors occurred!
See also "/home/wen/algorithms/path/Fields2Cover/build/CMakeFiles/CMakeOutput.log".
See also "/home/wen/algorithms/path/Fields2Cover/build/CMakeFiles/CMakeError.log".
wen@wen-ubuntu:~/algorithms/path/Fields2Cover/build$ make -j$(nproc);
-- Using the single-header code from /home/wen/algorithms/path/Fields2Cover/build/_deps/json-src/single_include/
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter Development 
-- Found Python3: /home/wen/.local/lib/python3.8/site-packages/numpy/core/include (found version "3.8.10") found components: NumPy Interpreter Development 
CMake Error at CMakeLists.txt:227 (target_link_libraries):
  Cannot specify link libraries for target "myFields2Cover" which is not
  built by this project.


-- Configuring incomplete, errors occurred!
See also "/home/wen/algorithms/path/Fields2Cover/build/CMakeFiles/CMakeOutput.log".
See also "/home/wen/algorithms/path/Fields2Cover/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:2050: cmake_check_build_system] Error 1
wen@wen-ubuntu:~/algorithms/path/Fields2Cover/build$ sudo make install;
-- Using the single-header code from /home/wen/algorithms/path/Fields2Cover/build/_deps/json-src/single_include/
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter Development 
-- Found Python3: /usr/lib/python3/dist-packages/numpy/core/include (found version "3.8.10") found components: NumPy Interpreter Development 
CMake Error at CMakeLists.txt:227 (target_link_libraries):
  Cannot specify link libraries for target "myFields2Cover" which is not
  built by this project.


-- Configuring incomplete, errors occurred!
See also "/home/wen/algorithms/path/Fields2Cover/build/CMakeFiles/CMakeOutput.log".
See also "/home/wen/algorithms/path/Fields2Cover/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:2050: cmake_check_build_system] Error 1
wen@wen-ubuntu:~/algorithms/path/Fields2Cover/build$ 

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

Hi @xluo6688,
The instructions:

find_package(Fields2Cover REQUIRED)
target_link_libraries(myFields2Cover Fields2Cover)

are for adding the C++ library to another project. There's no need to touch the CMakeList.txt file. After being able to import fields2cover on python, are you able (without doing anything else to the project) to run pytest-3 tests/python/ or pytest tests/python/ from the main folder?

PD: use ``` before and after code lines to format the messages

from fields2cover.

xluo6688 avatar xluo6688 commented on June 8, 2024

Hi @Gonzalo-Mier, Thanks.

  1. when pytest-3 tests/python/ , I got the following error:
wen@wen-ubuntu:~/algorithms/path/Fields2Cover$ python3
Python 3.8.10 (default, Nov 14 2022, 12:59:47) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fields2cover
>>> exit()
wen@wen-ubuntu:~/algorithms/path/Fields2Cover$ pytest-3 tests/python/
Traceback (most recent call last):
  File "/usr/bin/pytest-3", line 11, in <module>
    load_entry_point('pytest==4.6.9', 'console_scripts', 'pytest')()
  File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 63, in main
    config = _prepareconfig(args, plugins)
  File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 206, in _prepareconfig
    return pluginmanager.hook.pytest_cmdline_parse(
  File "/usr/lib/python3/dist-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 92, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 83, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/usr/lib/python3/dist-packages/_pytest/helpconfig.py", line 94, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3/dist-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 739, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 947, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 893, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/usr/lib/python3/dist-packages/pluggy/manager.py", line 297, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py", line 304, in load_module
    exec(co, mod.__dict__)
  File "/home/wen/.local/lib/python3.8/site-packages/xdist/looponfail.py", line 17, in <module>
    from _pytest._io import TerminalWriter
ImportError: cannot import name 'TerminalWriter' from '_pytest._io' (/usr/lib/python3/dist-packages/_pytest/_io/__init__.py)
  1. when run pytest tests/python/, I got the following message:
wen@wen-ubuntu:~/algorithms/path/Fields2Cover$ pytest tests/python/
========================================================= test session starts ==========================================================
platform linux -- Python 3.8.10, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/wen/algorithms/path/Fields2Cover
plugins: xdist-3.1.0
collected 104 items                                                                                                                    

tests/python/import_f2c_test.py .                                                                                                [  0%]
tests/python/headland_generator/const_hl_test.py ..                                                                              [  2%]
tests/python/objectives/complete_turn_path_obj_test.py ..                                                                        [  4%]
tests/python/objectives/direct_dist_path_obj_test.py ..                                                                          [  6%]
tests/python/objectives/field_coverage_test.py ...                                                                               [  9%]
tests/python/objectives/n_swath_test.py ...                                                                                      [ 12%]
tests/python/objectives/overlaps_test.py ..                                                                                      [ 14%]
tests/python/objectives/swath_length_test.py ..                                                                                  [ 16%]
tests/python/path_planning/dubins_cc_test.py ..                                                                                  [ 18%]
tests/python/path_planning/dubins_test.py ...                                                                                    [ 21%]
tests/python/path_planning/path_planning_test.py .                                                                               [ 22%]
tests/python/path_planning/reeds_shepp_hc_test.py ..                                                                             [ 24%]
tests/python/path_planning/reeds_shepp_test.py ..                                                                                [ 25%]
tests/python/route_planning/boustrophedon_order_test.py .                                                                        [ 26%]
tests/python/route_planning/custom_order_test.py .....                                                                           [ 31%]
tests/python/route_planning/snake_order_test.py ..                                                                               [ 33%]
tests/python/route_planning/spiral_order_test.py ......                                                                          [ 39%]
tests/python/swath_generator/brute_force_test.py .                                                                               [ 40%]
tests/python/types/Cell_test.py .....                                                                                            [ 45%]
tests/python/types/Cells_test.py .....                                                                                           [ 50%]
tests/python/types/Field_test.py .                                                                                               [ 50%]
tests/python/types/Geometries_test.py ..                                                                                         [ 52%]
tests/python/types/Geometry_test.py .                                                                                            [ 53%]
tests/python/types/LineString_test.py ..                                                                                         [ 55%]
tests/python/types/LinearRing_test.py .                                                                                          [ 56%]
tests/python/types/MultiLineString_test.py ..                                                                                    [ 58%]
tests/python/types/MultiPoint_test.py ..                                                                                         [ 60%]
tests/python/types/Path_test.py .....                                                                                            [ 65%]
tests/python/types/Point_test.py ....                                                                                            [ 69%]
tests/python/types/Robot_test.py .                                                                                               [ 70%]
tests/python/types/Route_test.py .                                                                                               [ 71%]
tests/python/types/Swath_test.py .......                                                                                         [ 77%]
tests/python/types/Swaths_test.py ...                                                                                            [ 80%]
tests/python/utils/geometryOp_test.py .............                                                                              [ 93%]
tests/python/utils/parser_test.py ....                                                                                           [ 97%]
tests/python/utils/transform_test.py .                                                                                           [ 98%]
tests/python/utils/visualizer_test.py ..                                                                                         [100%]

========================================================= 104 passed in 2.49s ==========================================================
wen@wen-ubuntu:~/algorithms/path/Fields2Cover$

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

@xluo6688 cool, so in your case pytest works πŸ˜„

Let's wait @RamanaBotta to test it and then we could close the issue

from fields2cover.

xluo6688 avatar xluo6688 commented on June 8, 2024

Thanks @Gonzalo-Mier. How to run this project, so I can see the path planning animation?

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

Please, open a new issue. To avoid mixing issues.

from fields2cover.

RamanaBotta avatar RamanaBotta commented on June 8, 2024

Hi @Gonzalo-Mier,

Q > You can install the library manually from build/swig/python running sudo python3 setup.py install. Tell me if that works for you :)
A>
$ sudo python3 setup.py install
running install
/usr/local/lib/python3.8/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

I guess that's a yes. Have fun πŸ˜„

from fields2cover.

RamanaBotta avatar RamanaBotta commented on June 8, 2024

I am sorry,
I am still not able to import it. 😞 .

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

No worries πŸ˜„ . Any error that pop up? What happen when you do python3 and import fields2cover?

from fields2cover.

RamanaBotta avatar RamanaBotta commented on June 8, 2024

$ python3
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import fields2cover
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'fields2cover'

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

Try to also import it from python or sudo python3

from fields2cover.

RamanaBotta avatar RamanaBotta commented on June 8, 2024

still the same error @Gonzalo-Mier

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on June 8, 2024

I don't know how can I help you more with this. Sorry

from fields2cover.

RamanaBotta avatar RamanaBotta commented on June 8, 2024

Okay,
Thank you. @Gonzalo-Mier

from fields2cover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.