错误:
Could NOT find tf2 (missing: tf2_DIR)
-- Could not find the required component 'tf2'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "tf2" with any of
the following names:
tf2Config.cmake
tf2-config.cmake
Add the installation prefix of "tf2" to CMAKE_PREFIX_PATH or set "tf2_DIR"
to a directory containing one of the above files. If "tf2" provides a
separate development package or SDK, be sure it has been installed.
解决:
sudo apt-get install ros-noetic-tf2-ros
相关的包还蛮多,具体缺哪个再看,sudo apt-get install ros-tf2-*或者sudo apt-get install ros-noetic-tf2-