Open DimiSf opened 1 month ago
can you try to follow the steps with the devcontainer(https://frankaemika.github.io/docs/franka_ros2.html#use-vscode-devcontainer) and let us know if that works? All the dependency should be automatically installed under devcontainer
CMake Cannot Find
boost_sml
Headers in ROS 2 WorkspaceI am encountering an issue with building the
franka_ign_ros2_control
package in my ROS 2 workspace. The build process fails because CMake cannot find theboost_sml
headers.boost_sml
is a header-only library from Boost and does not provide its own CMake configuration files.I am using:
Error Message
CMake Error at CMakeLists.txt:24 (find_package): By not providing "Findboost_sml.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "boost_sml", but CMake did not find one.
Could not find a package configuration file provided by "boost_sml" with any of the following names: boost_smlConfig.cmake boost_sml-config.cmake Add the installation prefix of "boost_sml" to CMAKE_PREFIX_PATH or set "boost_sml_DIR" to a directory containing one of the above files. If "boost_sml" provides a separate development package or SDK, be sure it has been installed.
Current Setup
Location of
boost_sml
Headers:sml.hpp
file is located at/home/group/boost_sml/include/boost/sml.hpp
.Environment Variables:
CMAKE_PREFIX_PATH
includes/home/group/boost_sml
and/home/group/franka_ros2_ws/cmake
.Custom CMake Module:
Created
Findboost_sml.cmake
in/home/group/franka_ros2_ws/cmake
with the following content:CMakeLists.txt Configuration:
Modified
CMakeLists.txt
forfranka_gazebo_bringup
andfranka_ign_ros2_control
to include the custom module path and findboost_sml
.Example for
franka_gazebo_bringup
:Example for
franka_ign_ros2_control
:To address the issue, steps were taken to ensure that
boost_sml
was correctly installed and detected by CMake. First, I verified that thesml.hpp
file was present in the directory/home/group/boost_sml/include/boost/sml.hpp
, confirming thatboost_sml
was installed. Next, I set theCMAKE_PREFIX_PATH
environment variable to include both/home/group/boost_sml
and/home/group/franka_ros2_ws/cmake
by running the command: