Closed Sanithovski closed 3 years ago
There's a build issue. Inverstigating.
Thanks, you can see some errors in the log here: https://travis-ci.org/github/google-research/tiny-differentiable-simulator/jobs/770750707
I have fixed the build issues. Now the SDF to mesh component should build with Eigen and on MacOS.
Thanks a lot for the contribution. I'd rather not have multiple inheritance. Will look how we can work around that, and look a bit more into the code.
I'm adding an SDF for the Plane class. After that, each of the existing geometry types would have an SDF function, and we can remove the SDF class and move its contents to the Geometry base class. This should remove the multiple inheritance concern.
Hi. I have removed the SDF helper class and moved its contents to the Geometry class. I've added the SDF function for the Plane class and an error message if the SDF distance function is called from an unsupported geometry class.
Thanks for all the effort, but it can't be merged as-as at the moment. The dependency from geometry.hpp to sdf_utils.hpp to one of the visualizers (visualizer/opengl/tiny_gl_instancing_renderer.h) is not ok: the visualizers are optional. I'll get back to this later, no need to take further action at this stage.
Also,what is the license of the MarchingCubes code by Michael Polyakov? If there are other parts of this pull request are written by others, please provide license info.
The MarchingCubes code is retrieved from this website: https://www.angelfire.com/linux/myp/MCAdvanced/MCImproved.html I've made some changes to the code so it conforms with our program structure. The author, Michael Y. Polyakov (myp@andrew.cmu.edu, mikepolyakov@hotmail.com), did not leave license information. The original website is not fully operational and I cannot find up-to-date information about him. I can try to reach him at the above email addresses (probably the Hotmail one since I suspect he/she has graduated from CMU) if that's necessary.
Thanks a lot for the pull request. I'll make some minor changes in a follow up PR.
I added a component to render basic geometry shapes with their Signed Distance Functions (SDFs). The mesh can be generated from the SDF at runtime instead of being read from pre-generated mesh files. The mesh generation is achieved with a local implementation Marching Cubes algorithm. CGAL is no longer needed for mesh generation.
The URDF visualizer in
examples
can now render geometry shapes with the new mesh generation component. To use SDF to mesh for visualization, setUSE_SDF_TO_MESH
to 1. Change it to 0 to disable this functionality.Here is a list of changes I made:
src/utils/sdf_to_mesh
. The code is partially referenced from an external source. See notes at the top of the file.src/geometry.hpp
. Also add the Cylinder class type.src/sdf_utils.hpp
src/utils/sdf_to_mesh_converter.hpp
. Replace the original conversion procedure using CGAL with the Marching Cubes algorithm.examples/sdf_to_mesh_example.cpp
examples/opengl_urdf_visualizer.h
with an option to generate mesh from SDFs for basic geometry types instead of using pre-calculated meshes. Also add support for cylinders in the visualizer. (Cylinders will always be generated from SDFs).visual
component for some URDF files, which can be used byexamples/tiny_urdf_parser_opengl_example.cpp
.