How to fix ROS error: missing rostimeConfig.cmake
Problem
When trying to build some ROS package using colcon build
, you see an error message such as
CMake Error at /home/uli/dev/Versatile/catkin/install/catkin/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "rostime" with any
of the following names:
rostimeConfig.cmake
rostime-config.cmake
Add the installation prefix of "rostime" to CMAKE_PREFIX_PATH or set
"rostime_DIR" to a directory containing one of the above files. If
"rostime" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
Solution
rostime
is currently not available as apt package for ROS jazzy.
Therefore, clone the repo, build it using colcon
and then source install/setup.bash
before building your package.
git clone https://github.com/ros/roscpp_core.git
cd roscpp_core/rostime
colcon build
source install/setup.bash
After that (in the same shell), build your other package using colcon build
again.
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow