Add suport for loading SDF scenes generated by blender BIM to robotics addon
Compare changes
Files
3@@ -3,7 +3,6 @@ find_package(Simox 2.3.7 QUIET)
@@ -11,6 +10,10 @@ if (MujocoX_FOUND)
@@ -18,6 +21,7 @@ set(COMPONENT_LIBS
Requires:
This merge request allows to load a scene described by an SDF file (generated by the BIM to robotics blender addon), instead of using a JSON. For this, the following requirements have to be met:
The second condition is necessary because SDFormat 6.0 apparently does not allow getting the original include paths (https://github.com/gazebosim/sdformat/blob/sdf6/src/parser.cc#L916). Therefore, the fallback mechanism when a path is not found is used to retrieve all include paths. Using a newer version of SDFormat would probably solve this, but could require some Axii modules.
The code uses SDFormat 13, which is part of the following Axii merge request: sw/armarx/meta/axii!517 (merged) This allows accessing the original paths and setting search paths for URIs on a per-SDF-file basis.
This can be improved. Please remove
include_directories
andlink_directories
. Use theirtarget_...
counterparts instead.Likely, there is also a CMake target (I'm just guessing, e.g. SDFormat::SDFormat). You should have a look at the SDFormat-config.cmake file or similar.
Let me know if you need help.
changed this line in version 4 of the diff