CMake Error Topics Quiz 4.3

I keep getting this error
And I cannot compile my code

– Could NOT find cmd_vel (missing: cmd_vel_DIR)
– Could not find the required component ‘cmd_vel’. 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 “cmd_vel” with any
of the following names:

cmd_velConfig.cmake
cmd_vel-config.cmake

Add the installation prefix of “cmd_vel” to CMAKE_PREFIX_PATH or set
“cmd_vel_DIR” to a directory containing one of the above files. If
“cmd_vel” provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
topics_quiz/CMakeLists.txt:10 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/user/catkin_ws/build/CMakeFiles/CMakeError.log”.
make: *** [Makefile:334: cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed

Hi @khulood1027 ,

Welcome to this Community!

I think you have made some mistake in your package.xml and/or in your CMakeLists.txt.
Please post both your files here as a fenced code-block.

I am guessing that you have added cmd_vel as a dependency instead of geometry_msgs.

Regards,
Girish

1 Like

Yes i added cmd_vel as a dependency! I fixed it and fortunately everything works now!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.