Open SimonOuyang7386 opened 3 years ago
When you cmake librealsense, you have to mkdir a build directory in the librealsense directory.
Move in librealsense/build and :
$ cmake ../ -DCMAKE_PREFIX_PATH=~/apriltag
To tell cmake the path to librealsense directory.
In my case, it doesn't work.
When I try :
root@4f8b0335d5f8:/librealsense/examples/pose-apriltag# g++ -o rs-pose-apriltag rs-pose-apriltag.cpp
It says :
`rs-pose-apriltag.cpp:12:22: fatal error: apriltag.h: No such file or directory
^
compilation terminated. `
EDIT : it is not necessary to compile it since it is already done.
I use this cmake :
$ cmake ../ -DCMAKE_PREFIX_PATH=~/apriltag -DCMAKE_BUILD_TYPE=release -DFORCE_RSUSB_BACKEND=true -DBUILD_EXAMPLES=true
Just run the command, like :
root@4f8b0335d5f8:/# rs-pose-apriltag
It is working for me with all the librealsense examples.
EDIT 2 : if you want to compile your own code using librealsense, apriltag and probably other libraries, you have to use cmake.
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
In "Installing Apriltag library in a local directory" step, I unpack the github file in "~/apriltag" and create a new folder "apriltag-3.1.1" in "~/apriltag" , then I create another folder "apriltag-build" in "~/apriltag", I done the "cmake" and "make install" in "apriltag-build", but when I move on, it tells me to run the command "cmake -DCMAKE_PREFIX_PATH=~/apriltag", I do not know the "" means, so can anyone tell me what is the "" means and I should run this command in which folder, thanks.