Closed ngophuc closed 6 years ago
May I know have you installed the libfcl? It looks the program cannot find the Vec3f which is originated from libfcl. Please check https://github.com/topskychen/voxelizer#installation section.
I installed libfcl but not the tag 0.3.3 since I got some errors with octomap lib.
Please install tags/0.3.3, the latest version has changed a lot. May I know what is the detailed error you got when you install? The platform being tested includes MacOS 10.9.3/10.13.4 and ubuntu 14.04.
Here is error .... In file included from /fcl/src/continuous_collision.cpp:6: In file included from /fcl/include/fcl/traversal/traversal_node_setup.h:47: */fcl/include/fcl/traversal/traversal_node_octree.h:670:52: error: no member named 'getChild' in 'octomap::OcTreeNode' const OcTree::OcTreeNode child = root1->getChild(i);**
/fcl/include/fcl/traversal/traversal_node_octree.h:704:16: warning: 'hasChildren' is deprecated
[-Wdeprecated-declarations]
if(!root1->hasChildren() && !root2->hasChildren())
^
/usr/local/include/octomap/OcTreeDataNode.h:100:5: note: 'hasChildren' has been explicitly marked deprecated here
OCTOMAP_DEPRECATED(bool hasChildren() const);
....
Can I have more information?
Can I have more information?
When did this error happen? Is it when you build the fcl lib?
yes, it happens when I compile fcl lib How did you build libfcl? with cmake as explained in https://github.com/flexible-collision-library/fcl Have you installed libccd? Yes (https://github.com/danfis/libccd) What is your platform and version? MacOs High Sierra 10.13.4
Hmm, I build once again successfully on 10.13.4. To confirm again:
git checkout tags/0.3.3
mkdir build
cd build
cmake ..
make install
Which version of octomap do you have ? Is it 1.9.0 ?
I see. That's the reason. I am not using the Octomap. -- FCL does not use Octomap
. You may skip the Octomap when cmake
.
# Find Octomap (optional)
find_package(PkgConfig QUIET)
set(FCL_HAVE_OCTOMAP 0)
if(PKG_CONFIG_FOUND)
pkg_check_modules(OCTOMAP QUIET octomap)
endif()
if(NOT OCTOMAP_FOUND)
# if pkfconfig is not installed, then fall back on more fragile detection
# of octomap
find_path(OCTOMAP_INCLUDE_DIRS octomap.h
PATH_SUFFIXES octomap)
find_path(OCTOMAP_LIBRARY_DIRS
${CMAKE_SHARED_LIBRARY_PREFIX}octomap${CMAKE_SHARED_LIBRARY_SUFFIX})
if(OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)
set(OCTOMAP_LIBRARIES "octomap;octomath")
endif()
endif()
if (OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)
include_directories(${OCTOMAP_INCLUDE_DIRS})
link_directories(${OCTOMAP_LIBRARY_DIRS})
set(FCL_HAVE_OCTOMAP 1)
message(STATUS "FCL uses Octomap")
else()
message(STATUS "FCL does not use Octomap")
endif()
Indeed, it is due to octomap. Thanks a lot for your help. It works now. Another question, how do you visualize the result ? (.vox file).
Cool, you may check the result as follows:
I tried viewvox with writeForView, but I got this error :
--- [viewvox] binary voxel viewer, version 0.45, build #367 on 2017/12/29 14:09:23 --- written by Patrick Min, 2004-2017
will keep all interal voxels loading voxel file... filename: [data/kawada-hironx], extension: [vox] error: unsupported filetype 5
Do you know why ?
Are you sure you are using WriteForView
? *output << "#binvox 1" << endl;
the type should be 1
instead of 5. Btw, make sure you rebuild the program after you make the code change. Here is what I can see on my local mac:
Sorry, it's completely my fault. I was in the wrong directory. It works now. Thanks a lot for your time. It's so great !
So glad to hear it works, enjoy ;) I am closing this issue now.
Hey, coming a bit late to the party.
Did you do any additional configurations to make viewvox work besides enabling WriteForView
?
My output get stuck and it only shows this:
davincis-MBP:stl_visualization davinci$ sudo ./viewvox data/kawada-hironx.binvox
--- [viewvox] binary voxel viewer, version 0.45, build #367 on 2017/12/29 14:09:23
--- written by Patrick Min, 2004-2017
Dear authors,
I would like to test/use your voxelizer code. However, I have several problems while compiling the code, it is related to the type "Vec3f". Here are errors:
/src/commons.h:47:24: error: unknown type name 'Vec3f' inline void Fill(const Vec3f& vc, float ft[3]); /src/commons.h:34: error: use of class template 'TriangleP' requires template arguments /src/commons.h:35: error: use of class template 'Box' requires template arguments ...
Could you fix them ? Thank you !