Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

Normally, you would add a system dependency on sdformat, which is released with Hydro. Unfortunately, it does not seem to have been defined via rosdep yet. You should probably contribute the missing definition to fix that problem.

Then, in your package.xml, add:

<build_depend>sdformat</build_depend>
<run_depend>sdformat</run_depend>

With sdformat installed, in your CMakeLists.txt, find the SDF system library:

find_package(PkgConfig REQUIRED)
pkg_check_modules(SDF REQUIRED)
include_directories(include ${SDF_INCLUDE_DIRS})

Then your own code will need something like this to build with it:

add_executable(your_node ${YOUR_NODE_SOURCES})
target_link_libraries(your_node
                      ${catkin_LIBRARIES}
                      ${SDF_LIBRARIES})

Normally, you would add a system dependency on sdformat, which is released with Hydro. Unfortunately, it does not seem to have been defined via rosdep yet. You should probably contribute the missing definition to fix that problem.

Then, in your package.xml, add:

<build_depend>sdformat</build_depend>
<run_depend>sdformat</run_depend>

With sdformat installed, in your CMakeLists.txt, find the SDF system library:

find_package(PkgConfig REQUIRED)
pkg_check_modules(SDF sdformat REQUIRED)
include_directories(include ${SDF_INCLUDE_DIRS})

Then your own code will need something like this to build with it:

add_executable(your_node ${YOUR_NODE_SOURCES})
target_link_libraries(your_node
                      ${catkin_LIBRARIES}
                      ${SDF_LIBRARIES})