peteanderson80 / Matterport3DSimulator

AI Research Platform for Reinforcement Learning from Real Panoramic Images.
Other
481 stars 129 forks source link

[built error] find wrong python, was not declared in this scope #101

Closed jasonppy closed 2 years ago

jasonppy commented 2 years ago

Hi Peter,

I'm trying to build it without Docker, as I need to make MatterSim available to the python in my anaconda envs. But when I cmake it, it's finding the system python, how do I change this?

Besides this, I got an error

Scanning dependencies of target MatterSim
[  9%] Building CXX object CMakeFiles/MatterSim.dir/src/lib/MatterSim.cpp.o
[ 36%] Building CXX object CMakeFiles/MatterSim.dir/src/lib/NavGraph.cpp.o
[ 36%] Building CXX object CMakeFiles/MatterSim.dir/src/lib/Benchmark.cpp.o
[ 36%] Building CXX object CMakeFiles/MatterSim.dir/src/lib/cbf.cpp.o
/home/Matterport3DSimulator/src/lib/NavGraph.cpp: In member function ‘void mattersim::NavGraph::Location::loadCubemapImages()’:
/home/Matterport3DSimulator/src/lib/NavGraph.cpp:59:89: error: ‘CV_LOAD_IMAGE_ANYDEPTH’ was not declared in this scope
         cv::Mat depth = cv::imread(skyboxDir + viewpointId + "_skybox_depth_small.png", CV_LOAD_IMAGE_ANYDEPTH);
                                                                                         ^~~~~~~~~~~~~~~~~~~~~~
/home/Matterport3DSimulator/src/lib/NavGraph.cpp:59:89: note: suggested alternative: ‘CV_MAT_DEPTH’
         cv::Mat depth = cv::imread(skyboxDir + viewpointId + "_skybox_depth_small.png", CV_LOAD_IMAGE_ANYDEPTH);
                                                                                         ^~~~~~~~~~~~~~~~~~~~~~
                                                                                         CV_MAT_DEPTH
CMakeFiles/MatterSim.dir/build.make:86: recipe for target 'CMakeFiles/MatterSim.dir/src/lib/NavGraph.cpp.o' failed
make[2]: *** [CMakeFiles/MatterSim.dir/src/lib/NavGraph.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/MatterSim.dir/all' failed
make[1]: *** [CMakeFiles/MatterSim.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Is it related to Depth images? I only downloaded matterport_skybox_images as it is said in the repo that this is minimal requirement for the simulator to work.

Thanks for your time! Jason

jasonppy commented 2 years ago

I've find a way to help it find the desired python version, by changing cmake -DEGL_RENDERING=ON .. to

cmake -DEGL_RENDERING=ON .. -DPYTHON_LIBRARY=/dir_of_miniconda3/lib/libpython3.8.so \
-DPYTHON_INCLUDE_DIR=/dir_of_miniconda3/include/python3.8/ \
-DPYTHON_EXECUTABLE=/dir_of_miniconda3/bin/python \

and cmake ran successfully, but running make still gives the above error even if I have install depth images and camera parameters

jasonppy commented 2 years ago

Problem solved by using Docker :)